0 |
From 714841ef1f7f79ffa14f19cd66d31e5652666e3c Mon Sep 17 00:00:00 2001 |
1 |
From: jadedctrl <jadedctrl@Posteo.net> |
2 |
Date: Sun, 30 Jul 2023 12:01:32 -0500 |
3 |
Subject: [PATCH] Implicita lingvo estu Esperanto |
4 |
|
5 |
--- |
6 |
src/boot/after_store.js | 5 +++++ |
7 |
1 file changed, 5 insertions(+) |
8 |
|
9 |
diff --git a/src/boot/after_store.js b/src/boot/after_store.js |
10 |
index 9c1f007b..cb45b911 100644 |
11 |
--- a/src/boot/after_store.js |
12 |
+++ b/src/boot/after_store.js |
13 |
@@ -1,3 +1,4 @@ |
14 |
+import Cookies from 'js-cookie' |
15 |
import { createApp } from 'vue' |
16 |
import { createRouter, createWebHistory } from 'vue-router' |
17 |
import vClickOutside from 'click-outside-vue3' |
18 |
@@ -62,6 +63,10 @@ const getInstanceConfig = async ({ store }) => { |
19 |
store.dispatch('setInstanceOption', { name: 'accountApprovalRequired', value: data.approval_required }) |
20 |
store.dispatch('setInstanceOption', { name: 'birthdayRequired', value: !!data.pleroma.metadata.birthday_required }) |
21 |
store.dispatch('setInstanceOption', { name: 'birthdayMinAge', value: data.pleroma.metadata.birthday_min_age || 0 }) |
22 |
+ // don't override cookie if set |
23 |
+ if (!Cookies.get('userLanguage')) { |
24 |
+ store.dispatch('setOption', { name: 'interfaceLanguage', value: 'eo' }) |
25 |
+ } |
26 |
|
27 |
if (vapidPublicKey) { |
28 |
store.dispatch('setInstanceOption', { name: 'vapidPublicKey', value: vapidPublicKey }) |
29 |
-- |
30 |
2.40.1 |
31 |
|