mirror of
https://github.com/jcreek/OpenNetworkDiagram.git
synced 2026-07-13 02:53:45 +00:00
feat(#5): add local vendored icon catalog manifest and attribution
This commit is contained in:
@@ -1,18 +1,23 @@
|
||||
import { VENDOR_ICON_DEFINITIONS } from './vendorIconManifest';
|
||||
|
||||
export interface IconDefinition {
|
||||
key: string;
|
||||
label: string;
|
||||
path: string;
|
||||
source?: 'built-in' | 'homarr-dashboard-icons';
|
||||
}
|
||||
|
||||
const ICONS: IconDefinition[] = [
|
||||
{ key: 'server', label: 'Server', path: '/icons/server.svg' },
|
||||
{ key: 'router', label: 'Router', path: '/icons/router.svg' },
|
||||
{ key: 'switch', label: 'Switch', path: '/icons/switch.svg' },
|
||||
{ key: 'storage', label: 'Storage', path: '/icons/storage.svg' },
|
||||
{ key: 'desktop', label: 'Desktop', path: '/icons/desktop.svg' },
|
||||
{ key: 'cloud', label: 'Cloud', path: '/icons/cloud.svg' }
|
||||
const BUILTIN_ICONS: IconDefinition[] = [
|
||||
{ key: 'server', label: 'Server', path: '/icons/server.svg', source: 'built-in' },
|
||||
{ key: 'router', label: 'Router', path: '/icons/router.svg', source: 'built-in' },
|
||||
{ key: 'switch', label: 'Switch', path: '/icons/switch.svg', source: 'built-in' },
|
||||
{ key: 'storage', label: 'Storage', path: '/icons/storage.svg', source: 'built-in' },
|
||||
{ key: 'desktop', label: 'Desktop', path: '/icons/desktop.svg', source: 'built-in' },
|
||||
{ key: 'cloud', label: 'Cloud', path: '/icons/cloud.svg', source: 'built-in' }
|
||||
];
|
||||
|
||||
const ICONS: IconDefinition[] = [...BUILTIN_ICONS, ...VENDOR_ICON_DEFINITIONS];
|
||||
|
||||
const ICON_BY_KEY = new Map(ICONS.map((icon) => [icon.key, icon]));
|
||||
|
||||
export function listIconDefinitions(): IconDefinition[] {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user