xyyd-fatfox/src/settings/SettingsOverlayContent.tsx

22 lines
689 B
TypeScript
Raw Normal View History

2024-09-13 12:19:12 +08:00
import useRouterStore from '@/useRouterStore'
import { defineComponent, Transition } from 'vue'
import UserPage from '@/user/UserPage'
import BackgroundPage from '@/layout/background/BackgroundPage'
import ThemeProvider from '@/utils/ThemeProvider'
export default defineComponent(() => {
const router = useRouterStore()
return () => (
<div class="w-0 h-full flex-grow bg-white/80 backdrop-blur">
<ThemeProvider>
<Transition>
{router.path === 'settings-user' ? (
<UserPage />
) : router.path === 'settings-background' ? (
<BackgroundPage />
) : null}
</Transition>
</ThemeProvider>
</div>
)
})