add images

This commit is contained in:
Владимир Фёдоров 2026-03-14 17:00:42 +07:00
parent 48d2a814fe
commit 200704bf92

View File

@ -22,6 +22,7 @@ type Action = {
place: string place: string
name: string name: string
text: string text: string
image: string
applications: Application[] applications: Application[]
hidden: boolean hidden: boolean
doors: Door[] doors: Door[]
@ -252,7 +253,9 @@ onMounted(() => {
<div v-show="action.isOpen"> <div v-show="action.isOpen">
<hr class="hr" /> <hr class="hr" />
<div class="message-content"> <div class="message-content">
{{ action.text }} <div v-if="action.image.length">
<img v-bind:src="action.image" class="message-image" />
</div>{{ action.text }}
</div> </div>
<hr class="hr" v-if="action.buttons?.length" /> <hr class="hr" v-if="action.buttons?.length" />
<button v-for="door in action.buttons" :key="door.code" class="button-dialog" <button v-for="door in action.buttons" :key="door.code" class="button-dialog"
@ -323,6 +326,7 @@ body {
margin: 12px 10px; margin: 12px 10px;
padding: 16px; padding: 16px;
background-color: var(--main-back-item-color); background-color: var(--main-back-item-color);
display: flow-root;
} }
.message-header { .message-header {
@ -336,6 +340,13 @@ body {
white-space: pre-wrap; white-space: pre-wrap;
} }
.message-image {
/* width: 150px; */
width: 40%;
float: left;
margin-right: 15px;
}
.message-footer { .message-footer {
font-weight: 400; font-weight: 400;
color: var(--second-color); color: var(--second-color);