mirror of
https://github.com/zadam/trilium.git
synced 2025-12-29 18:54:29 +01:00
feat(note_icon): display count and filter in search placeholder
This commit is contained in:
parent
46e5090445
commit
2bd83e6285
@ -766,7 +766,9 @@
|
||||
"note_icon": {
|
||||
"change_note_icon": "Change note icon",
|
||||
"search": "Search:",
|
||||
"search_placeholder": "Type to filter icons...",
|
||||
"search_placeholder_one": "Search {{number}} icons across {{count}} packs...",
|
||||
"search_placeholder_other": "Search {{number}} icons across {{count}} packs...",
|
||||
"search_placeholder_filtered": "Search {{number}} icons in {{name}}...",
|
||||
"reset-default": "Reset to default icon",
|
||||
"filter": "Filter",
|
||||
"filter-none": "All icons",
|
||||
|
||||
@ -126,7 +126,12 @@ function NoteIconList({ note, dropdownRef }: {
|
||||
inputRef={searchBoxRef}
|
||||
type="text"
|
||||
name="icon-search"
|
||||
placeholder={t("note_icon.search_placeholder")}
|
||||
placeholder={ filterByPrefix
|
||||
? t("note_icon.search_placeholder_filtered", {
|
||||
number: iconData?.icons.length ?? 0,
|
||||
name: glob.iconRegistry.sources.find(s => s.prefix === filterByPrefix)?.name ?? ""
|
||||
})
|
||||
: t("note_icon.search_placeholder", { number: iconData?.icons.length ?? 0, count: glob.iconRegistry.sources.length })}
|
||||
currentValue={search} onChange={setSearch}
|
||||
autoFocus
|
||||
/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user