feat: migrate most of graph-manager to svelte-5
Some checks failed
Deploy to GitHub Pages / build_site (push) Failing after 2m44s
Some checks failed
Deploy to GitHub Pages / build_site (push) Failing after 2m44s
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
<div class="wrapper" class:visible={$activePanel}>
|
||||
<div class="tabs">
|
||||
<button
|
||||
aria-label="Close"
|
||||
on:click={() => {
|
||||
setActivePanel($activePanel ? false : keys[0]);
|
||||
}}
|
||||
@@ -59,11 +60,12 @@
|
||||
{#each keys as panel (panels[panel].id)}
|
||||
{#if panels[panel].visible !== false}
|
||||
<button
|
||||
aria-label={panel}
|
||||
class="tab {panels[panel].classes}"
|
||||
class:active={panel === $activePanel}
|
||||
on:click={() => setActivePanel(panel)}
|
||||
>
|
||||
<span class={`block w-6 h-6 ${panels[panel].icon}`} />
|
||||
<span class={`block w-6 h-6 ${panels[panel].icon}`}></span>
|
||||
</button>
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
@@ -20,14 +20,16 @@ export const AppSettings = localStore("node.settings", {
|
||||
const themes = ["dark", "light", "catppuccin", "solarized", "high-contrast", "nord", "dracula"];
|
||||
|
||||
AppSettings.subscribe((value) => {
|
||||
const classes = document.body.classList;
|
||||
const classes = document.body.parentElement?.classList;
|
||||
const newClassName = `theme-${themes[value.theme]}`;
|
||||
for (const className of classes) {
|
||||
if (className.startsWith("theme-") && className !== newClassName) {
|
||||
classes.remove(className);
|
||||
if (classes) {
|
||||
for (const className of classes) {
|
||||
if (className.startsWith("theme-") && className !== newClassName) {
|
||||
classes.remove(className);
|
||||
}
|
||||
}
|
||||
}
|
||||
document.body.classList.add(newClassName);
|
||||
document.body?.parentElement?.classList.add(newClassName);
|
||||
});
|
||||
|
||||
export const AppSettingTypes = {
|
||||
|
||||
Reference in New Issue
Block a user