2020-02-16 19:30:00 +01:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<ft-loader
|
|
|
|
v-if="isLoading"
|
|
|
|
:fullscreen="true"
|
|
|
|
/>
|
|
|
|
<ft-card
|
|
|
|
v-else
|
|
|
|
class="card"
|
|
|
|
>
|
2021-08-21 23:08:38 +02:00
|
|
|
<h3>{{ $t("Trending.Trending") }}</h3>
|
|
|
|
<ft-flex-box
|
|
|
|
class="trendingInfoTabs"
|
|
|
|
role="tablist"
|
|
|
|
:aria-label="$t('Trending.Trending Tabs')"
|
|
|
|
>
|
|
|
|
<div
|
2022-10-04 19:56:10 +02:00
|
|
|
ref="default"
|
2021-08-21 23:08:38 +02:00
|
|
|
class="tab"
|
|
|
|
role="tab"
|
2022-10-04 19:56:10 +02:00
|
|
|
:aria-selected="String(currentTab === 'default')"
|
2021-08-21 23:08:38 +02:00
|
|
|
aria-controls="trendingPanel"
|
2022-10-04 19:56:10 +02:00
|
|
|
:tabindex="currentTab === 'default' ? 0 : -1"
|
|
|
|
:class="{ selectedTab: currentTab === 'default' }"
|
2021-08-21 23:08:38 +02:00
|
|
|
@click="changeTab('default')"
|
2022-10-04 19:56:10 +02:00
|
|
|
@keydown.space.enter.prevent="changeTab('default')"
|
|
|
|
@keydown.left.prevent="focusTab('movies')"
|
|
|
|
@keydown.right.prevent="focusTab('music')"
|
2021-08-21 23:08:38 +02:00
|
|
|
>
|
|
|
|
{{ $t("Trending.Default").toUpperCase() }}
|
|
|
|
</div>
|
|
|
|
<div
|
2022-10-04 19:56:10 +02:00
|
|
|
ref="music"
|
2021-08-21 23:08:38 +02:00
|
|
|
class="tab"
|
|
|
|
role="tab"
|
2022-10-04 19:56:10 +02:00
|
|
|
:aria-selected="String(currentTab === 'music')"
|
2021-08-21 23:08:38 +02:00
|
|
|
aria-controls="trendingPanel"
|
2022-10-04 19:56:10 +02:00
|
|
|
:tabindex="currentTab === 'music' ? 0 : -1"
|
|
|
|
:class="{ selectedTab: currentTab === 'music' }"
|
2021-08-21 23:08:38 +02:00
|
|
|
@click="changeTab('music')"
|
2022-10-04 19:56:10 +02:00
|
|
|
@keydown.space.enter.prevent="changeTab('music')"
|
|
|
|
@keydown.left.prevent="focusTab('default')"
|
|
|
|
@keydown.right.prevent="focusTab('gaming')"
|
2021-08-21 23:08:38 +02:00
|
|
|
>
|
|
|
|
{{ $t("Trending.Music").toUpperCase() }}
|
|
|
|
</div>
|
|
|
|
<div
|
2022-10-04 19:56:10 +02:00
|
|
|
ref="gaming"
|
2021-08-21 23:08:38 +02:00
|
|
|
class="tab"
|
|
|
|
role="tab"
|
2022-10-04 19:56:10 +02:00
|
|
|
:aria-selected="String(currentTab === 'gaming')"
|
2021-08-21 23:08:38 +02:00
|
|
|
aria-controls="trendingPanel"
|
2022-10-04 19:56:10 +02:00
|
|
|
:tabindex="currentTab === 'gaming' ? 0 : -1"
|
|
|
|
:class="{ selectedTab: currentTab === 'gaming' }"
|
2021-08-21 23:08:38 +02:00
|
|
|
@click="changeTab('gaming')"
|
2022-10-04 19:56:10 +02:00
|
|
|
@keydown.space.enter.prevent="changeTab('gaming')"
|
|
|
|
@keydown.left.prevent="focusTab('music')"
|
|
|
|
@keydown.right.prevent="focusTab('movies')"
|
2021-08-21 23:08:38 +02:00
|
|
|
>
|
|
|
|
{{ $t("Trending.Gaming").toUpperCase() }}
|
|
|
|
</div>
|
|
|
|
<div
|
2022-10-04 19:56:10 +02:00
|
|
|
ref="movies"
|
2021-08-21 23:08:38 +02:00
|
|
|
class="tab"
|
|
|
|
role="tab"
|
2022-10-04 19:56:10 +02:00
|
|
|
:aria-selected="String(currentTab === 'movies')"
|
2021-08-21 23:08:38 +02:00
|
|
|
aria-controls="trendingPanel"
|
2022-10-04 19:56:10 +02:00
|
|
|
:tabindex="currentTab === 'movies' ? 0 : -1"
|
|
|
|
:class="{ selectedTab: currentTab === 'movies' }"
|
2021-08-21 23:08:38 +02:00
|
|
|
@click="changeTab('movies')"
|
2022-10-04 19:56:10 +02:00
|
|
|
@keydown.space.enter.prevent="changeTab('movies')"
|
|
|
|
@keydown.left.prevent="focusTab('gaming')"
|
|
|
|
@keydown.right.prevent="focusTab('default')"
|
2021-08-21 23:08:38 +02:00
|
|
|
>
|
|
|
|
{{ $t("Trending.Movies").toUpperCase() }}
|
|
|
|
</div>
|
|
|
|
</ft-flex-box>
|
2020-02-16 19:30:00 +01:00
|
|
|
<ft-element-list
|
2021-08-21 23:08:38 +02:00
|
|
|
id="trendingPanel"
|
|
|
|
role="tabpanel"
|
2020-02-16 19:30:00 +01:00
|
|
|
:data="shownResults"
|
|
|
|
/>
|
|
|
|
</ft-card>
|
2020-08-22 22:37:09 +02:00
|
|
|
<ft-icon-button
|
2020-08-24 23:52:39 +02:00
|
|
|
v-if="!isLoading"
|
2022-09-06 04:29:10 +02:00
|
|
|
:icon="['fas', 'sync']"
|
2020-08-22 22:37:09 +02:00
|
|
|
class="floatingTopButton"
|
|
|
|
:size="12"
|
|
|
|
theme="primary"
|
|
|
|
@click="getTrendingInfo"
|
|
|
|
/>
|
2020-02-16 19:30:00 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./Trending.js" />
|
|
|
|
<style scoped src="./Trending.css" />
|