moki 3 дней назад
Родитель
Сommit
1491eb1262
2 измененных файлов с 19 добавлено и 28 удалено
  1. 2 2
      src/types/index.ts
  2. 17 26
      src/views/Dashboard.vue

+ 2 - 2
src/types/index.ts

@@ -83,12 +83,12 @@ export interface DeviceStatus {
 }
 
 export const STATUS_CONFIG: Record<StatusCode, { color: string; label: string }> = {
-  idle: { color: 'green', label: '空闲' },
+    idle: {color: 'green', label: '当前空闲'},
   busy: { color: 'blue', label: '工作中' },
   retry: { color: 'orange', label: '重试中' },
   pending: { color: 'gold', label: '修改中' },
   reasoning: { color: 'purple', label: '思考中' },
-  using_tool: { color: 'orange', label: '使用工具' },
+    using_tool: {color: 'orange', label: '使用工具'},
   running: { color: 'cyan', label: '运行中' },
   completed: {color: 'lime', label: '工具完成'},
   permission: { color: 'yellow', label: '等待权限' },

+ 17 - 26
src/views/Dashboard.vue

@@ -372,17 +372,17 @@ async function sendCode(code: string) {
 
       <div class="control-section">
         <div class="section-title">快速控制</div>
-        <div class="control-grid">
-          <a-button
-              v-for="code in controlCodes"
-              :key="code"
-              :type="currentCode === code ? 'primary' : 'default'"
-              class="control-btn"
-              @click="sendCode(code)"
-          >
-            {{ STATUS_CONFIG[code]?.label ?? code }}
-          </a-button>
-        </div>
+        <a-row :gutter="[8, 8]">
+          <a-col v-for="code in controlCodes" :key="code" :span="12">
+            <a-button
+                :type="currentCode === code ? 'primary' : 'default'"
+                block
+                @click="sendCode(code)"
+            >
+              {{ STATUS_CONFIG[code]?.label ?? code }}
+            </a-button>
+          </a-col>
+        </a-row>
       </div>
     </div>
 
@@ -512,10 +512,10 @@ async function sendCode(code: string) {
 }
 
 .main-status {
-  flex: 1;
-  min-width: 0;
+  width: 640px;
+  flex-shrink: 0;
   display: flex;
-  gap: 24px;
+  gap: 16px;
   align-items: center;
   padding: 24px;
   background: var(--card-bg);
@@ -525,8 +525,7 @@ async function sendCode(code: string) {
 }
 
 .main-card {
-  width: 100%;
-  max-width: 560px;
+  width: 446px;
   flex-shrink: 0;
   aspect-ratio: 3 / 1;
 }
@@ -540,6 +539,8 @@ async function sendCode(code: string) {
   display: flex;
   flex-direction: column;
   gap: 8px;
+  flex-shrink: 0;
+  width: 130px;
 }
 
 .status-label {
@@ -577,16 +578,6 @@ async function sendCode(code: string) {
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
 }
 
-.control-grid {
-  display: grid;
-  grid-template-columns: repeat(2, 1fr);
-  gap: 8px;
-}
-
-.control-btn {
-  width: 100%;
-}
-
 .chart-row {
   display: flex;
   gap: 10px;