Show current selected language (#3429)

This commit is contained in:
MeiMei
2018-11-29 21:56:53 +09:00
committed by syuilo
parent 91f624c900
commit 55a57db958
2 changed files with 19 additions and 1 deletions

View File

@ -182,6 +182,7 @@
</optgroup>
</ui-select>
<div class="none ui info">
<div>Current: <i>{{ this.currentLanguage }}</i></div>
<p><fa icon="info-circle"/>{{ $t('language-desc') }}</p>
</div>
</section>
@ -350,6 +351,7 @@ export default Vue.extend({
meta: null,
version,
langs,
currentLanguage: 'Unknown',
latestVersion: undefined,
checkingForUpdate: false
};
@ -554,6 +556,12 @@ export default Vue.extend({
this.$root.getMeta().then(meta => {
this.meta = meta;
});
try {
const locale = JSON.parse(localStorage.getItem('locale') || "{}");
const localeKey = localStorage.getItem('localeKey');
this.currentLanguage = `${locale.meta.lang} (${localeKey})`;
} catch { }
},
methods: {
readAllUnreadNotes() {