فهرست منبع

fix(paas): fit narrow topbar and tuck workspace hint into more menu

241880436@seecoder.cn 5 روز پیش
والد
کامیت
42f8292e61
2فایلهای تغییر یافته به همراه26 افزوده شده و 93 حذف شده
  1. 9 4
      packages/app/src/pages/paas/chat.tsx
  2. 17 89
      packages/app/src/pages/paas/paas.css

+ 9 - 4
packages/app/src/pages/paas/chat.tsx

@@ -523,7 +523,11 @@ export function PaasChat(props: {
             <Portal mount={mount()}>
               <div class="paas-chat-header-actions">
                 <Show when={currentAgent() && props.onEditAgent}>
-                  <button disabled={!props.connected} onClick={() => props.onEditAgent?.(current()!.agentID)}>
+                  <button
+                    class="paas-action-settings"
+                    disabled={!props.connected}
+                    onClick={() => props.onEditAgent?.(current()!.agentID)}
+                  >
                     研究设置
                   </button>
                 </Show>
@@ -535,15 +539,13 @@ export function PaasChat(props: {
                 </button>
                 <Show when={currentAgent() && props.onOpenWorkspace}>
                   <button
+                    class="paas-action-workspace"
                     disabled={props.workspaceDisabled}
                     title={props.workspaceHint || "在 OpenCode 中继续处理本机研究产物"}
                     onClick={() => void props.onOpenWorkspace?.(current()!.agentID)}
                   >
                     在开发区打开工作区
                   </button>
-                  <Show when={props.workspaceHint}>
-                    <p class="paas-muted">{props.workspaceHint}</p>
-                  </Show>
                 </Show>
                 <details class="paas-more-actions">
                   <summary>更多操作</summary>
@@ -561,6 +563,9 @@ export function PaasChat(props: {
                         {current()?.archived ? "取消归档" : "在本机归档"}
                       </button>
                     </Show>
+                    <Show when={props.workspaceHint}>
+                      <p class="paas-muted">{props.workspaceHint}</p>
+                    </Show>
                   </div>
                 </details>
               </div>

+ 17 - 89
packages/app/src/pages/paas/paas.css

@@ -591,41 +591,6 @@
   max-width: 800px;
   margin: 24px auto 0;
 }
-.paas-chat-header {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  gap: 12px;
-}
-.paas-chat-header h1 {
-  font-size: 17px;
-  margin: 0 0 4px;
-}
-.paas-chat-header span {
-  font-size: 13px;
-}
-.paas-chat-header button {
-  display: flex;
-  align-items: center;
-  gap: 6px;
-}
-.paas-chat-tabs {
-  display: flex;
-  overflow-x: auto;
-  gap: 6px;
-  padding: 16px 0;
-}
-.paas-chat-tabs button {
-  max-width: 220px;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-  font-size: 12px;
-  flex-shrink: 0;
-}
-.paas-chat-tabs button[aria-current="page"] {
-  background: var(--background-weak);
-}
 .paas-chat-messages {
   max-height: 48vh;
   min-height: 240px;
@@ -959,10 +924,6 @@
   overflow: hidden;
   padding: 20px 28px 8px;
 }
-.paas-chat-header {
-  flex-shrink: 0;
-  padding-bottom: 16px;
-}
 .paas-chat-messages {
   flex: 1;
   min-height: 0;
@@ -1016,9 +977,6 @@
   .paas-conversation {
     padding: 12px 8px 8px;
   }
-  .paas-chat-header {
-    flex-wrap: wrap;
-  }
 }
 .paas-workspace .paas-topbar-connection {
   display: inline-flex;
@@ -1101,13 +1059,6 @@
   padding-top: 8px;
   padding-bottom: 8px;
 }
-.paas-chat-header h1 {
-  font-size: 19px;
-  font-weight: 600;
-}
-.paas-chat-header {
-  padding-bottom: 20px;
-}
 .paas-chat-messages {
   font-size: 16px;
   line-height: 1.8;
@@ -1197,9 +1148,6 @@
   .paas-composer {
     padding: 12px;
   }
-  .paas-chat-header h1 {
-    font-size: 17px;
-  }
 }
 
 /* Compact navigation rhythm; size the icon wrapper as well as its SVG. */
@@ -1692,7 +1640,6 @@
 }
 
 /* Keep the reading column and composer on the same axis. */
-.paas-chat-header,
 .paas-notifications,
 .paas-conversation > :is(.paas-composer, .paas-notice) {
   width: 100%;
@@ -1707,9 +1654,6 @@
   padding: 8px 0;
   scrollbar-gutter: stable both-edges;
 }
-.paas-chat-header {
-  padding-bottom: 12px;
-}
 .paas-chat-messages > :is(.paas-chat-message, .paas-chat-progress, .paas-chat-welcome) {
   width: min(100%, 840px);
   margin-left: auto;
@@ -2079,11 +2023,6 @@
   text-align: left;
 }
 @media (max-width: 720px) {
-  .paas-chat-header {
-    align-items: flex-start;
-    flex-wrap: wrap;
-    gap: 8px;
-  }
   .paas-chat-header-actions {
     justify-content: flex-start;
   }
@@ -2122,9 +2061,6 @@
   padding: 6px;
   border: 1px solid var(--border-base);
 }
-.paas-chat-header h1 {
-  overflow-wrap: anywhere;
-}
 
 /* Keep research content primary; secondary controls remain discoverable. */
 .paas-start-steps {
@@ -2185,13 +2121,6 @@
   margin: 0;
   text-align: left;
 }
-.paas-workspace .paas-chat-header {
-  padding-block: 14px;
-  gap: 12px;
-}
-.paas-chat-header h1 {
-  font-size: 20px;
-}
 .paas-workspace .paas-composer {
   padding: 12px 16px;
   max-height: 34vh;
@@ -2341,9 +2270,6 @@
   }
 }
 @media (max-width: 700px) {
-  .paas-workspace .paas-chat-header {
-    flex-wrap: wrap;
-  }
   .paas-workspace .paas-composer {
     max-height: 40vh;
     padding: 8px 10px;
@@ -2797,10 +2723,6 @@
   -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent);
   mask-image: linear-gradient(90deg, #000 86%, transparent);
 }
-.paas-workspace .paas-chat-header {
-  justify-content: flex-end;
-  padding: 6px 0 10px;
-}
 .paas-workspace .paas-chat-header-actions {
   flex-wrap: nowrap;
 }
@@ -2872,18 +2794,24 @@
 .paas-topbar-chat-actions .paas-chat-header-actions {
   position: relative;
 }
-.paas-topbar-chat-actions .paas-chat-header-actions > p.paas-muted {
-  position: absolute;
-  top: calc(100% + 6px);
-  right: 0;
-  z-index: 20;
-  width: 320px;
-  max-width: 60vw;
+.paas-more-actions-menu p.paas-muted {
+  max-width: 260px;
+  margin: 0;
   padding: 6px 8px;
-  border: 1px solid var(--border-weak-base);
-  border-radius: 8px;
-  background: var(--background-base);
-  text-align: right;
   font-size: 12px;
   line-height: 1.5;
 }
+@media (max-width: 900px) {
+  .paas-topbar-chat-actions .paas-action-workspace {
+    display: none;
+  }
+}
+@media (max-width: 560px) {
+  .paas-topbar-chat-actions .paas-action-settings {
+    display: none;
+  }
+  .paas-workspace.paas-chat-mode .paas-topbar-page,
+  .paas-workspace.paas-chat-mode .paas-topbar-divider {
+    display: none;
+  }
+}