Compare commits

..

10 commits

Author SHA1 Message Date
Wampie Driessen
3e4f6be9d8
Merge 1557f58118 into 8a432ac937 2024-11-18 11:35:34 +00:00
Wampie Driessen
1557f58118 Appease vue linter 2024-11-18 12:35:28 +01:00
Wampie Driessen
836199dea5 Fix that localeSelector hides/shows on config change 2024-11-18 12:31:44 +01:00
Wampie Driessen
b75580003f Fix linter warning 2024-11-18 12:07:00 +01:00
Wampie Driessen
c3b4ad85e5 Convert migration to knex migration 2024-11-18 12:07:00 +01:00
Wampie Driessen
7226686bde Update src/mixins/lang.js 2024-11-18 12:05:28 +01:00
Wampie Driessen
24968f331b Update src/mixins/lang.js 2024-11-18 12:05:28 +01:00
Wampie Driessen
995b115d27 Update src/mixins/lang.js
Co-authored-by: Matthew Nickson <mnickson@sidingsmedia.com>
2024-11-18 12:05:28 +01:00
Wampie Driessen
a483ea6a8f Fix linter issues 2024-11-18 12:05:28 +01:00
Wampie Driessen
457a3e75dd Allow a 'default locale' and locale switcher on status pages 2024-11-18 12:05:24 +01:00

View file

@ -166,7 +166,7 @@
<Editable v-model="config.title" class="title" tag="span" :contenteditable="editMode" :noNL="true" />
<!-- Locale Selector -->
<span class="language-selector">
<span v-if="config.showLocaleSelector" class="language-selector">
<select v-model="$root.language" class="form-select">
<option v-for="locale in $i18n.availableLocales" :key="locale" :value="locale" :text="$i18n.messages[locale].languageName"></option>
</select>
@ -734,10 +734,6 @@ export default {
this.maintenanceList = res.data.maintenanceList;
this.$root.publicGroupList = res.data.publicGroupList;
if (!localStorage.locale && this.config.defaultLocale) {
this.$root.changeCurrentPageLang(this.config.defaultLocale);
}
this.loading = false;
// Configure auto-refresh loop
@ -746,6 +742,10 @@ export default {
}, (this.config.autoRefreshInterval + 10) * 1000);
this.updateUpdateTimer();
if (!localStorage.locale && this.config.defaultLocale) {
this.$root.changeCurrentPageLang(this.config.defaultLocale);
}
}).catch( function (error) {
if (error.response.status === 404) {
location.href = "/page-not-found";