wip
This commit is contained in:
parent
eb392b1251
commit
555501d534
7 changed files with 58 additions and 36 deletions
|
|
@ -3,6 +3,7 @@
|
|||
<span slot="header">
|
||||
<template v-if="column.type == 'home'">%fa:home%</template>
|
||||
<template v-if="column.type == 'local'">%fa:R comments%</template>
|
||||
<template v-if="column.type == 'hybrid'">%fa:share-alt%</template>
|
||||
<template v-if="column.type == 'global'">%fa:globe%</template>
|
||||
<template v-if="column.type == 'list'">%fa:list%</template>
|
||||
<span>{{ name }}</span>
|
||||
|
|
@ -61,6 +62,7 @@ export default Vue.extend({
|
|||
switch (this.column.type) {
|
||||
case 'home': return '%i18n:common.deck.home%';
|
||||
case 'local': return '%i18n:common.deck.local%';
|
||||
case 'hybrid': return '%i18n:common.deck.hybrid%';
|
||||
case 'global': return '%i18n:common.deck.global%';
|
||||
case 'list': return this.column.list.title;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,27 +41,29 @@ export default Vue.extend({
|
|||
};
|
||||
},
|
||||
|
||||
watch: {
|
||||
mediaOnly() {
|
||||
this.fetch();
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
stream(): any {
|
||||
return this.src == 'home'
|
||||
? (this as any).os.stream
|
||||
: this.src == 'local'
|
||||
? (this as any).os.streams.localTimelineStream
|
||||
: (this as any).os.streams.globalTimelineStream;
|
||||
switch (this.src) {
|
||||
case 'home': return (this as any).os.stream;
|
||||
case 'local': return (this as any).os.streams.localTimelineStream;
|
||||
case 'hybrid': return (this as any).os.streams.hybridTimelineStream;
|
||||
case 'global': return (this as any).os.streams.globalTimelineStream;
|
||||
}
|
||||
},
|
||||
|
||||
endpoint(): string {
|
||||
return this.src == 'home'
|
||||
? 'notes/timeline'
|
||||
: this.src == 'local'
|
||||
? 'notes/local-timeline'
|
||||
: 'notes/global-timeline';
|
||||
switch (this.src) {
|
||||
case 'home': return 'notes/timeline';
|
||||
case 'local': return 'notes/local-timeline';
|
||||
case 'hybrid': return 'notes/hybrid-timeline';
|
||||
case 'global': return 'notes/global-timeline';
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
mediaOnly() {
|
||||
this.fetch();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -119,6 +119,15 @@ export default Vue.extend({
|
|||
type: 'local'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
icon: '%fa:share-alt%',
|
||||
text: '%i18n:common.deck.hybrid%',
|
||||
action: () => {
|
||||
this.$store.dispatch('settings/addDeckColumn', {
|
||||
id: uuid(),
|
||||
type: 'hybrid'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
icon: '%fa:globe%',
|
||||
text: '%i18n:common.deck.global%',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue