feat: collapse admin settings by default
This commit is contained in:
@@ -701,7 +701,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if active === "settings"}
|
{#if active === "settings"}
|
||||||
<SettingsSection {at} {isCompact} {onSettingsSaved} {currentLang} />
|
<SettingsSection {at} {onSettingsSaved} {currentLang} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/key}
|
{/key}
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
export let at;
|
export let at;
|
||||||
export let onSettingsSaved;
|
export let onSettingsSaved;
|
||||||
export let isCompact = false;
|
|
||||||
export let currentLang = "ru";
|
export let currentLang = "ru";
|
||||||
|
|
||||||
const settingsStore = getContext("settingsStore");
|
const settingsStore = getContext("settingsStore");
|
||||||
@@ -49,14 +48,7 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
settingsStore.loadSettings().then(() => {
|
settingsStore.loadSettings();
|
||||||
if ($settingsStore.settingsSections.length) {
|
|
||||||
const ids = $settingsStore.settingsSections
|
|
||||||
.filter((s) => s.id !== "appearance")
|
|
||||||
.map((s) => s.id);
|
|
||||||
settingsOpenSections = isCompact ? ids.slice(0, 1) : ids.slice();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user