xyyd-fatfox/src/settings/SettingsOverlayContent.tsx

40 lines
1.3 KiB
TypeScript
Raw Normal View History

2024-09-13 12:19:12 +08:00
import useRouterStore from '@/useRouterStore'
import { defineComponent } from 'vue'
2024-09-13 12:19:12 +08:00
import UserPage from '@/user/UserPage'
import BackgroundPage from '@/layout/background/BackgroundPage'
import ThemeProvider from '@/utils/ThemeProvider'
2024-10-10 16:04:00 +08:00
import BlockSettings from '@/layout/grid/BlockSettings'
import SearchSetting from '@/layout/grid/SearchSetting'
2024-10-29 18:47:37 +08:00
import TimeSetting from '@/layout/grid/TimeSetting'
2024-10-30 19:07:10 +08:00
import SiderSetting from '@/layout/grid/SiderSetting'
import DockSetting from '@/layout/grid/DockSetting'
import Reset from '@/layout/grid/Reset'
2024-09-13 12:19:12 +08:00
export default defineComponent(() => {
const router = useRouterStore()
2024-09-13 12:19:12 +08:00
return () => (
2024-10-29 18:47:37 +08:00
<div class="w-0 h-full flex-grow backdrop-blur">
2024-09-13 12:19:12 +08:00
<ThemeProvider>
{router.path === 'settings-user' ? (
<UserPage />
) : router.path === 'settings-background' ? (
<BackgroundPage />
) : router.path === 'settings-block' ? (
<BlockSettings />
) : router.path === 'settings-search' ? (
<SearchSetting />
2024-10-29 18:47:37 +08:00
) : router.path === 'settings-time' ? (
<TimeSetting />
2024-10-30 19:07:10 +08:00
) : router.path === 'settings-sider' ? (
<SiderSetting />
) : router.path === 'settings-dock' ? (
<DockSetting />
) : router.path === 'settings-reset' ? (
<Reset />
) : null}
2024-09-13 12:19:12 +08:00
</ThemeProvider>
</div>
)
})