2020-08-18 13:44:21 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2020-12-19 01:55:52 +00:00
|
|
|
<div class="_section" style="padding: 0;" v-if="$i">
|
2020-11-17 05:59:15 +00:00
|
|
|
<MkTab class="_content" v-model:value="tab">
|
2020-12-26 01:47:36 +00:00
|
|
|
<option value="featured"><Fa :icon="faFireAlt"/> {{ $ts._channel.featured }}</option>
|
|
|
|
<option value="following"><Fa :icon="faHeart"/> {{ $ts._channel.following }}</option>
|
|
|
|
<option value="owned"><Fa :icon="faEdit"/> {{ $ts._channel.owned }}</option>
|
2020-11-17 05:59:15 +00:00
|
|
|
</MkTab>
|
2020-08-18 13:44:21 +00:00
|
|
|
</div>
|
|
|
|
|
2020-10-17 11:12:00 +00:00
|
|
|
<div class="_section">
|
|
|
|
<div class="_content grwlizim featured" v-if="tab === 'featured'">
|
|
|
|
<MkPagination :pagination="featuredPagination" #default="{items}">
|
2020-11-17 05:59:15 +00:00
|
|
|
<MkChannelPreview v-for="channel in items" class="_vMargin" :channel="channel" :key="channel.id"/>
|
2020-10-17 11:12:00 +00:00
|
|
|
</MkPagination>
|
|
|
|
</div>
|
2020-08-18 13:44:21 +00:00
|
|
|
|
2020-10-17 11:12:00 +00:00
|
|
|
<div class="_content grwlizim following" v-if="tab === 'following'">
|
|
|
|
<MkPagination :pagination="followingPagination" #default="{items}">
|
2020-11-17 05:59:15 +00:00
|
|
|
<MkChannelPreview v-for="channel in items" class="_vMargin" :channel="channel" :key="channel.id"/>
|
2020-10-17 11:12:00 +00:00
|
|
|
</MkPagination>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="_content grwlizim owned" v-if="tab === 'owned'">
|
|
|
|
<MkButton class="new" @click="create()"><Fa :icon="faPlus"/></MkButton>
|
|
|
|
<MkPagination :pagination="ownedPagination" #default="{items}">
|
2020-11-17 05:59:15 +00:00
|
|
|
<MkChannelPreview v-for="channel in items" class="_vMargin" :channel="channel" :key="channel.id"/>
|
2020-10-17 11:12:00 +00:00
|
|
|
</MkPagination>
|
|
|
|
</div>
|
2020-08-18 13:44:21 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2020-10-17 11:12:00 +00:00
|
|
|
import { defineComponent } from 'vue';
|
2020-08-18 13:44:21 +00:00
|
|
|
import { faSatelliteDish, faPlus, faEdit, faFireAlt } from '@fortawesome/free-solid-svg-icons';
|
|
|
|
import { faHeart } from '@fortawesome/free-regular-svg-icons';
|
2021-03-23 08:30:14 +00:00
|
|
|
import MkChannelPreview from '@client/components/channel-preview.vue';
|
|
|
|
import MkPagination from '@client/components/ui/pagination.vue';
|
|
|
|
import MkButton from '@client/components/ui/button.vue';
|
|
|
|
import MkTab from '@client/components/tab.vue';
|
2021-04-10 03:54:12 +00:00
|
|
|
import * as symbols from '@client/symbols';
|
2020-08-18 13:44:21 +00:00
|
|
|
|
2020-10-17 11:12:00 +00:00
|
|
|
export default defineComponent({
|
2020-08-18 13:44:21 +00:00
|
|
|
components: {
|
|
|
|
MkChannelPreview, MkPagination, MkButton, MkTab
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2021-04-10 03:54:12 +00:00
|
|
|
[symbols.PAGE_INFO]: {
|
2020-12-26 01:47:36 +00:00
|
|
|
title: this.$ts.channel,
|
2020-11-17 05:59:15 +00:00
|
|
|
icon: faSatelliteDish,
|
|
|
|
action: {
|
|
|
|
icon: faPlus,
|
|
|
|
handler: this.create
|
|
|
|
}
|
2020-10-17 11:12:00 +00:00
|
|
|
},
|
2020-08-18 13:44:21 +00:00
|
|
|
tab: 'featured',
|
|
|
|
featuredPagination: {
|
|
|
|
endpoint: 'channels/featured',
|
2020-08-30 09:18:34 +00:00
|
|
|
noPaging: true,
|
2020-08-18 13:44:21 +00:00
|
|
|
},
|
|
|
|
followingPagination: {
|
|
|
|
endpoint: 'channels/followed',
|
|
|
|
limit: 5,
|
|
|
|
},
|
|
|
|
ownedPagination: {
|
|
|
|
endpoint: 'channels/owned',
|
|
|
|
limit: 5,
|
|
|
|
},
|
|
|
|
faSatelliteDish, faPlus, faEdit, faHeart, faFireAlt
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
create() {
|
|
|
|
this.$router.push(`/channels/new`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|