mirror of
https://codeberg.org/SafeTwitch/safetwitch.git
synced 2024-12-22 05:12:57 -05:00
removed unused code
This commit is contained in:
parent
b16e62cdd5
commit
9aad0a0b39
1 changed files with 0 additions and 46 deletions
|
@ -1,46 +0,0 @@
|
|||
<template>
|
||||
<div class="flex">
|
||||
<select
|
||||
v-model="$i18n.locale"
|
||||
@change="onChange()"
|
||||
class="my-auto p-0 pr-9 bg-transparent border-0"
|
||||
:selected="$i18n.locale"
|
||||
>
|
||||
<option v-for="(lang, i) in langs" :key="`Lang${i}`" :value="lang">
|
||||
{{ names[i] }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
setup() {
|
||||
return {
|
||||
langs: ['en-US', 'es-ES', 'nl-NL', 'pt-PT', 'fa-IR', 'he-IL', 'ru-RU', 'ko-KR'],
|
||||
names: [
|
||||
'English',
|
||||
'Español',
|
||||
'Nederlands',
|
||||
'Português',
|
||||
'فارسی',
|
||||
'עִבְרִית',
|
||||
'Русский',
|
||||
'한국어'
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const savedLocale = localStorage.getItem('language')
|
||||
if (savedLocale != null && this.langs.includes(savedLocale)) {
|
||||
this.$i18n.locale = savedLocale
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onChange() {
|
||||
localStorage.setItem('language', this.$i18n.locale)
|
||||
window.location.reload()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in a new issue