elk/pages/settings.vue

91 lines
2.8 KiB
Vue
Raw Permalink Normal View History

<script lang="ts" setup>
definePageMeta({
wideLayout: true,
})
2023-01-04 16:57:12 +03:00
const { t } = useI18n()
useHydratedHead({
2023-01-04 16:57:12 +03:00
title: () => t('nav.settings'),
})
const route = useRoute()
const isRootPath = computed(() => 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>
2023-01-05 02:17:30 +03:00
<div timeline-title-style flex items-center gap-2 @click="$scrollToTop">
2023-01-03 20:16:04 +03:00
<div i-ri:settings-3-line />
<span>{{ $t('nav.settings') }}</span>
</div>
</template>
<div xl:w-97 lg:w-78 w-full>
2023-01-02 23:19:36 +03:00
<SettingsItem
v-if="currentUser"
command
icon="i-ri:user-line"
:text="$t('settings.profile.label')"
to="/settings/profile"
2023-01-22 22:53:04 +03:00
:match="$route.path.startsWith('/settings/profile/')"
/>
2023-01-02 23:19:36 +03:00
<SettingsItem
command
icon="i-ri-compasses-2-line"
:text="$t('settings.interface.label')"
to="/settings/interface"
2023-01-22 22:53:04 +03:00
:match="$route.path.startsWith('/settings/interface/')"
/>
<SettingsItem
v-if="currentUser"
command
icon="i-ri:notification-badge-line"
:text="$t('settings.notifications_settings')"
to="/settings/notifications"
2023-01-22 22:53:04 +03:00
:match="$route.path.startsWith('/settings/notifications/')"
/>
2023-01-02 23:19:36 +03:00
<SettingsItem
command
icon="i-ri-globe-line"
:text="$t('settings.language.label')"
to="/settings/language"
2023-01-22 22:53:04 +03:00
:match="$route.path.startsWith('/settings/language/')"
/>
2023-01-02 23:19:36 +03:00
<SettingsItem
command
2023-01-03 20:16:04 +03:00
icon="i-ri-equalizer-line"
:text="$t('settings.preferences.label')"
to="/settings/preferences"
2023-01-22 22:53:04 +03:00
:match="$route.path.startsWith('/settings/preferences/')"
/>
2023-01-02 23:19:36 +03:00
<SettingsItem
command
icon="i-ri-group-line"
:text="$t('settings.users.label')"
to="/settings/users"
2023-01-22 22:53:04 +03:00
:match="$route.path.startsWith('/settings/users/')"
/>
2023-01-02 23:19:36 +03:00
<SettingsItem
command
icon="i-ri:information-line"
:text="$t('settings.about.label')"
to="/settings/about"
2023-01-22 22:53:04 +03:00
:match="$route.path.startsWith('/settings/about/')"
/>
</div>
</MainContent>
</div>
<div flex-1 :class="isRootPath ? 'hidden lg:block' : 'block'">
<ClientOnly>
<NuxtPage />
</ClientOnly>
</div>
</div>
</div>
</template>