1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-23 22:56:09 +09:00
elk/pages/settings.vue

69 lines
2.0 KiB
Vue
Raw Normal View History

<script lang="ts" setup>
definePageMeta({
wideLayout: true,
})
const route = useRoute()
const isRootPath = computedEager(() => route.name === 'settings')
</script>
<template>
<div>
<div min-h-screen flex>
<div border="e base" :class="isRootPath ? 'block lg:flex-none flex-1' : 'hidden lg:block'">
<MainContent>
<template #title>
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
<div i-ri:settings-4-line />
<span>{{ $t('nav.settings') }}</span>
</div>
</template>
<div xl:w-97 lg:w-78 w-full>
2023-01-03 05:19:36 +09:00
<SettingsItem
v-if="isHydrated && currentUser "
command
icon="i-ri:user-line"
:text="$t('settings.profile.label')"
to="/settings/profile"
/>
2023-01-03 05:19:36 +09:00
<SettingsItem
command
icon="i-ri-compasses-2-line"
:text="$t('settings.interface.label')"
to="/settings/interface"
/>
2023-01-03 05:19:36 +09:00
<SettingsItem
command
icon="i-ri-globe-line"
:text="$t('settings.language.label')"
to="/settings/language"
/>
2023-01-03 05:19:36 +09:00
<SettingsItem
command
icon="i-ri:settings-2-line"
:text="$t('settings.preferences.label')"
to="/settings/preferences"
/>
2023-01-03 05:19:36 +09:00
<SettingsItem
command
icon="i-ri-group-line"
:text="$t('settings.users.label')"
to="/settings/users"
/>
2023-01-03 05:19:36 +09:00
<SettingsItem
command
icon="i-ri:information-line"
:text="$t('settings.about.label')"
to="/settings/about"
/>
</div>
</MainContent>
</div>
<div flex-1 :class="isRootPath ? 'hidden lg:block' : 'block'">
<NuxtPage />
</div>
</div>
</div>
</template>