2023-07-26 04:09:10 +02:00
|
|
|
<script setup lang="ts">
|
2023-11-25 20:14:12 +01:00
|
|
|
const { t, locales, getBrowserLocale } = useI18n()
|
2023-09-07 18:13:09 +02:00
|
|
|
|
|
|
|
useHead({
|
|
|
|
title: t('footerlink_edit'),
|
|
|
|
})
|
|
|
|
|
2023-11-25 21:28:41 +01:00
|
|
|
const settings = await useSettings()
|
|
|
|
const preferedTheme = await usePreferedTheme()
|
2023-11-25 20:14:12 +01:00
|
|
|
const preferedLocale = usePreferedLocale()
|
|
|
|
|
2023-11-18 17:08:22 +01:00
|
|
|
const localesAsOptions = computed(() => {
|
2023-11-25 20:14:12 +01:00
|
|
|
const options = locales.value.map((locale) => ({
|
2023-11-18 17:08:22 +01:00
|
|
|
text: locale.name,
|
|
|
|
value: locale.code,
|
|
|
|
}))
|
2023-11-25 20:14:12 +01:00
|
|
|
const browserLocale = getBrowserLocale()
|
|
|
|
const browserLocaleName = locales.value.find(
|
|
|
|
(locale) => locale.code === browserLocale,
|
|
|
|
)?.name
|
|
|
|
options.unshift({
|
|
|
|
text: t('automatic', { name: browserLocaleName }),
|
|
|
|
value: 'auto',
|
|
|
|
})
|
|
|
|
|
|
|
|
return options
|
2023-11-18 17:08:22 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
const themesAsOptions = [
|
2023-11-25 21:28:41 +01:00
|
|
|
'auto',
|
2023-11-18 17:08:22 +01:00
|
|
|
'system',
|
2024-08-20 00:13:12 +02:00
|
|
|
// Daisyui default themes
|
2023-11-18 17:08:22 +01:00
|
|
|
'light',
|
2024-08-20 00:13:12 +02:00
|
|
|
// Custom dark
|
2023-11-18 17:08:22 +01:00
|
|
|
'dark',
|
2024-08-20 00:13:12 +02:00
|
|
|
'omg',
|
2024-02-21 14:58:15 +01:00
|
|
|
'legacy',
|
2024-08-20 00:13:12 +02:00
|
|
|
// Daisyui dark
|
|
|
|
'black',
|
2023-11-18 17:08:22 +01:00
|
|
|
'synthwave',
|
|
|
|
'halloween',
|
|
|
|
'coffee',
|
2024-08-20 00:13:12 +02:00
|
|
|
// Daisyui light
|
|
|
|
'cupcake',
|
|
|
|
'cyberpunk',
|
|
|
|
'valentine',
|
2023-11-18 17:08:22 +01:00
|
|
|
'nord',
|
|
|
|
].map((theme) => ({
|
2023-11-25 21:28:41 +01:00
|
|
|
text:
|
|
|
|
theme !== 'auto'
|
|
|
|
? theme.charAt(0).toUpperCase() + theme.slice(1)
|
|
|
|
: t('automatic', { name: settings.value.portal_theme }),
|
2023-11-18 17:08:22 +01:00
|
|
|
value: theme,
|
|
|
|
}))
|
2023-07-26 04:09:10 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-08-06 16:27:24 +02:00
|
|
|
<div>
|
|
|
|
<PageTitle :text="$t('footerlink_edit')" />
|
2023-07-26 04:09:10 +02:00
|
|
|
|
2023-11-25 16:30:49 +01:00
|
|
|
<div class="lg:flex lg:justify-between">
|
|
|
|
<section
|
2024-02-21 00:13:03 +01:00
|
|
|
class="lg:w-1/2 lg:me-20 h-full card card-bordered border-base-300 my-10"
|
2023-11-25 16:30:49 +01:00
|
|
|
>
|
2024-02-21 00:13:03 +01:00
|
|
|
<div class="card-header bg-base-300 py-4 px-8">
|
|
|
|
<h2 class="text-3xl">{{ t('edit_personal_settings') }}</h2>
|
|
|
|
</div>
|
2023-11-18 17:08:22 +01:00
|
|
|
|
2024-02-21 00:13:03 +01:00
|
|
|
<UserInfoForm class="p-8" />
|
2023-11-25 16:30:49 +01:00
|
|
|
</section>
|
2023-11-18 17:08:22 +01:00
|
|
|
|
2024-02-21 00:13:03 +01:00
|
|
|
<section class="lg:w-1/2 card card-bordered border-base-300 my-10">
|
|
|
|
<div class="card-header bg-base-300 py-4 px-8">
|
|
|
|
<h2 class="text-3xl">{{ $t('change_password') }}</h2>
|
|
|
|
</div>
|
2023-11-18 17:08:22 +01:00
|
|
|
|
2024-02-21 00:13:03 +01:00
|
|
|
<UserPasswordForm class="p-8" />
|
2023-11-25 16:30:49 +01:00
|
|
|
</section>
|
|
|
|
</div>
|
2023-11-23 17:18:07 +01:00
|
|
|
|
2024-02-21 00:13:03 +01:00
|
|
|
<section class="card card-bordered border-base-300 my-10">
|
|
|
|
<div class="card-header bg-base-300 py-4 px-8">
|
|
|
|
<h2 class="text-3xl">{{ t('edit_browser_settings') }}</h2>
|
|
|
|
</div>
|
2023-11-23 17:18:07 +01:00
|
|
|
|
2024-02-21 00:13:03 +01:00
|
|
|
<form class="p-8" novalidate @submit.prevent>
|
|
|
|
<div role="group" class="flex flex-wrap align mb-3">
|
2023-11-23 17:18:07 +01:00
|
|
|
<!-- eslint-disable-next-line vuejs-accessibility/label-has-for -->
|
|
|
|
<label for="language" class="label me-3">{{ t('language') }}</label>
|
2023-11-25 20:14:12 +01:00
|
|
|
<select
|
|
|
|
id="language"
|
|
|
|
v-model="preferedLocale"
|
|
|
|
class="select select-bordered"
|
|
|
|
>
|
2023-11-23 17:18:07 +01:00
|
|
|
<option disabled selected>{{ t('language') }}</option>
|
|
|
|
<option
|
|
|
|
v-for="option in localesAsOptions"
|
|
|
|
:key="option.value"
|
|
|
|
:value="option.value"
|
|
|
|
>
|
|
|
|
{{ option.text }}
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
2024-02-21 00:13:03 +01:00
|
|
|
<div role="group" class="flex flex-wrap align">
|
2023-11-23 17:18:07 +01:00
|
|
|
<!-- eslint-disable-next-line vuejs-accessibility/label-has-for -->
|
|
|
|
<label for="theme" class="label me-3">{{ t('theme') }}</label>
|
|
|
|
<select
|
|
|
|
id="theme"
|
2023-11-25 21:28:41 +01:00
|
|
|
v-model="preferedTheme"
|
2023-11-23 17:18:07 +01:00
|
|
|
class="select select-bordered"
|
|
|
|
>
|
|
|
|
<option disabled selected>{{ t('theme') }}</option>
|
|
|
|
<option
|
|
|
|
v-for="option in themesAsOptions"
|
|
|
|
:key="option.value"
|
|
|
|
:value="option.value"
|
|
|
|
>
|
|
|
|
{{ option.text }}
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</section>
|
2023-08-06 16:27:24 +02:00
|
|
|
</div>
|
2023-07-26 04:09:10 +02:00
|
|
|
</template>
|
2024-02-21 00:13:03 +01:00
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.card .card-header {
|
|
|
|
border-top-left-radius: var(--rounded-box);
|
|
|
|
border-top-right-radius: var(--rounded-box);
|
|
|
|
}
|
|
|
|
</style>
|