Whalebird-desktop-client-ma.../src/renderer/components/Settings.vue

109 lines
2.6 KiB
Vue
Raw Normal View History

<template>
<el-container id="settings">
<el-header class="header">
<el-row>
<el-col :span="23">
<h1>{{ $t('settings.title') }}</h1>
</el-col>
<el-col :span="1">
2022-04-19 14:05:32 +02:00
<el-button type="text" @click="close" class="close-button" role="button">
<font-awesome-icon icon="xmark" />
</el-button>
</el-col>
</el-row>
</el-header>
<el-container>
<div></div>
<el-aside width="240px" class="menu">
<el-menu
:default-active="activeRoute()"
class="setting-menu"
:text-color="primaryColor"
:background-color="backgroundColor"
:router="true"
>
<el-menu-item :index="`/${id()}/settings/general`">
<font-awesome-icon icon="gear" class="icon" size="lg" />
<span>{{ $t('settings.general.title') }}</span>
</el-menu-item>
<el-menu-item :index="`/${id()}/settings/timeline`">
<font-awesome-icon icon="align-left" class="icon" size="lg" />
<span>{{ $t('settings.timeline.title') }}</span>
</el-menu-item>
2021-05-08 13:59:59 +02:00
<el-menu-item :index="`/${id()}/settings/filters`">
<font-awesome-icon icon="filter" class="icon" size="lg" />
2021-05-08 13:59:59 +02:00
<span>{{ $t('settings.filters.title') }}</span>
</el-menu-item>
</el-menu>
</el-aside>
<el-main>
<router-view></router-view>
</el-main>
</el-container>
2018-10-26 17:23:12 +02:00
</el-container>
</template>
<script>
2018-10-26 17:23:12 +02:00
import { mapState } from 'vuex'
export default {
2018-10-26 17:23:12 +02:00
name: 'Settings',
computed: {
...mapState({
2022-04-19 14:05:32 +02:00
primaryColor: state => state.App.theme.primary_color,
backgroundColor: state => state.App.theme.background_color
})
2018-10-26 17:23:12 +02:00
},
created() {
this.$store.commit('Settings/changeAccountID', this.id())
2018-10-26 17:23:12 +02:00
this.$router.push(`/${this.id()}/settings/general`)
},
methods: {
id() {
2018-10-26 17:23:12 +02:00
return this.$route.params.id
},
close() {
2018-10-26 17:23:12 +02:00
this.$router.push(`/${this.id()}/home`)
},
activeRoute() {
2018-10-26 17:23:12 +02:00
return this.$route.path
2022-04-19 14:05:32 +02:00
}
}
}
</script>
<style lang="scss" scoped>
2018-10-26 17:23:12 +02:00
#settings {
height: 100%;
overflow: auto;
2018-10-26 17:23:12 +02:00
.header {
text-align: center;
border-bottom: 1px solid var(--theme-border-color);
2018-12-12 01:19:47 +01:00
user-select: none;
2018-10-26 17:23:12 +02:00
}
.close-button {
2018-12-12 01:19:47 +01:00
font-size: 28px;
2018-10-26 17:23:12 +02:00
}
.menu {
text-align: right;
padding-left: 24px;
.el-menu {
border-right: solid 1px var(--theme-border-color);
}
.setting-menu /deep/ {
height: 100%;
2018-12-12 01:19:47 +01:00
user-select: none;
2018-10-26 17:23:12 +02:00
.icon {
margin-right: 9px;
}
}
}
}
</style>