refactor(frontend): adopt GitHub-style file tree design
统一采用GitHub风格的UI设计:文件树标题改为'Code',调整缩进和悬停样式,移除视图切换按钮,使用GitHub配色变量。 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
const MilkdownEditor = defineAsyncComponent(() => import('../components/MilkdownEditor.vue'))
|
||||
|
||||
const markdown = ref('')
|
||||
@@ -11,14 +9,6 @@ const markdown = ref('')
|
||||
|
||||
<template>
|
||||
<div class="editor-view">
|
||||
<div class="editor-toolbar">
|
||||
<button class="docs-toggle" @click="router.push('/docs')" title="切换到文档模式">
|
||||
<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor">
|
||||
<path d="M0 2.5A1.5 1.5 0 011.5 1h2.793a.5.5 0 01.353.146l1.5 1.5a.5.5 0 00.354.146H13.5A1.5 1.5 0 0115 4.5v7.5a1.5 1.5 0 01-1.5 1.5h-11A1.5 1.5 0 011 12v-9.5z"/>
|
||||
</svg>
|
||||
<span class="toggle-label">文档</span>
|
||||
</button>
|
||||
</div>
|
||||
<MilkdownEditor v-model:markdown="markdown" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -31,36 +21,4 @@ const markdown = ref('')
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.editor-toolbar {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 16px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.docs-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 12px;
|
||||
border: 1px solid var(--panel-border);
|
||||
background: var(--app-bg);
|
||||
color: var(--muted-text);
|
||||
cursor: pointer;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
transition: all 0.2s ease;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.docs-toggle:hover {
|
||||
color: var(--focus-ring);
|
||||
border-color: var(--focus-ring);
|
||||
background: var(--ghost-code-bg);
|
||||
}
|
||||
|
||||
.toggle-label {
|
||||
font-weight: 500;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user