chore: editor App and NodeEditor updates

This commit is contained in:
2026-06-14 21:39:09 +08:00
parent f8af9e608d
commit 80b361813e
2 changed files with 1 additions and 15 deletions

View File

@@ -111,19 +111,7 @@ onMounted(() => restoreOrLoad())
<button @click="showPreview = !showPreview" :class="{ secondary: true, active: showPreview }">
{{ showPreview ? '📐 图谱' : '🎬 预览' }}
</button>
<span v-if="store.dirty" class="dirty-indicator"> 未保存</span>
</div>
<span class="toolbar-start">
起始场景:
<select
:value="store.startSceneId"
@change="store.startSceneId = ($event.target as HTMLSelectElement).value; store.markDirty()"
class="start-select"
>
<option value="">-- 选择 --</option>
<option v-for="n in editor.sceneNodes.value" :key="n.id" :value="n.id">{{ n.label }}</option>
</select>
</span>
</div>
<div v-if="error" class="error-bar">{{ error }}</div>
@@ -173,9 +161,6 @@ html, body { width: 100%; height: 100%; overflow: hidden; background: #0a0a16; c
.toolbar-actions button:hover { background: rgba(255,255,255,0.14); }
.toolbar-actions button.secondary { color: #8cf; border-color: rgba(100,200,255,0.2); background: rgba(100,200,255,0.06); }
.toolbar-actions button.active { background: rgba(100,200,255,0.18); color: #fff; }
.toolbar-start { margin-left: auto; font-size: 12px; color: #777; display: flex; align-items: center; gap: 6px; }
.start-select { padding: 4px 8px; font-size: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 3px; color: #ccc; }
.dirty-indicator { font-size: 11px; color: #ff9800; }
.error-bar { padding: 8px 16px; background: #4a1a1a; color: #f88; font-size: 13px; flex-shrink: 0; }
.editor-main { flex: 1; display: flex; overflow: hidden; }
.graph-area { flex: 1; }

View File

@@ -40,6 +40,7 @@ function onBlur() {
} else {
const { scenes } = store.gameData
store.gameData = { ...parsed, scenes }
store.startSceneId = parsed.startScene || store.startSceneId
store.autoSave()
}
saved.value = true