fix mcp label

This commit is contained in:
2026-09-06 02:18:20 +07:00
parent 70307e905f
commit e9989a03e9
39 changed files with 58 additions and 63 deletions
+3 -25
View File
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { NButton, NConfigProvider, NFlex, NInput, NQrCode, NTag } from 'naive-ui'
import { NButton, NConfigProvider, NFlex, NInput, NQrCode } from 'naive-ui'
import { useMessage } from 'naive-ui'
import { computed, nextTick, ref } from 'vue'
import { useRoute } from 'vue-router'
@@ -288,8 +288,9 @@ useSimplePolling(() => {
<PlaceBlock
:place="advancedPlace.place"
v-model:mode="advancedPlace.mode"
v-for="advancedPlace in story.places"
v-for="(advancedPlace, index) in story.places"
v-bind:key="advancedPlace.place.code"
:mcp="authStore.hasRole('author') && actions[index]?.mcp"
:addAction="addAction"
>
</PlaceBlock>
@@ -309,13 +310,6 @@ useSimplePolling(() => {
</MessagePaper>
<div v-if="authStore.hasRole('author') && story.places.length > 0" class="edit-panel">
<div v-if="actions.length > 0" class="actions-list">
<div class="actions-title">Ходы</div>
<div v-for="(action, index) in actions" :key="index" class="action-item">
<span>{{ index + 1 }}. {{ action.code }}</span>
<n-tag v-if="action.mcp" size="small" type="success">MCP</n-tag>
</div>
</div>
<n-flex justify="end">
<n-button @click="deleteLast">Удалить последний ход</n-button>
</n-flex>
@@ -336,22 +330,6 @@ useSimplePolling(() => {
z-index: -1;
}
.actions-list {
margin-bottom: 20px;
}
.actions-title {
color: #aaa;
margin-bottom: 8px;
}
.action-item {
align-items: center;
display: flex;
gap: 8px;
margin: 4px 0;
}
.bottom-margin {
height: calc(100dvh - 70px - 76px);
}