This commit is contained in:
tamaina
2019-04-19 11:07:54 +09:00
committed by Satsuki Yanagi
parent c2fc637575
commit 2afcdda058
5 changed files with 65 additions and 8 deletions

View File

@ -0,0 +1,40 @@
<template>
<ui-card>
<template #title><fa :icon="faMobile"/> {{ $t('title') }}</template>
<section class="fit-top">
<ui-select v-model="lang" :placeholder="$t('select-app-type')">
<option v-for="x in ['auto', 'desktop', 'mobile']" :value="x" :key="x">{{ $t(`choices.${x}`) }}</option>
</ui-select>
<ui-info>Current: <i>{{ $t(currentAppType) }}</i></ui-info>
<ui-info warn>{{ $t('info') }}</ui-info>
</section>
</ui-card>
</template>
<script lang="ts">
import Vue from 'vue';
import i18n from '../../../../i18n';
import { langs } from '../../../../config';
import { faMobile } from '@fortawesome/free-solid-svg-icons'
export default Vue.extend({
i18n: i18n('common/views/components/settings/client-mode.vue'),
data() {
return {
langs,
currentAppType: (window as any).appType,
faMobile
};
},
computed: {
appTypeForce: {
get() { return this.$store.state.device.appTypeForce; },
set(value) { this.$store.commit('device/set', { key: 'appTypeForce', value }); }
},
},
});
</script>

View File

@ -163,6 +163,7 @@
</ui-card>
<x-language/>
<x-app-type/>
</template>
<template v-if="page == null || page == 'notification'">
@ -271,6 +272,7 @@ import XPassword from './password.vue';
import XProfile from './profile.vue';
import XApi from './api.vue';
import XLanguage from './language.vue';
import XAppType from './app-type.vue';
import XNotification from './notification.vue';
import { url, version } from '../../../../config';
@ -291,6 +293,7 @@ export default Vue.extend({
XProfile,
XApi,
XLanguage,
XAppType,
XNotification,
},
props: {