feat: save subscribed community collapsed state on refresh

This commit is contained in:
Xylight committed 2024-03-04 18:06:23 -08:00
1 parent fb92da4a27
commit a5287b03e8
3 files changed
+3 -5

No files matched your search

+1 -1
View File
@@ -83,7 +83,7 @@
<hr class="border-slate-200 dark:border-zinc-800 my-1" /> <hr class="border-slate-200 dark:border-zinc-800 my-1" />
{/if} {/if}
<Expandable open> <Expandable bind:open={$userSettings.expandCommunities}>
<span <span
slot="title" slot="title"
class="px-2 py-1 w-full {$userSettings.expandSidebar class="px-2 py-1 w-full {$userSettings.expandSidebar
+2
View File
@@ -48,6 +48,7 @@ interface Settings {
removed: boolean removed: boolean
} }
expandSidebar: boolean expandSidebar: boolean
expandCommunities: boolean
notifications: { notifications: {
enabled: boolean enabled: boolean
pollRate: number pollRate: number
@@ -101,6 +102,7 @@ export const defaultSettings: Settings = {
removed: toBool(env.PUBLIC_HIDE_REMOVED) ?? false, removed: toBool(env.PUBLIC_HIDE_REMOVED) ?? false,
}, },
expandSidebar: toBool(env.PUBLIC_EXPAND_SIDEBAR) ?? true, expandSidebar: toBool(env.PUBLIC_EXPAND_SIDEBAR) ?? true,
expandCommunities: true,
notifications: { notifications: {
enabled: false, enabled: false,
pollRate: 60 * 1000, pollRate: 60 * 1000,
-4
View File
@@ -57,10 +57,6 @@
<Icon src={ArrowDownTray} size="16" mini /> <Icon src={ArrowDownTray} size="16" mini />
Export Export
</Button> </Button>
<Button on:click={() => {}} size="lg">
<Icon src={Bookmark} size="16" mini />
Save
</Button>
</div> </div>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-2"> <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-2">
{#each svelteIntellisenseSucks() as category} {#each svelteIntellisenseSucks() as category}