mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-02 16:58:06 +09:00
wip
This commit is contained in:
parent
3aee0a1993
commit
3ad85e44fe
@ -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