diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2024-12-22 23:55:52 +0100 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2024-12-22 23:55:52 +0100 |
commit | f1dee718da95836ffa5c0985c9e8f5643e0f3f6f (patch) | |
tree | 24967a28bcae1fc1e5b08da9f58bcc678ed52937 /src-vue/src/components/LanguageSelector.vue | |
parent | cc5ae684221d3165479d7a68556a2bb6fa81cf3a (diff) | |
download | FlightCore-f1dee718da95836ffa5c0985c9e8f5643e0f3f6f.tar.gz FlightCore-f1dee718da95836ffa5c0985c9e8f5643e0f3f6f.zip |
dev: Replace with sample Tauri 2.0 project
as a first step to convert FlightCore to Tauri 2.0
Diffstat (limited to 'src-vue/src/components/LanguageSelector.vue')
-rw-r--r-- | src-vue/src/components/LanguageSelector.vue | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/src-vue/src/components/LanguageSelector.vue b/src-vue/src/components/LanguageSelector.vue deleted file mode 100644 index 0c47e674..00000000 --- a/src-vue/src/components/LanguageSelector.vue +++ /dev/null @@ -1,75 +0,0 @@ -<template> - <el-select v-model="value" class="m-2" - :placeholder="$t('settings.language_select')" size="large" - @change="onChange" - > - <el-option - v-for="item in options" - :key="item.value" - :label="item.label" - :value="item.value" - /> - </el-select> -</template> - -<script lang="ts"> -import { defineComponent } from 'vue'; -import { Store } from 'tauri-plugin-store-api'; -const persistentStore = new Store('flight-core-settings.json'); - -export default defineComponent({ - name: 'LanguageSelector', - data: () => ({ - value: '', - options: [ - { - value: 'en', - label: 'English' - }, - { - value: 'fr', - label: 'Français' - }, - { - value: 'de', - label: 'Deutsch' - }, - { - value: 'es', - label: 'Español' - }, - { - value: 'pl', - label: 'polski' - }, - { - value: 'ru', - label: 'русский' - }, - { - value: 'it', - label: 'Italiano' - }, - { - value: 'da', - label: 'Dansk' - }, - { - value: 'zh_Hans', - label: '简体中文' - }, - ] - }), - mounted: async function () { - const lang: string = await persistentStore.get('lang') as string; - this.value = lang; - }, - methods: { - async onChange(value: string) { - this.$root!.$i18n.locale = value; - persistentStore.set('lang', value); - await persistentStore.save(); - } - } -}) -</script> |