فهرست منبع

wip(desktop): progress

Adam 2 ماه پیش
والد
کامیت
41d78c1ecc
3فایلهای تغییر یافته به همراه9 افزوده شده و 9 حذف شده
  1. 1 1
      packages/desktop/src/pages/home.tsx
  2. 7 7
      packages/desktop/src/pages/layout.tsx
  3. 1 1
      packages/ui/src/components/button.css

+ 1 - 1
packages/desktop/src/pages/home.tsx

@@ -51,7 +51,7 @@ export default function Home() {
             <ul class="flex flex-col gap-2">
             <ul class="flex flex-col gap-2">
               <For
               <For
                 each={sync.data.projects
                 each={sync.data.projects
-                  .sort((a, b) => (b.time.updated ?? b.time.created) - (a.time.updated ?? a.time.created))
+                  .toSorted((a, b) => (b.time.updated ?? b.time.created) - (a.time.updated ?? a.time.created))
                   .slice(0, 5)}
                   .slice(0, 5)}
               >
               >
                 {(project) => (
                 {(project) => (

+ 7 - 7
packages/desktop/src/pages/layout.tsx

@@ -149,7 +149,7 @@ export default function Layout(props: ParentProps) {
             as={"div"}
             as={"div"}
             variant="ghost"
             variant="ghost"
             data-active
             data-active
-            class="flex items-center justify-between gap-3 w-full px-1 self-stretch h-8 border-none"
+            class="flex items-center justify-between gap-3 w-full px-1 self-stretch h-8 border-none rounded-lg"
           >
           >
             <div class="flex items-center gap-3 p-0 text-left min-w-0 grow">
             <div class="flex items-center gap-3 p-0 text-left min-w-0 grow">
               <div class="size-6 shrink-0">
               <div class="size-6 shrink-0">
@@ -168,7 +168,7 @@ export default function Layout(props: ParentProps) {
           <Button
           <Button
             variant="ghost"
             variant="ghost"
             size="large"
             size="large"
-            class="flex items-center justify-center p-0 aspect-square border-none"
+            class="flex items-center justify-center p-0 aspect-square border-none rounded-lg"
             data-selected={props.project.worktree === currentDirectory()}
             data-selected={props.project.worktree === currentDirectory()}
             onClick={() => navigateToProject(props.project.worktree)}
             onClick={() => navigateToProject(props.project.worktree)}
           >
           >
@@ -200,7 +200,7 @@ export default function Layout(props: ParentProps) {
               <Button
               <Button
                 as={"div"}
                 as={"div"}
                 variant="ghost"
                 variant="ghost"
-                class="group/session flex items-center justify-between gap-3 w-full px-1 self-stretch h-auto border-none"
+                class="group/session flex items-center justify-between gap-3 w-full px-1 self-stretch h-auto border-none rounded-lg"
               >
               >
                 <Collapsible.Trigger class="group/trigger flex items-center gap-3 p-0 text-left min-w-0 grow border-none">
                 <Collapsible.Trigger class="group/trigger flex items-center gap-3 p-0 text-left min-w-0 grow border-none">
                   <div class="size-6 shrink-0">
                   <div class="size-6 shrink-0">
@@ -419,7 +419,7 @@ export default function Layout(props: ParentProps) {
               <Button
               <Button
                 variant="ghost"
                 variant="ghost"
                 size="large"
                 size="large"
-                class="group/sidebar-toggle shrink-0 w-full text-left justify-start"
+                class="group/sidebar-toggle shrink-0 w-full text-left justify-start rounded-lg"
                 onClick={layout.sidebar.toggle}
                 onClick={layout.sidebar.toggle}
               >
               >
                 <div class="relative -ml-px flex items-center justify-center size-4 [&>*]:absolute [&>*]:inset-0">
                 <div class="relative -ml-px flex items-center justify-center size-4 [&>*]:absolute [&>*]:inset-0">
@@ -468,7 +468,7 @@ export default function Layout(props: ParentProps) {
             <Show when={platform.openDirectoryPickerDialog}>
             <Show when={platform.openDirectoryPickerDialog}>
               <Tooltip placement="right" value="Open project" inactive={layout.sidebar.opened()}>
               <Tooltip placement="right" value="Open project" inactive={layout.sidebar.opened()}>
                 <Button
                 <Button
-                  class="flex w-full text-left justify-start text-12-medium text-text-base stroke-[1.5px]"
+                  class="flex w-full text-left justify-start text-12-medium text-text-base stroke-[1.5px] rounded-lg"
                   variant="ghost"
                   variant="ghost"
                   size="large"
                   size="large"
                   icon="folder-add-left"
                   icon="folder-add-left"
@@ -481,7 +481,7 @@ export default function Layout(props: ParentProps) {
             <Tooltip placement="right" value="Settings" inactive={layout.sidebar.opened()}>
             <Tooltip placement="right" value="Settings" inactive={layout.sidebar.opened()}>
               <Button
               <Button
                 disabled
                 disabled
-                class="flex w-full text-left justify-start text-12-medium text-text-base stroke-[1.5px]"
+                class="flex w-full text-left justify-start text-12-medium text-text-base stroke-[1.5px] rounded-lg"
                 variant="ghost"
                 variant="ghost"
                 size="large"
                 size="large"
                 icon="settings-gear"
                 icon="settings-gear"
@@ -494,7 +494,7 @@ export default function Layout(props: ParentProps) {
                 as={"a"}
                 as={"a"}
                 href="https://opencode.ai/desktop-feedback"
                 href="https://opencode.ai/desktop-feedback"
                 target="_blank"
                 target="_blank"
-                class="flex w-full text-left justify-start text-12-medium text-text-base stroke-[1.5px]"
+                class="flex w-full text-left justify-start text-12-medium text-text-base stroke-[1.5px] rounded-lg"
                 variant="ghost"
                 variant="ghost"
                 size="large"
                 size="large"
                 icon="bubble-5"
                 icon="bubble-5"

+ 1 - 1
packages/ui/src/components/button.css

@@ -4,7 +4,7 @@
   justify-content: center;
   justify-content: center;
   border-style: solid;
   border-style: solid;
   border-width: 1px;
   border-width: 1px;
-  border-radius: var(--radius-lg);
+  border-radius: var(--radius-md);
   text-decoration: none;
   text-decoration: none;
   user-select: none;
   user-select: none;
   cursor: default;
   cursor: default;