mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-28 01:04:05 +00:00
Added set language to the Setup.vue
This commit is contained in:
parent
d34ed00841
commit
1b8b33c4c3
3 changed files with 19 additions and 3 deletions
|
@ -108,5 +108,6 @@ export default {
|
|||
"Repeat Password": "Wiederhole das Passwort",
|
||||
"Resource Record Type": "Resource Record Type",
|
||||
respTime: "Antw. Zeit (ms)",
|
||||
notAvailableShort: "N/A"
|
||||
notAvailableShort: "N/A",
|
||||
Create: "Erstellen",
|
||||
}
|
||||
|
|
|
@ -108,5 +108,6 @@ export default {
|
|||
"Create your admin account": "Create your admin account",
|
||||
"Repeat Password": "Repeat Password",
|
||||
respTime: "Resp. Time (ms)",
|
||||
notAvailableShort: "N/A"
|
||||
notAvailableShort: "N/A",
|
||||
Create: "Create",
|
||||
}
|
||||
|
|
|
@ -14,6 +14,15 @@
|
|||
</p>
|
||||
|
||||
<div class="form-floating">
|
||||
<select id="language" v-model="$i18n.locale" class="form-select">
|
||||
<option v-for="(lang, i) in $i18n.availableLocales" :key="`Lang${i}`" :value="lang">
|
||||
{{ $i18n.messages[lang].languageName }}
|
||||
</option>
|
||||
</select>
|
||||
<label for="language" class="form-label">{{ $t("Language") }}</label>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mt-3">
|
||||
<input id="floatingInput" v-model="username" type="text" class="form-control" placeholder="Username" required>
|
||||
<label for="floatingInput">{{ $t("Username") }}</label>
|
||||
</div>
|
||||
|
@ -29,7 +38,7 @@
|
|||
</div>
|
||||
|
||||
<button class="w-100 btn btn-primary mt-3" type="submit" :disabled="processing">
|
||||
Create
|
||||
{{ $t("Create") }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -49,6 +58,11 @@ export default {
|
|||
repeatPassword: "",
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"$i18n.locale"() {
|
||||
localStorage.locale = this.$i18n.locale;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$root.getSocket().emit("needSetup", (needSetup) => {
|
||||
if (! needSetup) {
|
||||
|
|
Loading…
Reference in a new issue