refs #948 Hide auto-login setting on darwin

This commit is contained in:
AkiraFukushima 2019-09-26 23:02:48 +09:00
parent b5727ca80c
commit 8ca4d4ba8d
2 changed files with 14 additions and 6 deletions

View File

@ -24,7 +24,7 @@
<el-switch id="hideAllAttachments" v-model="timeline_hide_attachments" active-color="#13ce66"> </el-switch>
</el-form-item>
</el-form>
<el-form class="other section" label-position="right" label-width="250px" size="small">
<el-form class="other section" label-position="right" label-width="250px" size="small" v-if="notDarwin">
<h3>{{ $t('preferences.general.other.title') }}</h3>
<el-form-item for="launch" :label="$t('preferences.general.other.launch')">
<el-switch id="launch" v-model="other_launch" active-color="#13ce66"> </el-switch>
@ -34,14 +34,15 @@
</template>
<script>
import { mapState } from 'vuex'
import { mapState, mapGetters } from 'vuex'
export default {
name: 'general',
computed: {
...mapState({
loading: state => state.Preferences.General.loading
...mapState('Preferences/General', {
loading: state => state.loading
}),
...mapGetters('Preferences/General', ['notDarwin']),
sound_fav_rb: {
get() {
return this.$store.state.Preferences.General.general.sound.fav_rb

View File

@ -1,5 +1,5 @@
import { ipcRenderer } from 'electron'
import { Module, MutationTree, ActionTree } from 'vuex'
import { Module, MutationTree, ActionTree, GetterTree } from 'vuex'
import { RootState } from '@/store'
import { Sound } from '~/src/types/sound'
import { Timeline } from '~/src/types/timeline'
@ -139,9 +139,16 @@ const actions: ActionTree<GeneralState, RootState> = {
}
}
const getters: GetterTree<GeneralState, RootState> = {
notDarwin: () => {
return process.platform !== 'darwin'
}
}
export default {
namespaced: true,
state: state,
mutations: mutations,
actions: actions
actions: actions,
getters: getters
} as Module<GeneralState, RootState>