feat: add icons
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 1m55s
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 1m55s
This commit is contained in:
@ -109,7 +109,7 @@
|
||||
activeNodeId = node.id;
|
||||
}}
|
||||
>
|
||||
{node.id}
|
||||
{node.id.split("/").at(-1)}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
6
app/src/lib/icons/graph.svg
Normal file
6
app/src/lib/icons/graph.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="17" y="8" width="5" height="7" rx="1" stroke="currentColor" stroke-width="2"/>
|
||||
<rect x="2" y="3" width="5" height="7" rx="1" stroke="currentColor" stroke-width="2"/>
|
||||
<rect x="2" y="14" width="5" height="7" rx="1" stroke="currentColor" stroke-width="2"/>
|
||||
<path d="M16 10.5C9.33333 10.5 14.8889 6 8.22222 6H6M16 12.5C8.77778 12.5 14.8889 17 8.22222 17H6" stroke="currentColor" stroke-width="2"/>
|
||||
</svg>
|
After Width: | Height: | Size: 519 B |
@ -6,7 +6,7 @@
|
||||
export let icon: string = "";
|
||||
export let title = "";
|
||||
export let classes = "";
|
||||
export let hidden: boolean;
|
||||
export let hidden: boolean | undefined = undefined;
|
||||
|
||||
const setVisibility =
|
||||
getContext<(id: string, visible: boolean) => void>("setVisibility");
|
||||
@ -21,7 +21,6 @@
|
||||
>("registerPanel");
|
||||
|
||||
let visible = registerPanel(id, icon, classes);
|
||||
console.log(id, $visible, hidden);
|
||||
</script>
|
||||
|
||||
{#if $visible}
|
||||
|
@ -183,7 +183,7 @@
|
||||
id="graph-settings"
|
||||
title="Graph Settings"
|
||||
classes="text-blue-400"
|
||||
icon="i-tabler-brand-git"
|
||||
icon="i-custom-graph"
|
||||
>
|
||||
{#if Object.keys(graphSettingTypes).length > 0}
|
||||
<GraphSettings type={graphSettingTypes} store={graphSettings} />
|
||||
|
@ -2,10 +2,19 @@
|
||||
import { defineConfig } from 'unocss'
|
||||
import presetIcons from '@unocss/preset-icons'
|
||||
import { presetUno } from 'unocss'
|
||||
import fs from 'fs'
|
||||
|
||||
const icons = Object.fromEntries(fs.readdirSync('./src/lib/icons')
|
||||
.map(name => [name.replace(".svg", ""), fs.readFileSync(`./src/lib/icons/${name}`, 'utf-8')]))
|
||||
|
||||
|
||||
export default defineConfig({
|
||||
presets: [
|
||||
presetUno(),
|
||||
presetIcons(),
|
||||
presetIcons({
|
||||
collections: {
|
||||
custom: icons
|
||||
}
|
||||
}),
|
||||
]
|
||||
})
|
||||
|
Reference in New Issue
Block a user