diff options
| author | Adam <[email protected]> | 2025-10-22 17:51:09 -0500 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-10-22 17:51:16 -0500 |
| commit | 3c3d2f5a6e235870bf5634925b1715b9477b266a (patch) | |
| tree | cf51fc4c8cc4623f7d55d2215dc1d9cd42c94af4 /packages | |
| parent | f435049d36810b142f7b3ab8de24c8fd72af34f9 (diff) | |
| download | opencode-3c3d2f5a6e235870bf5634925b1715b9477b266a.tar.gz opencode-3c3d2f5a6e235870bf5634925b1715b9477b266a.zip | |
wip: desktop work
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/desktop/src/pages/index.tsx | 20 | ||||
| -rw-r--r-- | packages/ui/src/components/icon.tsx | 1 | ||||
| -rw-r--r-- | packages/ui/src/components/select.css | 2 | ||||
| -rw-r--r-- | packages/ui/src/components/select.tsx | 2 |
4 files changed, 18 insertions, 7 deletions
diff --git a/packages/desktop/src/pages/index.tsx b/packages/desktop/src/pages/index.tsx index 58d479111..5dbec6439 100644 --- a/packages/desktop/src/pages/index.tsx +++ b/packages/desktop/src/pages/index.tsx @@ -315,19 +315,27 @@ export default function Page() { <SelectDialog defaultOpen title="Select file" + placeholder="Search files" + emptyMessage="No files found" items={local.file.search} key={(x) => x} onOpenChange={(open) => setStore("fileSelectOpen", open)} onSelect={(x) => (x ? local.file.open(x, { pinned: true }) : undefined)} > {(i) => ( - <div class="w-full flex items-center justify-between"> - <div class="flex items-center gap-x-2 text-text-muted grow min-w-0"> + <div + classList={{ + "w-full flex items-center justify-between rounded-md": true, + }} + > + <div class="flex items-center gap-x-2 grow min-w-0"> <FileIcon node={{ path: i, type: "file" }} class="shrink-0 size-4" /> - <span class="text-xs text-text whitespace-nowrap">{getFilename(i)}</span> - <span class="text-xs text-text-muted/80 whitespace-nowrap overflow-hidden overflow-ellipsis truncate min-w-0"> - {getDirectory(i)} - </span> + <div class="flex items-center text-14-regular"> + <span class="text-text-weak whitespace-nowrap overflow-hidden overflow-ellipsis truncate min-w-0"> + {getDirectory(i)}/ + </span> + <span class="text-text-strong whitespace-nowrap">{getFilename(i)}</span> + </div> </div> <div class="flex items-center gap-x-1 text-text-muted/40 shrink-0"></div> </div> diff --git a/packages/ui/src/components/icon.tsx b/packages/ui/src/components/icon.tsx index 8d63bf0f8..36aa99a33 100644 --- a/packages/ui/src/components/icon.tsx +++ b/packages/ui/src/components/icon.tsx @@ -134,6 +134,7 @@ const newIcons = { "plus-small": `<path d="M9.99984 5.41699V10.0003M9.99984 10.0003V14.5837M9.99984 10.0003H5.4165M9.99984 10.0003H14.5832" stroke="currentColor" stroke-linecap="square"/>`, "chevron-down": `<path d="M6.6665 8.33325L9.99984 11.6666L13.3332 8.33325" stroke="currentColor" stroke-linecap="square"/>`, "arrow-up": `<path fill-rule="evenodd" clip-rule="evenodd" d="M9.99991 2.24121L16.0921 8.33343L15.2083 9.21731L10.6249 4.63397V17.5001H9.37492V4.63398L4.7916 9.21731L3.90771 8.33343L9.99991 2.24121Z" fill="currentColor"/>`, + "check-small": `<path d="M6.5 11.4412L8.97059 13.5L13.5 6.5" stroke="currentColor" stroke-linecap="square"/>`, } export interface IconProps extends ComponentProps<"svg"> { diff --git a/packages/ui/src/components/select.css b/packages/ui/src/components/select.css index 0eb7cea15..ed10cbf14 100644 --- a/packages/ui/src/components/select.css +++ b/packages/ui/src/components/select.css @@ -87,6 +87,8 @@ } [data-slot="item-indicator"] { margin-left: auto; + width: 16px; + height: 16px; } &:focus { outline: none; diff --git a/packages/ui/src/components/select.tsx b/packages/ui/src/components/select.tsx index 111608e28..806d7be12 100644 --- a/packages/ui/src/components/select.tsx +++ b/packages/ui/src/components/select.tsx @@ -52,7 +52,7 @@ export function Select<T>(props: SelectProps<T> & ButtonProps) { {props.label ? props.label(itemProps.item.rawValue) : (itemProps.item.rawValue as string)} </Kobalte.ItemLabel> <Kobalte.ItemIndicator data-slot="item-indicator"> - <Icon name="checkmark" /> + <Icon name="check-small" size="small" /> </Kobalte.ItemIndicator> </Kobalte.Item> )} |
