mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 22:01:09 +02:00
fix(settings): wire ListView to GeneralSection instead of inlining
ListView rendered GlobalSettingsSection directly for the 'general' tab,
so the header unification in GeneralSection.svelte never took effect —
the sticky "App-Einstellungen" pill still leaked through.
- Swap inline block for <GeneralSection />
- Carry showTheme={false} into GeneralSection (Themes is its own app)
- Drop now-unused GlobalSettingsSection/userSettings/onMount/SettingsPanel imports
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
aebbcdd1c3
commit
cacbfb0764
2 changed files with 4 additions and 17 deletions
|
|
@ -17,5 +17,5 @@
|
|||
title="Allgemein"
|
||||
description="Theme, Sprache & Benachrichtigungen"
|
||||
/>
|
||||
<GlobalSettingsSection {userSettings} appId="mana" title="" />
|
||||
<GlobalSettingsSection {userSettings} appId="mana" showTheme={false} title="" />
|
||||
</SettingsPanel>
|
||||
|
|
|
|||
|
|
@ -3,25 +3,18 @@
|
|||
credits, data). Profile and Themes live in their own workbench apps.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { tick } from 'svelte';
|
||||
import { APP_VERSION } from '$lib/version';
|
||||
import { GlobalSettingsSection } from '@mana/shared-ui';
|
||||
import { userSettings } from '$lib/stores/user-settings.svelte';
|
||||
import SettingsSidebar from '$lib/components/settings/SettingsSidebar.svelte';
|
||||
import type { CategoryId, SearchEntry } from '$lib/components/settings/searchIndex';
|
||||
import GeneralSection from '$lib/components/settings/sections/GeneralSection.svelte';
|
||||
import AiSection from '$lib/components/settings/sections/AiSection.svelte';
|
||||
import SecuritySection from '$lib/components/settings/sections/SecuritySection.svelte';
|
||||
import CreditsSection from '$lib/components/settings/sections/CreditsSection.svelte';
|
||||
import DataSection from '$lib/components/settings/sections/DataSection.svelte';
|
||||
import SettingsPanel from '$lib/components/settings/SettingsPanel.svelte';
|
||||
|
||||
let activeCategory = $state<CategoryId>('general');
|
||||
|
||||
onMount(() => {
|
||||
void userSettings.load();
|
||||
});
|
||||
|
||||
function jumpTo(entry: SearchEntry) {
|
||||
activeCategory = entry.category;
|
||||
void tick().then(() => {
|
||||
|
|
@ -32,17 +25,11 @@
|
|||
</script>
|
||||
|
||||
<div class="settings-page">
|
||||
<SettingsSidebar
|
||||
{activeCategory}
|
||||
onSelect={(id) => (activeCategory = id)}
|
||||
onJump={jumpTo}
|
||||
/>
|
||||
<SettingsSidebar {activeCategory} onSelect={(id) => (activeCategory = id)} onJump={jumpTo} />
|
||||
|
||||
<div class="settings-content">
|
||||
{#if activeCategory === 'general'}
|
||||
<SettingsPanel id="global" padded={false}>
|
||||
<GlobalSettingsSection {userSettings} appId="mana" showTheme={false} />
|
||||
</SettingsPanel>
|
||||
<GeneralSection />
|
||||
{:else if activeCategory === 'ai'}
|
||||
<AiSection />
|
||||
{:else if activeCategory === 'security'}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue