chore: editor App and NodeEditor updates
This commit is contained in:
@@ -111,19 +111,7 @@ onMounted(() => restoreOrLoad())
|
|||||||
<button @click="showPreview = !showPreview" :class="{ secondary: true, active: showPreview }">
|
<button @click="showPreview = !showPreview" :class="{ secondary: true, active: showPreview }">
|
||||||
{{ showPreview ? '📐 图谱' : '🎬 预览' }}
|
{{ showPreview ? '📐 图谱' : '🎬 预览' }}
|
||||||
</button>
|
</button>
|
||||||
<span v-if="store.dirty" class="dirty-indicator">● 未保存</span>
|
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
<div v-if="error" class="error-bar">{{ error }}</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: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.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-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; }
|
.error-bar { padding: 8px 16px; background: #4a1a1a; color: #f88; font-size: 13px; flex-shrink: 0; }
|
||||||
.editor-main { flex: 1; display: flex; overflow: hidden; }
|
.editor-main { flex: 1; display: flex; overflow: hidden; }
|
||||||
.graph-area { flex: 1; }
|
.graph-area { flex: 1; }
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ function onBlur() {
|
|||||||
} else {
|
} else {
|
||||||
const { scenes } = store.gameData
|
const { scenes } = store.gameData
|
||||||
store.gameData = { ...parsed, scenes }
|
store.gameData = { ...parsed, scenes }
|
||||||
|
store.startSceneId = parsed.startScene || store.startSceneId
|
||||||
store.autoSave()
|
store.autoSave()
|
||||||
}
|
}
|
||||||
saved.value = true
|
saved.value = true
|
||||||
|
|||||||
Reference in New Issue
Block a user