refactor(front): [WIP] implement new layout for Album base page
This commit is contained in:
parent
aac44f930e
commit
040b9df215
|
@ -36,7 +36,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
canUpdate: true,
|
canUpdate: true,
|
||||||
fetchHtml: false,
|
fetchHtml: false,
|
||||||
permissive: false,
|
permissive: false,
|
||||||
truncateLength: 500
|
truncateLength: 150
|
||||||
})
|
})
|
||||||
|
|
||||||
const preview = ref('')
|
const preview = ref('')
|
||||||
|
@ -112,9 +112,9 @@ const submit = async () => {
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<p v-else-if="!isUpdating">
|
<span v-else-if="!isUpdating">
|
||||||
{{ t('components.common.RenderedDescription.empty.noDescription') }}
|
{{ t('components.common.RenderedDescription.empty.noDescription') }}
|
||||||
</p>
|
</span>
|
||||||
<form
|
<form
|
||||||
v-if="isUpdating"
|
v-if="isUpdating"
|
||||||
@submit.prevent="submit()"
|
@submit.prevent="submit()"
|
||||||
|
|
|
@ -46,8 +46,7 @@ const title = computed(() => isFavorite.value
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
v-else
|
v-else
|
||||||
round
|
secondary
|
||||||
outline
|
|
||||||
icon="bi-heart-fill"
|
icon="bi-heart-fill"
|
||||||
:class="['ui', 'favorite-icon', {'pink': isFavorite}, {'favorited': isFavorite}, 'basic', 'circular', 'icon', {'really': !border}, 'button']"
|
:class="['ui', 'favorite-icon', {'pink': isFavorite}, {'favorited': isFavorite}, 'basic', 'circular', 'icon', {'really': !border}, 'button']"
|
||||||
:aria-label="title"
|
:aria-label="title"
|
||||||
|
|
|
@ -177,14 +177,14 @@ const remove = async () => {
|
||||||
>
|
>
|
||||||
<!-- ({target}) => target -->
|
<!-- ({target}) => target -->
|
||||||
<!-- Header (TODO: Put into Header component) -->
|
<!-- Header (TODO: Put into Header component) -->
|
||||||
<Section no-items :h1="object.title" style="margin-top: 58px">
|
<Layout stack style="flex: 1; gap: 8px;">
|
||||||
<Layout stack style="grid-column: 1 / -1">
|
<h1>{{ object.title }}</h1>
|
||||||
<artist-credit-label
|
<artist-credit-label
|
||||||
v-if="artistCredit"
|
v-if="artistCredit"
|
||||||
:artist-credit="artistCredit"
|
:artist-credit="artistCredit"
|
||||||
/>
|
/>
|
||||||
<!-- Metadata: -->
|
<!-- Metadata: -->
|
||||||
<div>
|
<div class="meta">
|
||||||
<template v-if="object.release_date">
|
<template v-if="object.release_date">
|
||||||
{{ momentFormat(new Date(object.release_date ?? '1970-01-01'), 'Y') }}
|
{{ momentFormat(new Date(object.release_date ?? '1970-01-01'), 'Y') }}
|
||||||
<i class="bi bi-dot" />
|
<i class="bi bi-dot" />
|
||||||
|
@ -213,7 +213,7 @@ const remove = async () => {
|
||||||
<rendered-description
|
<rendered-description
|
||||||
v-if="object.description"
|
v-if="object.description"
|
||||||
:content="object.description"
|
:content="object.description"
|
||||||
:can-update="false"
|
:can-update="true"
|
||||||
/>
|
/>
|
||||||
</Layout>
|
</Layout>
|
||||||
<Layout flex>
|
<Layout flex>
|
||||||
|
@ -246,15 +246,6 @@ const remove = async () => {
|
||||||
/>
|
/>
|
||||||
</Layout>
|
</Layout>
|
||||||
</Layout>
|
</Layout>
|
||||||
</Section>
|
|
||||||
</Layout>
|
|
||||||
|
|
||||||
<Layout flex>
|
|
||||||
<!-- Toolbar: -->
|
|
||||||
<!-- Organize in playlist -->
|
|
||||||
<!-- <Options... -->
|
|
||||||
<Spacer h grow />
|
|
||||||
<!-- 1 selected -->
|
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
||||||
<div style="flex 1;">
|
<div style="flex 1;">
|
||||||
|
@ -274,3 +265,14 @@ const remove = async () => {
|
||||||
</template>
|
</template>
|
||||||
</Layout>
|
</Layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scopen>
|
||||||
|
.channel-image {
|
||||||
|
width: 300px;
|
||||||
|
height: 300px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.meta {
|
||||||
|
line-height: 48px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -57,14 +57,14 @@ const paginatedDiscs = computed(() => props.object.tracks.slice(props.paginateBy
|
||||||
<div
|
<div
|
||||||
v-if="!isLoadingTracks"
|
v-if="!isLoadingTracks"
|
||||||
>
|
>
|
||||||
<h2 class="ui header">
|
<!-- <h2 class="ui header">
|
||||||
<span v-if="isSerie">
|
<span v-if="isSerie">
|
||||||
{{ t('components.library.AlbumDetail.header.episodes') }}
|
{{ t('components.library.AlbumDetail.header.episodes') }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
{{ t('components.library.AlbumDetail.header.tracks') }}
|
{{ t('components.library.AlbumDetail.header.tracks') }}
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2> -->
|
||||||
|
|
||||||
<channel-entries
|
<channel-entries
|
||||||
v-if="artistCredit && artistCredit[0].artist.channel && isSerie"
|
v-if="artistCredit && artistCredit[0].artist.channel && isSerie"
|
||||||
|
|
|
@ -86,6 +86,7 @@ const open = ref(false)
|
||||||
<template #default="{ toggleOpen }">
|
<template #default="{ toggleOpen }">
|
||||||
<OptionsButton
|
<OptionsButton
|
||||||
:title="labels.more"
|
:title="labels.more"
|
||||||
|
isSquare
|
||||||
@click="toggleOpen()"
|
@click="toggleOpen()"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -196,6 +196,7 @@ const open = ref(false)
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</semantic-modal>
|
</semantic-modal>
|
||||||
|
|
||||||
<Popover v-model:open="open">
|
<Popover v-model:open="open">
|
||||||
<template #default="{ toggleOpen }">
|
<template #default="{ toggleOpen }">
|
||||||
<OptionsButton @click="toggleOpen" />
|
<OptionsButton @click="toggleOpen" />
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Button from '../Button.vue'
|
import Button from '../Button.vue'
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
isSquare?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
isSquare: false
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -7,7 +15,7 @@ import Button from '../Button.vue'
|
||||||
icon="bi-three-dots-vertical"
|
icon="bi-three-dots-vertical"
|
||||||
class="options-button"
|
class="options-button"
|
||||||
secondary
|
secondary
|
||||||
round
|
:round="!isSquare"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue