mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-19 07:17:00 +08:00
fix(editor): limit at members list length (#12529)
Closes: BS-3009 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - The mention members menu now displays up to three members, with a localized hint indicating the number of additional hidden members. - **Localization** - Added a new translation key for the overflow members hint in the English language pack. - **Chores** - Updated translation completeness statistics for the "es-CL" locale. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -594,6 +594,14 @@ export class AtMenuConfigService extends Service {
|
||||
items,
|
||||
loading: this.memberSearchService.isLoading$.signal,
|
||||
hidden,
|
||||
maxDisplay: 3,
|
||||
overflowText: computed(() => {
|
||||
const totalCount = this.memberSearchService.result$.signal.value.length;
|
||||
const remainingCount = totalCount - 3;
|
||||
return I18n.t('com.affine.editor.at-menu.more-members-hint', {
|
||||
count: remainingCount,
|
||||
});
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"el-GR": 94,
|
||||
"en": 100,
|
||||
"es-AR": 94,
|
||||
"es-CL": 96,
|
||||
"es-CL": 95,
|
||||
"es": 94,
|
||||
"fa": 94,
|
||||
"fr": 94,
|
||||
|
||||
@@ -7418,6 +7418,12 @@ export function useAFFiNEI18N(): {
|
||||
["com.affine.editor.at-menu.more-docs-hint"](options: {
|
||||
readonly count: string;
|
||||
}): string;
|
||||
/**
|
||||
* `{{count}} more members`
|
||||
*/
|
||||
["com.affine.editor.at-menu.more-members-hint"](options: {
|
||||
readonly count: string;
|
||||
}): string;
|
||||
/**
|
||||
* `Journal`
|
||||
*/
|
||||
|
||||
@@ -1844,6 +1844,7 @@
|
||||
"com.affine.editor.at-menu.create-edgeless": "New \"{{name}}\" edgeless",
|
||||
"com.affine.editor.at-menu.import": "Import",
|
||||
"com.affine.editor.at-menu.more-docs-hint": "{{count}} more docs",
|
||||
"com.affine.editor.at-menu.more-members-hint": "{{count}} more members",
|
||||
"com.affine.editor.at-menu.journal": "Journal",
|
||||
"com.affine.editor.at-menu.date-picker": "Select a specific date",
|
||||
"com.affine.editor.at-menu.mention-members": "Mention Members",
|
||||
|
||||
Reference in New Issue
Block a user