mirror of
https://github.com/misskey-dev/misskey
synced 2024-12-15 07:09:01 +09:00
wip
This commit is contained in:
parent
d8cd24fab0
commit
8ca58de2ba
@ -1,10 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<mk-ui :class="$style.root">
|
<mk-ui :class="$style.root">
|
||||||
<div class="qlvquzbjribqcaozciifydkngcwtyzje">
|
<div class="qlvquzbjribqcaozciifydkngcwtyzje">
|
||||||
<x-tl-column src="home"/>
|
<template v-for="column in columns">
|
||||||
<x-notifications-column/>
|
<x-notifications-column v-if="column.type == 'notifications'" :key="column.id"/>
|
||||||
<x-tl-column src="local"/>
|
<x-tl-column v-if="column.type == 'home'" :key="column.id" src="home"/>
|
||||||
<x-tl-column src="global"/>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</mk-ui>
|
</mk-ui>
|
||||||
</template>
|
</template>
|
||||||
@ -13,11 +15,45 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import XTlColumn from './deck.tl-column.vue';
|
import XTlColumn from './deck.tl-column.vue';
|
||||||
import XNotificationsColumn from './deck.notifications-column.vue';
|
import XNotificationsColumn from './deck.notifications-column.vue';
|
||||||
|
import * as uuid from 'uuid';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
components: {
|
components: {
|
||||||
XTlColumn,
|
XTlColumn,
|
||||||
XNotificationsColumn
|
XNotificationsColumn
|
||||||
|
},
|
||||||
|
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
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -7,20 +7,7 @@ import { hostname } from './config';
|
|||||||
const defaultSettings = {
|
const defaultSettings = {
|
||||||
home: null,
|
home: null,
|
||||||
mobileHome: [],
|
mobileHome: [],
|
||||||
deck: {
|
deck: null,
|
||||||
columns: [/*{
|
|
||||||
type: 'widgets',
|
|
||||||
widgets: []
|
|
||||||
}, */{
|
|
||||||
type: 'home'
|
|
||||||
}, {
|
|
||||||
type: 'notifications'
|
|
||||||
}, {
|
|
||||||
type: 'local'
|
|
||||||
}, {
|
|
||||||
type: 'global'
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
fetchOnScroll: true,
|
fetchOnScroll: true,
|
||||||
showMaps: true,
|
showMaps: true,
|
||||||
showPostFormOnTopOfTl: false,
|
showPostFormOnTopOfTl: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user