refactor: move version history dropdown from AIPanel to toolbar
This commit is contained in:
@@ -113,6 +113,12 @@ onMounted(() => restoreOrLoad())
|
|||||||
{{ showPreview ? '📐 图谱' : '🎬 预览' }}
|
{{ showPreview ? '📐 图谱' : '🎬 预览' }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<select v-if="store.versions.length > 0" class="toolbar-version-select" @change="store.restoreVersion(($event.target as HTMLSelectElement).selectedIndex - 1)">
|
||||||
|
<option disabled selected>版本</option>
|
||||||
|
<option v-for="v in store.versions" :key="v.timestamp">
|
||||||
|
{{ new Date(v.timestamp).toLocaleString('zh-CN') }} {{ v.label }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="error" class="error-bar">{{ error }}</div>
|
<div v-if="error" class="error-bar">{{ error }}</div>
|
||||||
@@ -167,4 +173,18 @@ html, body { width: 100%; height: 100%; overflow: hidden; background: #0a0a16; c
|
|||||||
.editor-main { flex: 1; display: flex; overflow: hidden; position: relative; }
|
.editor-main { flex: 1; display: flex; overflow: hidden; position: relative; }
|
||||||
.graph-area { flex: 1; }
|
.graph-area { flex: 1; }
|
||||||
.loading-hint { display: flex; align-items: center; justify-content: center; height: 100%; color: #555; font-size: 14px; }
|
.loading-hint { display: flex; align-items: center; justify-content: center; height: 100%; color: #555; font-size: 14px; }
|
||||||
|
|
||||||
|
.toolbar-version-select {
|
||||||
|
padding: 4px 10px;
|
||||||
|
font-size: 11px;
|
||||||
|
max-width: 200px;
|
||||||
|
background: rgba(255,255,255,0.06);
|
||||||
|
border: 1px solid rgba(255,255,255,0.12);
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #aaa;
|
||||||
|
outline: none;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
.toolbar-version-select:hover { border-color: rgba(255,255,255,0.2); color: #ccc; }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -99,12 +99,6 @@ onMounted(() => {
|
|||||||
</button>
|
</button>
|
||||||
<button class="ai-new-btn" @click="newSession" title="新建对话">+</button>
|
<button class="ai-new-btn" @click="newSession" title="新建对话">+</button>
|
||||||
<button v-if="store.aiChanges" class="ai-clear-btn" @click="store.clearAIMarkers()">清除高亮</button>
|
<button v-if="store.aiChanges" class="ai-clear-btn" @click="store.clearAIMarkers()">清除高亮</button>
|
||||||
<select v-if="store.versions.length > 0" class="ai-version-select" @change="store.restoreVersion(($event.target as HTMLSelectElement).selectedIndex)">
|
|
||||||
<option disabled selected>版本</option>
|
|
||||||
<option v-for="v in store.versions" :key="v.timestamp">
|
|
||||||
{{ new Date(v.timestamp).toLocaleString('zh-CN') }} {{ v.label }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
<button class="ai-collapse-btn" @click="store.aiCollapsed = true">▼ 折叠</button>
|
<button class="ai-collapse-btn" @click="store.aiCollapsed = true">▼ 折叠</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -261,17 +255,6 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
.ai-clear-btn:hover { color: #fff; border-color: rgba(255,255,255,0.2); }
|
.ai-clear-btn:hover { color: #fff; border-color: rgba(255,255,255,0.2); }
|
||||||
|
|
||||||
.ai-version-select {
|
|
||||||
padding: 3px 6px;
|
|
||||||
font-size: 11px;
|
|
||||||
max-width: 90px;
|
|
||||||
background: rgba(255,255,255,0.05);
|
|
||||||
border: 1px solid rgba(255,255,255,0.1);
|
|
||||||
border-radius: 3px;
|
|
||||||
color: #ccc;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-collapse-btn {
|
.ai-collapse-btn {
|
||||||
padding: 3px 8px;
|
padding: 3px 8px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
|
|||||||
Reference in New Issue
Block a user