feat(note_icon): display note pack icon

This commit is contained in:
Elian Doran 2025-12-26 21:14:13 +02:00
parent 13fff33aa4
commit fb629f7693
No known key found for this signature in database
3 changed files with 5 additions and 1 deletions

View File

@ -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>
))}

View File

@ -54,6 +54,7 @@ export function generateIconRegistry(iconPacks: ProcessResult[]): IconRegistry {
sources.push({
prefix: manifest.prefix,
name: manifestNote.title,
icon: manifestNote.getIcon(),
icons
});
}

View File

@ -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[];