mirror of
https://github.com/zadam/trilium.git
synced 2025-12-29 02:34:25 +01:00
feat(note_icon): display note pack icon
This commit is contained in:
parent
13fff33aa4
commit
fb629f7693
@ -192,10 +192,11 @@ function IconFilterContent({ filterByPrefix, setFilterByPrefix }: {
|
||||
>{t("note_icon.filter-default")}</FormListItem>
|
||||
<FormDropdownDivider />
|
||||
|
||||
{glob.iconRegistry.sources.map(({ prefix, name }) => (
|
||||
{glob.iconRegistry.sources.map(({ prefix, name, icon }) => (
|
||||
<FormListItem
|
||||
key={prefix}
|
||||
onClick={() => setFilterByPrefix(prefix)}
|
||||
icon={icon}
|
||||
checked={filterByPrefix === prefix}
|
||||
>{name}</FormListItem>
|
||||
))}
|
||||
|
||||
@ -54,6 +54,7 @@ export function generateIconRegistry(iconPacks: ProcessResult[]): IconRegistry {
|
||||
sources.push({
|
||||
prefix: manifest.prefix,
|
||||
name: manifestNote.title,
|
||||
icon: manifestNote.getIcon(),
|
||||
icons
|
||||
});
|
||||
}
|
||||
|
||||
@ -290,6 +290,8 @@ export interface IconRegistry {
|
||||
sources: {
|
||||
prefix: string;
|
||||
name: string;
|
||||
/** An icon class to identify this icon pack. */
|
||||
icon: string;
|
||||
icons: {
|
||||
id: string;
|
||||
terms: string[];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user