2020-02-16 18:30:00 +00:00
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
ref="search"
|
|
|
|
>
|
|
|
|
<ft-loader
|
|
|
|
v-if="isLoading"
|
|
|
|
:fullscreen="true"
|
|
|
|
/>
|
|
|
|
<ft-card
|
|
|
|
v-else
|
|
|
|
class="card"
|
|
|
|
>
|
|
|
|
<img
|
2020-07-11 22:36:42 +00:00
|
|
|
v-if="bannerUrl !== null"
|
2020-02-16 18:30:00 +00:00
|
|
|
class="channelBanner"
|
|
|
|
:src="bannerUrl"
|
|
|
|
>
|
2020-07-11 22:36:42 +00:00
|
|
|
<img
|
|
|
|
v-else
|
|
|
|
class="defaultChannelBanner"
|
|
|
|
>
|
2020-02-16 18:30:00 +00:00
|
|
|
<div class="channelInfoContainer">
|
|
|
|
<div class="channelInfo">
|
|
|
|
<img
|
|
|
|
class="channelThumbnail"
|
|
|
|
:src="thumbnailUrl"
|
|
|
|
>
|
|
|
|
<span
|
|
|
|
class="channelName"
|
|
|
|
>
|
|
|
|
{{ channelName }}
|
|
|
|
</span>
|
|
|
|
<br>
|
|
|
|
<span
|
|
|
|
class="channelSubCount"
|
|
|
|
>
|
2020-08-09 03:15:00 +00:00
|
|
|
{{ formattedSubCount }}
|
|
|
|
<span v-if="subCount === 1">{{ $t("Channel.Subscriber") }}</span>
|
|
|
|
<span v-else>{{ $t("Channel.Subscribers") }}</span>
|
2020-02-16 18:30:00 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<ft-button
|
|
|
|
label="SUBSCRIBE"
|
2020-03-01 03:37:02 +00:00
|
|
|
background-color="var(--primary-color)"
|
|
|
|
text-color="var(--text-with-main-color)"
|
2020-02-16 18:30:00 +00:00
|
|
|
class="subscribeButton"
|
|
|
|
@click="handleSubscription"
|
|
|
|
/>
|
|
|
|
<ft-flex-box
|
|
|
|
class="channelInfoTabs"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
class="tab"
|
|
|
|
@click="changeTab('videos')"
|
|
|
|
>
|
2020-08-09 03:15:00 +00:00
|
|
|
{{ $t("Channel.Videos.Videos").toUpperCase() }}
|
2020-02-16 18:30:00 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
class="tab"
|
|
|
|
@click="changeTab('playlists')"
|
|
|
|
>
|
2020-08-09 03:15:00 +00:00
|
|
|
{{ $t("Channel.Playlists.Playlists").toUpperCase() }}
|
2020-02-16 18:30:00 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
class="tab"
|
|
|
|
@click="changeTab('about')"
|
|
|
|
>
|
2020-08-09 03:15:00 +00:00
|
|
|
{{ $t("Channel.About.About").toUpperCase() }}
|
2020-02-16 18:30:00 +00:00
|
|
|
</div>
|
|
|
|
<ft-input
|
2020-08-12 03:26:49 +00:00
|
|
|
:placeholder="$t('Channel.Search Channel')"
|
2020-02-16 18:30:00 +00:00
|
|
|
class="channelSearch"
|
|
|
|
@click="newSearch"
|
|
|
|
/>
|
|
|
|
<ft-select
|
|
|
|
v-show="currentTab === 'videos'"
|
|
|
|
class="sortSelect"
|
|
|
|
:value="videoSelectValues[0]"
|
|
|
|
:select-names="videoSelectNames"
|
|
|
|
:select-values="videoSelectValues"
|
|
|
|
placeholder="Sort By"
|
|
|
|
@change="videoSortBy = $event"
|
|
|
|
/>
|
|
|
|
<ft-select
|
|
|
|
v-show="currentTab === 'playlists'"
|
|
|
|
class="sortSelect"
|
|
|
|
:value="playlistSelectValues[0]"
|
|
|
|
:select-names="playlistSelectNames"
|
|
|
|
:select-values="playlistSelectValues"
|
|
|
|
placeholder="Sort By"
|
|
|
|
@change="playlistSortBy = $event"
|
|
|
|
/>
|
|
|
|
</ft-flex-box>
|
|
|
|
</div>
|
|
|
|
</ft-card>
|
|
|
|
<ft-card
|
|
|
|
v-if="!isLoading"
|
|
|
|
class="card"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
v-if="currentTab === 'about'"
|
|
|
|
class="aboutTab"
|
|
|
|
>
|
|
|
|
<h2>
|
2020-08-09 03:15:00 +00:00
|
|
|
{{ $t("Channel.About.Channel Description") }}
|
2020-02-16 18:30:00 +00:00
|
|
|
</h2>
|
|
|
|
<div
|
|
|
|
class="aboutInfo"
|
|
|
|
v-html="channelDescription"
|
|
|
|
/>
|
|
|
|
<br>
|
2020-07-11 22:36:42 +00:00
|
|
|
<h2
|
|
|
|
v-if="relatedChannels.length > 0"
|
|
|
|
>
|
2020-08-09 03:15:00 +00:00
|
|
|
{{ $t("Channel.About.Featured Channels") }}
|
2020-07-11 22:36:42 +00:00
|
|
|
</h2>
|
|
|
|
<ft-flex-box
|
|
|
|
v-if="relatedChannels.length > 0"
|
|
|
|
>
|
2020-02-16 18:30:00 +00:00
|
|
|
<ft-channel-bubble
|
|
|
|
v-for="(channel, index) in relatedChannels"
|
|
|
|
:key="index"
|
|
|
|
:channel-name="channel.author"
|
|
|
|
:channel-id="channel.authorId"
|
2020-06-24 02:40:34 +00:00
|
|
|
:channel-thumbnail="channel.authorThumbnails[channel.authorThumbnails.length - 1].url"
|
2020-02-16 18:30:00 +00:00
|
|
|
/>
|
|
|
|
</ft-flex-box>
|
|
|
|
</div>
|
|
|
|
<ft-loader
|
|
|
|
v-if="isElementListLoading"
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
v-if="currentTab !== 'about' && !isElementListLoading"
|
|
|
|
class="elementList"
|
|
|
|
>
|
|
|
|
<ft-element-list
|
|
|
|
v-show="currentTab === 'videos'"
|
|
|
|
:data="latestVideos"
|
|
|
|
/>
|
2020-07-11 22:36:42 +00:00
|
|
|
<ft-flex-box
|
|
|
|
v-if="currentTab === 'videos' && latestVideos.length === 0"
|
|
|
|
>
|
|
|
|
<p class="message">
|
2020-08-09 03:15:00 +00:00
|
|
|
{{ $t("Channel.Videos.This channel does not currently have any videos") }}
|
2020-07-11 22:36:42 +00:00
|
|
|
</p>
|
|
|
|
</ft-flex-box>
|
2020-02-16 18:30:00 +00:00
|
|
|
<ft-element-list
|
|
|
|
v-show="currentTab === 'playlists'"
|
|
|
|
:data="latestPlaylists"
|
|
|
|
/>
|
2020-07-11 22:36:42 +00:00
|
|
|
<ft-flex-box
|
|
|
|
v-if="currentTab === 'playlists' && latestPlaylists.length === 0"
|
|
|
|
>
|
|
|
|
<p class="message">
|
2020-08-09 03:15:00 +00:00
|
|
|
{{ $t("Channel.Playlists.This channel does not currently have any playlists") }}
|
2020-07-11 22:36:42 +00:00
|
|
|
</p>
|
|
|
|
</ft-flex-box>
|
2020-02-16 18:30:00 +00:00
|
|
|
<ft-element-list
|
|
|
|
v-show="currentTab === 'search'"
|
|
|
|
:data="searchResults"
|
|
|
|
/>
|
2020-07-11 22:36:42 +00:00
|
|
|
<ft-flex-box
|
|
|
|
v-if="currentTab === 'search' && searchResults.length === 0"
|
|
|
|
>
|
|
|
|
<p class="message">
|
2020-08-09 03:15:00 +00:00
|
|
|
{{ $t("Channel.Your search results have returned 0 results") }}
|
2020-07-11 22:36:42 +00:00
|
|
|
</p>
|
|
|
|
</ft-flex-box>
|
2020-02-16 18:30:00 +00:00
|
|
|
<div
|
2020-07-11 22:36:42 +00:00
|
|
|
v-if="showFetchMoreButton"
|
2020-02-16 18:30:00 +00:00
|
|
|
class="getNextPage"
|
|
|
|
@click="handleFetchMore"
|
|
|
|
>
|
2020-08-12 03:26:49 +00:00
|
|
|
<font-awesome-icon icon="search" /> {{ $t("Search Filters.Fetch more results") }}
|
2020-02-16 18:30:00 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</ft-card>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./Channel.js" />
|
|
|
|
<style scoped src="./Channel.css" />
|