2020-08-18 07:44:21 -06:00
|
|
|
<template>
|
|
|
|
<div>
|
2020-12-18 18:55:52 -07:00
|
|
|
<div class="_section" style="padding: 0;" v-if="$i">
|
2021-09-29 09:50:45 -06:00
|
|
|
<MkTab class="_content" v-model="tab">
|
2021-04-20 08:22:59 -06:00
|
|
|
<option value="featured"><i class="fas fa-fire-alt"></i> {{ $ts._channel.featured }}</option>
|
|
|
|
<option value="following"><i class="fas fa-heart"></i> {{ $ts._channel.following }}</option>
|
|
|
|
<option value="owned"><i class="fas fa-edit"></i> {{ $ts._channel.owned }}</option>
|
2020-11-16 22:59:15 -07:00
|
|
|
</MkTab>
|
2020-08-18 07:44:21 -06:00
|
|
|
</div>
|
|
|
|
|
2020-10-17 05:12:00 -06:00
|
|
|
<div class="_section">
|
|
|
|
<div class="_content grwlizim featured" v-if="tab === 'featured'">
|
|
|
|
<MkPagination :pagination="featuredPagination" #default="{items}">
|
2021-04-10 03:17:42 -06:00
|
|
|
<MkChannelPreview v-for="channel in items" class="_gap" :channel="channel" :key="channel.id"/>
|
2020-10-17 05:12:00 -06:00
|
|
|
</MkPagination>
|
|
|
|
</div>
|
2020-08-18 07:44:21 -06:00
|
|
|
|
2020-10-17 05:12:00 -06:00
|
|
|
<div class="_content grwlizim following" v-if="tab === 'following'">
|
|
|
|
<MkPagination :pagination="followingPagination" #default="{items}">
|
2021-04-10 03:17:42 -06:00
|
|
|
<MkChannelPreview v-for="channel in items" class="_gap" :channel="channel" :key="channel.id"/>
|
2020-10-17 05:12:00 -06:00
|
|
|
</MkPagination>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="_content grwlizim owned" v-if="tab === 'owned'">
|
2021-04-20 08:22:59 -06:00
|
|
|
<MkButton class="new" @click="create()"><i class="fas fa-plus"></i></MkButton>
|
2020-10-17 05:12:00 -06:00
|
|
|
<MkPagination :pagination="ownedPagination" #default="{items}">
|
2021-04-10 03:17:42 -06:00
|
|
|
<MkChannelPreview v-for="channel in items" class="_gap" :channel="channel" :key="channel.id"/>
|
2020-10-17 05:12:00 -06:00
|
|
|
</MkPagination>
|
|
|
|
</div>
|
2020-08-18 07:44:21 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2020-10-17 05:12:00 -06:00
|
|
|
import { defineComponent } from 'vue';
|
2021-03-23 02:30:14 -06: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-09 21:54:12 -06:00
|
|
|
import * as symbols from '@client/symbols';
|
2020-08-18 07:44:21 -06:00
|
|
|
|
2020-10-17 05:12:00 -06:00
|
|
|
export default defineComponent({
|
2020-08-18 07:44:21 -06:00
|
|
|
components: {
|
|
|
|
MkChannelPreview, MkPagination, MkButton, MkTab
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2021-04-09 21:54:12 -06:00
|
|
|
[symbols.PAGE_INFO]: {
|
2020-12-25 18:47:36 -07:00
|
|
|
title: this.$ts.channel,
|
2021-04-20 08:22:59 -06:00
|
|
|
icon: 'fas fa-satellite-dish',
|
2020-11-16 22:59:15 -07:00
|
|
|
action: {
|
2021-04-20 08:22:59 -06:00
|
|
|
icon: 'fas fa-plus',
|
2020-11-16 22:59:15 -07:00
|
|
|
handler: this.create
|
|
|
|
}
|
2020-10-17 05:12:00 -06:00
|
|
|
},
|
2020-08-18 07:44:21 -06:00
|
|
|
tab: 'featured',
|
|
|
|
featuredPagination: {
|
|
|
|
endpoint: 'channels/featured',
|
2020-08-30 03:18:34 -06:00
|
|
|
noPaging: true,
|
2020-08-18 07:44:21 -06:00
|
|
|
},
|
|
|
|
followingPagination: {
|
|
|
|
endpoint: 'channels/followed',
|
|
|
|
limit: 5,
|
|
|
|
},
|
|
|
|
ownedPagination: {
|
|
|
|
endpoint: 'channels/owned',
|
|
|
|
limit: 5,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
create() {
|
|
|
|
this.$router.push(`/channels/new`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|