Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
style(desktop): refine target type and device row styles
Richie McIlroy41bf6f027d30
diff --git a/apps/desktop/src/routes/(window-chrome)/new-main/TargetDropdownButton.tsx b/apps/desktop/src/routes/(window-chrome)/new-main/TargetDropdownButton.tsxindex 4c6c7b261..7ee839866 100644--- a/apps/desktop/src/routes/(window-chrome)/new-main/TargetDropdownButton.tsx+++ b/apps/desktop/src/routes/(window-chrome)/new-main/TargetDropdownButton.tsx@@ -27,8 +27,8 @@ export default function TargetDropdownButton<aria-expanded={local.expanded ? "true" : "false"}data-expanded={local.expanded ? "true" : "false"}class={cx(- "flex w-5 shrink-0 items-center justify-center rounded-lg bg-gray-4 text-gray-12 transition-colors duration-150 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-9 focus-visible:ring-offset-2 focus-visible:ring-offset-gray-1 hover:bg-gray-5",- local.expanded && "bg-gray-5",+ "flex w-7 shrink-0 items-center justify-center rounded-lg bg-gray-4 text-gray-12 transition-colors duration-150 hover:bg-gray-6 active:bg-gray-7 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-9 focus-visible:ring-offset-2 focus-visible:ring-offset-gray-1",+ local.expanded && "bg-blue-4 text-blue-11",local.disabled && "pointer-events-none opacity-60",local.class,)}diff --git a/apps/desktop/src/routes/(window-chrome)/new-main/TargetTypeButton.tsx b/apps/desktop/src/routes/(window-chrome)/new-main/TargetTypeButton.tsxindex c295d46de..d74d682a1 100644--- a/apps/desktop/src/routes/(window-chrome)/new-main/TargetTypeButton.tsx+++ b/apps/desktop/src/routes/(window-chrome)/new-main/TargetTypeButton.tsx@@ -5,6 +5,7 @@ type TargetTypeButtonProps = {selected: boolean;Component: Component<ComponentProps<"svg">>;name: string;+ description?: string;disabled?: boolean;} & ComponentProps<"button">;@@ -13,6 +14,7 @@ function TargetTypeButton(props: TargetTypeButtonProps) {"selected","Component","name",+ "description","disabled","class",]);@@ -24,19 +26,38 @@ function TargetTypeButton(props: TargetTypeButtonProps) {disabled={local.disabled}aria-pressed={local.selected ? "true" : "false"}class={cx(- "flex flex-1 flex-col items-center justify-end gap-1 rounded-lg border border-gray-5 bg-gray-3 py-2 text-center transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-9 focus-visible:ring-offset-2 focus-visible:ring-offset-gray-1",- local.selected ? "text-gray-12" : "text-gray-12 hover:bg-gray-4",+ "flex flex-1 flex-col items-center gap-1 rounded-lg border py-2 text-center transition-[background-color,border-color,color] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-9 focus-visible:ring-offset-2 focus-visible:ring-offset-gray-1",+ local.description &&+ "min-h-14 flex-row items-center justify-start gap-2.5 px-3 text-left",+ !local.description && "justify-end",+ local.selected+ ? "border-blue-8 bg-blue-3 text-blue-11 hover:border-blue-9 hover:bg-blue-4 active:bg-blue-5 dark:bg-blue-3/30 dark:hover:bg-blue-4/40"+ : "border-gray-6 bg-gray-2 text-gray-12 hover:border-gray-8 hover:bg-gray-4 active:bg-gray-5",local.disabled && "pointer-events-none opacity-60",local.class,)}><local.Componentclass={cx(- "size-5 transition-colors",- local.selected ? "text-gray-12" : "text-gray-9",+ "size-5 shrink-0 transition-colors",+ local.selected ? "text-blue-10" : "text-gray-10",)}/>- <p class="text-xs">{local.name}</p>+ <div class="min-w-0">+ <p class={cx("text-xs", local.description && "font-medium leading-4")}>+ {local.name}+ </p>+ {local.description && (+ <p+ class={cx(+ "text-[10px] leading-3",+ local.selected ? "text-blue-10" : "text-gray-10",+ )}+ >+ {local.description}+ </p>+ )}+ </div></button>);}diff --git a/apps/desktop/src/routes/(window-chrome)/new-main/deviceRowStyles.ts b/apps/desktop/src/routes/(window-chrome)/new-main/deviceRowStyles.tsindex 3dd73d2f0..78ece5fdc 100644--- a/apps/desktop/src/routes/(window-chrome)/new-main/deviceRowStyles.ts+++ b/apps/desktop/src/routes/(window-chrome)/new-main/deviceRowStyles.ts@@ -1,10 +1,10 @@export const DEVICE_ROW_CLASS =- "group relative isolate overflow-hidden flex flex-row gap-2.5 items-center pl-3 pr-1.5 w-full h-[42px] rounded-lg border border-gray-5 bg-gray-3 transition-[background-color,border-color,color] cursor-default disabled:opacity-70 disabled:text-gray-11 enabled:hover:bg-gray-4 enabled:hover:border-gray-6 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-9 focus-visible:ring-offset-2 focus-visible:ring-offset-gray-1";+ "group relative isolate overflow-hidden flex flex-row gap-2.5 items-center pl-3 pr-1.5 w-full h-[42px] rounded-lg border border-gray-6 bg-gray-2 transition-[background-color,border-color,color] duration-150 cursor-default disabled:opacity-70 disabled:text-gray-11 enabled:hover:bg-gray-4 enabled:hover:border-gray-8 enabled:active:bg-gray-5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-9 focus-visible:ring-offset-2 focus-visible:ring-offset-gray-1";-export const DEVICE_ROW_ICON_CLASS = "text-gray-10 size-4 shrink-0";+export const DEVICE_ROW_ICON_CLASS = "text-gray-11 size-4 shrink-0";export const DEVICE_ROW_LABEL_CLASS =- "flex-1 min-w-0 text-sm text-left truncate";+ "flex-1 min-w-0 text-sm font-medium text-left truncate";export const DEVICE_ROW_TRAILING_CLASS = "flex items-center gap-0.5 shrink-0";