mirror of
https://github.com/zadam/trilium.git
synced 2026-01-06 06:34:25 +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": {
|
"note_icon": {
|
||||||
"change_note_icon": "Change note icon",
|
"change_note_icon": "Change note icon",
|
||||||
"search": "Search:",
|
"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",
|
"reset-default": "Reset to default icon",
|
||||||
"filter": "Filter",
|
"filter": "Filter",
|
||||||
"filter-none": "All icons",
|
"filter-none": "All icons",
|
||||||
|
|||||||
@ -126,7 +126,12 @@ function NoteIconList({ note, dropdownRef }: {
|
|||||||
inputRef={searchBoxRef}
|
inputRef={searchBoxRef}
|
||||||
type="text"
|
type="text"
|
||||||
name="icon-search"
|
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}
|
currentValue={search} onChange={setSearch}
|
||||||
autoFocus
|
autoFocus
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user