diff --git a/app.vue b/app.vue index 95ced67..ff4b6c3 100644 --- a/app.vue +++ b/app.vue @@ -33,7 +33,8 @@ body { /* GLOBAL */ .btn, -.select { +.select, +.input { min-height: 2.5rem; height: 2.5rem; } diff --git a/locales/en.json b/locales/en.json index a6c8dbc..631296a 100644 --- a/locales/en.json +++ b/locales/en.json @@ -13,6 +13,8 @@ "change_password": "Change password", "confirm_new_password": "Confirm new password", "current_password": "Current password", + "edit_browser_settings": "Edit browser only settings", + "edit_personal_settings": "Edit personal information", "footerlink_administration": "Administration", "footerlink_documentation": "Documentation", "footerlink_edit": "Edit my profile", @@ -20,6 +22,7 @@ "form_has_errors": "The form contains some errors", "fullname": "Full name", "good_practices_about_user_password": "Pick a user password of at least 8 characters - though it is good practice to use longer ones (i.e. a passphrase) and/or use various kind of characters (uppercase, lowercase, digits and special characters).", + "language": "Language", "logged_out": "Logged out", "login": "Log in", "logout": "Log out", @@ -37,6 +40,7 @@ "remove": "Remove", "save": "Save", "skip_to_main_content": "Skip to main content", + "theme": "Theme", "username": "Username", "v": { "email": "Invalid email: must be alphanumeric and '_.' characters only (e.g. someone{'@'}example.com, s0me-1{'@'}example.com)", diff --git a/nuxt.config.ts b/nuxt.config.ts index 6efc67e..2dfe916 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -39,7 +39,6 @@ export default defineNuxtConfig({ strategy: 'no_prefix', lazy: true, langDir: 'locales', - defaultLocale: 'en', locales: locales as LocaleObject[], }, colorMode: { diff --git a/pages/edit.vue b/pages/edit.vue index d5f8ebf..6d71d5b 100644 --- a/pages/edit.vue +++ b/pages/edit.vue @@ -5,7 +5,7 @@ import * as yup from 'yup' import { pick, exclude } from '@/utils/common' import type { User } from '@/composables/states' -const { t } = useI18n() +const { t, locale, locales } = useI18n() useHead({ title: t('footerlink_edit'), @@ -13,6 +13,54 @@ useHead({ const user = await useUser() +// Browser +const localesAsOptions = computed(() => { + return locales.value.map((locale) => ({ + text: locale.name, + value: locale.code, + })) +}) + +const colorMode = useColorMode() +const themesAsOptions = [ + 'system', + 'light', + 'dark', + 'cupcake', + 'bumblebee', + 'emerald', + 'corporate', + 'synthwave', + 'retro', + 'cyberpunk', + 'valentine', + 'halloween', + 'garden', + 'forest', + 'aqua', + 'lofi', + 'pastel', + 'fantasy', + 'wireframe', + 'black', + 'luxury', + 'dracula', + 'cmyk', + 'autumn', + 'business', + 'acid', + 'lemonade', + 'night', + 'coffee', + 'winter', + 'dim', + 'nord', + 'sunset', +].map((theme) => ({ + text: theme.charAt(0).toUpperCase() + theme.slice(1), + value: theme, +})) +// Server const loading: Ref = ref(false) const feedback: Ref<{ variant: 'success' | 'warning' | 'error' @@ -121,10 +169,53 @@ const onSubmit = handleSubmit(async (form) => {
-
-
-
- + + +
+ +
+ + + +
+ + + +
+

{{ t('edit_personal_settings') }}

+ +
+
+
+ - - + + + + - - + +
- +
+ {{ $t('change_password') }} + + + + + + + + + + + + +
-
- {{ $t('change_password') }} + + - - - + + - - - - - - - -
-
- - - - - - - -
- - {{ $t('cancel') }} - - -
- +
+ + {{ $t('cancel') }} + + +
+ +