[WIP] refactor(front): favorites page
This commit is contained in:
parent
2021330eca
commit
28bc337846
|
@ -219,7 +219,3 @@ const hover = ref(false)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -13,11 +13,9 @@ import axios from 'axios'
|
||||||
|
|
||||||
import TrackTable from '~/components/audio/track/Table.vue'
|
import TrackTable from '~/components/audio/track/Table.vue'
|
||||||
import RadioButton from '~/components/radios/Button.vue'
|
import RadioButton from '~/components/radios/Button.vue'
|
||||||
import Pagination from '~/components/ui/Pagination.vue'
|
|
||||||
import Layout from '~/components/ui/Layout.vue'
|
import Layout from '~/components/ui/Layout.vue'
|
||||||
import Section from '~/components/ui/Section.vue'
|
import Section from '~/components/ui/Section.vue'
|
||||||
import Spacer from '~/components/ui/Spacer.vue'
|
import Spacer from '~/components/ui/Spacer.vue'
|
||||||
import Button from '~/components/ui/Button.vue'
|
|
||||||
import Link from '~/components/ui/Link.vue'
|
import Link from '~/components/ui/Link.vue'
|
||||||
import Alert from '~/components/ui/Alert.vue'
|
import Alert from '~/components/ui/Alert.vue'
|
||||||
import Loader from '~/components/ui/Loader.vue'
|
import Loader from '~/components/ui/Loader.vue'
|
||||||
|
@ -113,24 +111,15 @@ const paginateOptions = computed(() => sortedUniq([12, 25, 50, paginateBy.value]
|
||||||
v-title="labels.title"
|
v-title="labels.title"
|
||||||
>
|
>
|
||||||
<Spacer/>
|
<Spacer/>
|
||||||
<Section
|
<Layout flex v-if="results">
|
||||||
no-items
|
<h1>{{ t('components.favorites.List.title', store.state.favorites.count) }}</h1>
|
||||||
v-if="results"
|
<Spacer h grow />
|
||||||
:h1="t('components.favorites.List.title', store.state.favorites.count)"
|
|
||||||
>
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
v-if="store.state.favorites.count > 0"
|
v-if="store.state.favorites.count > 0"
|
||||||
type="favorites"
|
type="favorites"
|
||||||
/>
|
/>
|
||||||
</Section>
|
</Layout>
|
||||||
<section class="center">
|
<Loader v-if="isLoading"/>
|
||||||
<div :class="['ui', { 'active': isLoading }, 'inverted', 'dimmer']">
|
|
||||||
<div v-if="isLoading" class="ui text loader">
|
|
||||||
{{ t('components.favorites.List.loader.loading') }}
|
|
||||||
</div>
|
|
||||||
<Loader v-if="isLoading"/>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<Layout
|
<Layout
|
||||||
v-if="store.state.favorites.count > 0"
|
v-if="store.state.favorites.count > 0"
|
||||||
form
|
form
|
||||||
|
@ -187,12 +176,6 @@ const paginateOptions = computed(() => sortedUniq([12, 25, 50, paginateBy.value]
|
||||||
:show-album="true"
|
:show-album="true"
|
||||||
:tracks="results"
|
:tracks="results"
|
||||||
/>
|
/>
|
||||||
<Spacer grow />
|
|
||||||
<Pagination
|
|
||||||
v-if="result && result.count > paginateBy"
|
|
||||||
:page="page"
|
|
||||||
:pages="Math.ceil((result?.results.length || 0)/paginateBy)"
|
|
||||||
/>
|
|
||||||
</Layout>
|
</Layout>
|
||||||
<Alert blue style="text-align: center;"
|
<Alert blue style="text-align: center;"
|
||||||
v-else
|
v-else
|
||||||
|
|
Loading…
Reference in New Issue