Add per account locale setting

Add a per user account setting for the locale so that the server can
correctly render pages with localized time formatting.
This commit is contained in:
Hornwitser 2025-06-13 21:50:22 +02:00
parent fad1bb2482
commit fb7a60db28
5 changed files with 28 additions and 0 deletions

View file

@ -10,6 +10,10 @@
Timezone
<input type="text" v-model="timezone" :placeholder="accountStore.defaultTimezone">
</label>
<label>
Locale
<input type="text" v-model="locale" :placeholder="accountStore.defaultLocale">
</label>
<button type="submit">
Save
</button>
@ -38,6 +42,7 @@ const sessionStore = useSessionStore();
const accountStore = useAccountStore();
const timezone = ref(accountStore.timezone ?? "");
const locale = ref(accountStore.locale ?? "");
async function changeSettings() {
try {
@ -45,6 +50,7 @@ async function changeSettings() {
method: "patch",
body: {
timezone: timezone.value,
locale: locale.value,
}
});
await sessionStore.fetch();