Optimize UI
This commit is contained in:
parent
52eef2eed1
commit
7e2ae2ba95
|
@ -3,11 +3,13 @@
|
||||||
<label>
|
<label>
|
||||||
{{ promptText }}
|
{{ promptText }}
|
||||||
</label>
|
</label>
|
||||||
<ol>
|
<ul class="setting-list">
|
||||||
<li
|
<li
|
||||||
v-for="index of controlledLanguage.keys()"
|
v-for="index of controlledLanguage.keys()"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
|
<label>
|
||||||
|
{{ index === 0 ? $t('settings.primary_language') : $tc('settings.fallback_language', index, { index }) }}
|
||||||
<Select
|
<Select
|
||||||
class="language-select"
|
class="language-select"
|
||||||
:model-value="controlledLanguage[index]"
|
:model-value="controlledLanguage[index]"
|
||||||
|
@ -21,11 +23,14 @@
|
||||||
{{ lang.name }}
|
{{ lang.name }}
|
||||||
</option>
|
</option>
|
||||||
</Select>
|
</Select>
|
||||||
|
</label>
|
||||||
<button
|
<button
|
||||||
v-if="controlledLanguage.length > 1"
|
v-if="controlledLanguage.length > 1 && index !== 0"
|
||||||
class="button-default btn"
|
class="button-default btn"
|
||||||
@click="() => removeLanguageAt(index)"
|
@click="() => removeLanguageAt(index)"
|
||||||
>{{ $t('settings.remove_language') }}</button>
|
>
|
||||||
|
{{ $t('settings.remove_language') }}
|
||||||
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<button
|
<button
|
||||||
|
@ -33,7 +38,7 @@
|
||||||
@click="addLanguage"
|
@click="addLanguage"
|
||||||
>{{ $t('settings.add_language') }}</button>
|
>{{ $t('settings.add_language') }}</button>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -334,8 +334,10 @@
|
||||||
"select_all": "Select all"
|
"select_all": "Select all"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"add_language": "Add another language",
|
"add_language": "Add fallback language",
|
||||||
"remove_language": "Remove",
|
"remove_language": "Remove",
|
||||||
|
"primary_language": "Primary language:",
|
||||||
|
"fallback_language": "Fallback language {index}:",
|
||||||
"app_name": "App name",
|
"app_name": "App name",
|
||||||
"expert_mode": "Show advanced",
|
"expert_mode": "Show advanced",
|
||||||
"save": "Save changes",
|
"save": "Save changes",
|
||||||
|
|
|
@ -273,8 +273,13 @@ const instance = {
|
||||||
langList
|
langList
|
||||||
.map(async lang => {
|
.map(async lang => {
|
||||||
if (!state.unicodeEmojiAnnotations[lang]) {
|
if (!state.unicodeEmojiAnnotations[lang]) {
|
||||||
|
try {
|
||||||
const annotations = await loadAnnotations(lang)
|
const annotations = await loadAnnotations(lang)
|
||||||
commit('setUnicodeEmojiAnnotations', { lang, annotations })
|
commit('setUnicodeEmojiAnnotations', { lang, annotations })
|
||||||
|
} catch (e) {
|
||||||
|
console.warn(`Error loading unicode emoji annotations for ${lang}: `, e)
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue