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