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:
parent
fad1bb2482
commit
fb7a60db28
5 changed files with 28 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue