2018-06-05 12:36:21 +00:00
|
|
|
<template>
|
|
|
|
<mk-ui :class="$style.root">
|
2018-06-05 19:00:48 +00:00
|
|
|
<div class="qlvquzbjribqcaozciifydkngcwtyzje" :data-darkmode="$store.state.device.darkmode">
|
2018-06-05 18:12:06 +00:00
|
|
|
<template v-for="column in columns">
|
|
|
|
<x-notifications-column v-if="column.type == 'notifications'" :key="column.id"/>
|
|
|
|
<x-tl-column v-if="column.type == 'home'" :key="column.id" src="home"/>
|
|
|
|
<x-tl-column v-if="column.type == 'local'" :key="column.id" src="local"/>
|
|
|
|
<x-tl-column v-if="column.type == 'global'" :key="column.id" src="global"/>
|
|
|
|
</template>
|
2018-06-05 19:00:48 +00:00
|
|
|
<button>%fa:plus%</button>
|
2018-06-05 12:36:21 +00:00
|
|
|
</div>
|
|
|
|
</mk-ui>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-06-05 13:54:03 +00:00
|
|
|
import XTlColumn from './deck.tl-column.vue';
|
2018-06-05 14:19:04 +00:00
|
|
|
import XNotificationsColumn from './deck.notifications-column.vue';
|
2018-06-05 18:12:06 +00:00
|
|
|
import * as uuid from 'uuid';
|
2018-06-05 12:36:21 +00:00
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
components: {
|
2018-06-05 14:19:04 +00:00
|
|
|
XTlColumn,
|
|
|
|
XNotificationsColumn
|
2018-06-05 18:12:06 +00:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
columns() {
|
|
|
|
if (this.$store.state.settings.deck == null) return [];
|
|
|
|
return this.$store.state.settings.deck.columns;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
if (this.$store.state.settings.deck == null) {
|
|
|
|
const deck = {
|
|
|
|
columns: [/*{
|
|
|
|
type: 'widgets',
|
|
|
|
widgets: []
|
|
|
|
}, */{
|
|
|
|
id: uuid(),
|
|
|
|
type: 'home'
|
|
|
|
}, {
|
|
|
|
id: uuid(),
|
|
|
|
type: 'notifications'
|
|
|
|
}, {
|
|
|
|
id: uuid(),
|
|
|
|
type: 'local'
|
|
|
|
}, {
|
|
|
|
id: uuid(),
|
|
|
|
type: 'global'
|
|
|
|
}]
|
|
|
|
};
|
|
|
|
|
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'deck',
|
|
|
|
value: deck
|
|
|
|
});
|
|
|
|
}
|
2018-06-05 12:36:21 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" module>
|
|
|
|
.root
|
|
|
|
height 100vh
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
@import '~const.styl'
|
|
|
|
|
|
|
|
root(isDark)
|
|
|
|
display flex
|
|
|
|
flex 1
|
2018-06-05 12:44:02 +00:00
|
|
|
padding 16px 0 16px 16px
|
|
|
|
overflow auto
|
2018-06-05 12:36:21 +00:00
|
|
|
|
2018-06-05 19:00:48 +00:00
|
|
|
> div
|
|
|
|
margin-right 16px
|
|
|
|
|
|
|
|
&:last-of-type
|
|
|
|
margin-right 0
|
|
|
|
|
|
|
|
> button
|
|
|
|
padding 0 16px
|
|
|
|
color isDark ? #93a0a5 : #888
|
|
|
|
|
|
|
|
&:hover
|
|
|
|
color isDark ? #b8c5ca : #777
|
|
|
|
|
|
|
|
&:active
|
|
|
|
color isDark ? #fff : #555
|
|
|
|
|
2018-06-05 12:36:21 +00:00
|
|
|
.qlvquzbjribqcaozciifydkngcwtyzje[data-darkmode]
|
|
|
|
root(true)
|
|
|
|
|
|
|
|
.qlvquzbjribqcaozciifydkngcwtyzje:not([data-darkmode])
|
|
|
|
root(false)
|
|
|
|
|
|
|
|
</style>
|