Added scene title title fallback.
This commit is contained in:
parent
26772b0122
commit
7bef4b232a
|
@ -47,7 +47,20 @@
|
||||||
:title="scene.title"
|
:title="scene.title"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="row title nolink"
|
class="row title nolink"
|
||||||
>{{ scene.title }}</Link>
|
:class="{ notitle: !scene.title }"
|
||||||
|
>
|
||||||
|
<template v-if="scene.title">{{ scene.title }}</template>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<span
|
||||||
|
v-if="priorityTags.length > 0"
|
||||||
|
class="title-tags"
|
||||||
|
>{{ priorityTags.join(' & ') }} scene</span>
|
||||||
|
|
||||||
|
<template v-else>Scene</template>
|
||||||
|
<template v-if="scene.actors.length > 0"> with {{ scene.actors.map((actor) => actor.name).join(', ') }}</template>
|
||||||
|
</template>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<ul
|
<ul
|
||||||
class="row actors nolist"
|
class="row actors nolist"
|
||||||
|
@ -120,6 +133,7 @@ const user = pageContext.user;
|
||||||
const pageStash = pageContext.pageProps.stash;
|
const pageStash = pageContext.pageProps.stash;
|
||||||
const currentStash = pageStash || pageContext.assets?.primaryStash;
|
const currentStash = pageStash || pageContext.assets?.primaryStash;
|
||||||
|
|
||||||
|
const priorityTags = props.scene.tags.map((tag) => tag.name).slice(0, 2);
|
||||||
const favorited = ref(props.scene.stashes.some((sceneStash) => sceneStash.id === currentStash?.id));
|
const favorited = ref(props.scene.stashes.some((sceneStash) => sceneStash.id === currentStash?.id));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -206,6 +220,18 @@ const favorited = ref(props.scene.stashes.some((sceneStash) => sceneStash.id ===
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title-tags {
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
&:first-letter {
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.notitle {
|
||||||
|
color: var(--shadow);
|
||||||
|
}
|
||||||
|
|
||||||
.actor:hover,
|
.actor:hover,
|
||||||
.tag:hover {
|
.tag:hover {
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
|
|
Loading…
Reference in New Issue