monkeeShark/src/client/app/desktop/views/components/settings.vue

93 lines
2.7 KiB
Vue
Raw Normal View History

2018-02-12 13:18:13 +00:00
<template>
<div class="mk-settings">
<div class="nav" :class="{ inWindow }">
<p :class="{ active: page == 'profile' }" @mousedown="page = 'profile'"><fa icon="user" fixed-width/>{{ $t('@._settings.profile') }}</p>
<p :class="{ active: page == 'appearance' }" @mousedown="page = 'appearance'"><fa icon="palette" fixed-width/>{{ $t('@._settings.appearance') }}</p>
<p :class="{ active: page == 'behavior' }" @mousedown="page = 'behavior'"><fa icon="desktop" fixed-width/>{{ $t('@._settings.behavior') }}</p>
<p :class="{ active: page == 'notification' }" @mousedown="page = 'notification'"><fa :icon="['far', 'bell']" fixed-width/>{{ $t('@._settings.notification') }}</p>
<p :class="{ active: page == 'drive' }" @mousedown="page = 'drive'"><fa icon="cloud" fixed-width/>{{ $t('@.drive') }}</p>
<p :class="{ active: page == 'hashtags' }" @mousedown="page = 'hashtags'"><fa icon="hashtag" fixed-width/>{{ $t('@._settings.tags') }}</p>
<p :class="{ active: page == 'muteAndBlock' }" @mousedown="page = 'muteAndBlock'"><fa icon="ban" fixed-width/>{{ $t('@._settings.mute-and-block') }}</p>
<p :class="{ active: page == 'apps' }" @mousedown="page = 'apps'"><fa icon="puzzle-piece" fixed-width/>{{ $t('@._settings.apps') }}</p>
<p :class="{ active: page == 'security' }" @mousedown="page = 'security'"><fa icon="unlock-alt" fixed-width/>{{ $t('@._settings.security') }}</p>
<p :class="{ active: page == 'api' }" @mousedown="page = 'api'"><fa icon="key" fixed-width/>API</p>
<p :class="{ active: page == 'other' }" @mousedown="page = 'other'"><fa icon="cogs" fixed-width/>{{ $t('@._settings.other') }}</p>
2018-02-12 13:18:13 +00:00
</div>
<div class="pages">
<x-settings :page="page"/>
2018-02-12 13:18:13 +00:00
</div>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import i18n from '../../../i18n';
import XSettings from '../../../common/views/components/settings/settings.vue';
2018-02-19 07:58:37 +00:00
2018-02-12 13:18:13 +00:00
export default Vue.extend({
i18n: i18n(),
2018-02-19 07:58:37 +00:00
components: {
XSettings,
},
props: {
initialPage: {
type: String,
required: false
},
inWindow: {
type: Boolean,
required: false,
default: true
}
2018-02-19 07:58:37 +00:00
},
2018-02-12 13:18:13 +00:00
data() {
return {
page: this.initialPage || 'profile',
2018-02-12 13:18:13 +00:00
};
2018-02-22 17:06:35 +00:00
},
2018-02-12 13:18:13 +00:00
});
</script>
<style lang="stylus" scoped>
2018-09-27 13:25:10 +00:00
.mk-settings
2018-02-12 13:18:13 +00:00
display flex
width 100%
height 100%
> .nav
flex 0 0 200px
width 100%
height 100%
padding 16px 0 0 0
overflow auto
2018-10-18 21:57:57 +00:00
z-index 1
2019-02-06 17:28:08 +00:00
font-size 15px
2018-02-12 13:18:13 +00:00
> p
display block
padding 10px 16px
margin 0
2018-09-27 13:25:10 +00:00
color var(--desktopSettingsNavItem)
2018-02-12 13:18:13 +00:00
cursor pointer
user-select none
transition margin-left 0.2s ease
> [data-icon]
2018-02-12 13:18:13 +00:00
margin-right 4px
&:hover
2018-09-27 13:25:10 +00:00
color var(--desktopSettingsNavItemHover)
2018-02-12 13:18:13 +00:00
&.active
margin-left 8px
2018-09-26 11:19:35 +00:00
color var(--primary) !important
2018-02-12 13:18:13 +00:00
> .pages
width 100%
height 100%
flex auto
overflow auto
background var(--bg)
2018-02-12 13:18:13 +00:00
</style>