elk/pages/settings.vue

82 lines
2.3 KiB
Vue
Raw Normal View History

<script lang="ts" setup>
definePageMeta({
wideLayout: true,
})
2023-01-09 21:20:26 +01:00
const { $t } = useFluent()
2023-01-04 14:57:12 +01:00
useHeadFixed({
2023-01-09 21:20:26 +01:00
title: () => $t('nav_settings'),
2023-01-04 14:57:12 +01:00
})
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>
2023-01-05 00:17:30 +01:00
<div timeline-title-style flex items-center gap-2 @click="$scrollToTop">
2023-01-03 18:16:04 +01:00
<div i-ri:settings-3-line />
2023-01-09 21:20:26 +01:00
<span>{{ $t('nav_settings') }}</span>
</div>
</template>
<div xl:w-97 lg:w-78 w-full>
2023-01-02 21:19:36 +01:00
<SettingsItem
v-if="isHydrated && currentUser "
command
icon="i-ri:user-line"
2023-01-09 21:20:26 +01:00
:text="$t('settings_profile_label')"
to="/settings/profile"
/>
2023-01-02 21:19:36 +01:00
<SettingsItem
command
icon="i-ri-compasses-2-line"
2023-01-09 21:20:26 +01:00
:text="$t('settings_interface_label')"
to="/settings/interface"
/>
<SettingsItem
v-if="isHydrated && currentUser"
command
icon="i-ri:notification-badge-line"
2023-01-09 21:20:26 +01:00
:text="$t('settings_notifications_settings')"
to="/settings/notifications"
/>
2023-01-02 21:19:36 +01:00
<SettingsItem
command
icon="i-ri-globe-line"
2023-01-09 21:20:26 +01:00
:text="$t('settings_language_label')"
to="/settings/language"
/>
2023-01-02 21:19:36 +01:00
<SettingsItem
command
2023-01-03 18:16:04 +01:00
icon="i-ri-equalizer-line"
2023-01-09 21:20:26 +01:00
:text="$t('settings_preferences_label')"
to="/settings/preferences"
/>
2023-01-02 21:19:36 +01:00
<SettingsItem
command
icon="i-ri-group-line"
2023-01-09 21:20:26 +01:00
:text="$t('settings_users_label')"
to="/settings/users"
/>
2023-01-02 21:19:36 +01:00
<SettingsItem
command
icon="i-ri:information-line"
2023-01-09 21:20:26 +01:00
: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>