This commit is contained in:
2026-09-02 00:59:46 +07:00
parent 690efbbbf5
commit 30ffe8ea08
45 changed files with 2138 additions and 1643 deletions
+45 -39
View File
@@ -16,64 +16,70 @@ const route = useRoute()
const scenarioId = route.params.id
const scenario = ref<Scenario>({
id: undefined,
name: undefined,
story: undefined,
author: undefined,
status: undefined,
updatedAt: undefined,
createdAt: undefined,
publishedAt: undefined,
id: undefined,
name: undefined,
story: undefined,
author: undefined,
status: undefined,
updatedAt: undefined,
createdAt: undefined,
publishedAt: undefined,
})
async function getScenario(id: number) {
const res = await client.GetScenario({ id: id })
if (res.error != '') {
message.error(res.error!)
return
}
scenario.value = res.scenario!
const res = await client.GetScenario({ id: id })
if (res.error != '') {
message.error(res.error!)
return
}
scenario.value = res.scenario!
}
getScenario(Number(scenarioId))
</script>
<template>
<div class="center-block-custom">
<div class="width700">
<div class="scenario-title">
{{ scenario.name }}
</div>
<img class="scenario-image" :src="scenario.image">
<div class="scenario-description">
{{ scenario.description }}
</div>
<div class="scenario-author">
<n-tag :bordered="false" type="success" class="status-block">Автор: {{ scenario.author?.username
}}</n-tag>
</div>
<IntroBlock
v-if="scenario.story?.introduction && (scenario.story.introduction.text || scenario.story.introduction.audio)"
:introduction="scenario.story.introduction" mode="show" />
</div>
<div class="center-block-custom">
<div class="width700">
<div class="scenario-title">
{{ scenario.name }}
</div>
<img class="scenario-image" :src="scenario.image" />
<div class="scenario-description">
{{ scenario.description }}
</div>
<div class="scenario-author">
<n-tag :bordered="false" type="success" class="status-block"
>Автор: {{ scenario.author?.username }}</n-tag
>
</div>
<IntroBlock
v-if="
scenario.story?.introduction &&
(scenario.story.introduction.text || scenario.story.introduction.audio)
"
:introduction="scenario.story.introduction"
mode="show"
/>
</div>
</div>
<HeaderMenu active="catalog" />
<HeaderMenu active="catalog" />
</template>
<style scoped>
.scenario-title {
font-size: 24px;
margin-bottom: 10px;
font-size: 24px;
margin-bottom: 10px;
}
.scenario-image {
width: 100%;
max-width: 400px;
margin-bottom: 10px;
margin-bottom: 10px;
max-width: 400px;
width: 100%;
}
.scenario-description {
color: #aaa;
margin-bottom: 10px;
color: #aaa;
margin-bottom: 10px;
}
</style>