fix(app): list item background colors

This commit is contained in:
Adam 2026-03-12 20:49:44 -05:00
parent 5576662200
commit d961981e25
No known key found for this signature in database
GPG Key ID: 9CB48779AF150E75
6 changed files with 33 additions and 24 deletions

View File

@ -121,7 +121,7 @@ function ServerForm(props: ServerFormProps) {
return ( return (
<div class="px-5"> <div class="px-5">
<div class="bg-surface-raised-base rounded-md p-5 flex flex-col gap-3"> <div class="bg-surface-base rounded-md p-5 flex flex-col gap-3">
<div class="flex-1 min-w-0 [&_[data-slot=input-wrapper]]:relative"> <div class="flex-1 min-w-0 [&_[data-slot=input-wrapper]]:relative">
<TextField <TextField
type="text" type="text"
@ -542,7 +542,7 @@ export function DialogSelectServer() {
if (x) select(x) if (x) select(x)
}} }}
divider={true} divider={true}
class="px-5 [&_[data-slot=list-search-wrapper]]:w-full [&_[data-slot=list-scroll]]h-[300px] [&_[data-slot=list-scroll]]:overflow-y-auto [&_[data-slot=list-items]]:bg-surface-raised-base [&_[data-slot=list-items]]:rounded-md [&_[data-slot=list-item]]:min-h-14 [&_[data-slot=list-item]]:p-3 [&_[data-slot=list-item]]:!bg-transparent" class="px-5 [&_[data-slot=list-search-wrapper]]:w-full [&_[data-slot=list-scroll]]h-[300px] [&_[data-slot=list-scroll]]:overflow-y-auto [&_[data-slot=list-items]]:bg-surface-base [&_[data-slot=list-items]]:rounded-md [&_[data-slot=list-item]]:min-h-14 [&_[data-slot=list-item]]:p-3 [&_[data-slot=list-item]]:!bg-transparent"
> >
{(i) => { {(i) => {
const key = ServerConnection.key(i) const key = ServerConnection.key(i)

View File

@ -12,6 +12,7 @@ import { usePlatform } from "@/context/platform"
import { useSettings, monoFontFamily } from "@/context/settings" import { useSettings, monoFontFamily } from "@/context/settings"
import { playSound, SOUND_OPTIONS } from "@/utils/sound" import { playSound, SOUND_OPTIONS } from "@/utils/sound"
import { Link } from "./link" import { Link } from "./link"
import { SettingsList } from "./settings-list"
let demoSoundState = { let demoSoundState = {
cleanup: undefined as (() => void) | undefined, cleanup: undefined as (() => void) | undefined,
@ -177,7 +178,7 @@ export const SettingsGeneral: Component = () => {
const GeneralSection = () => ( const GeneralSection = () => (
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
<div class="bg-surface-raised-base px-4 rounded-lg"> <SettingsList>
<SettingsRow <SettingsRow
title={language.t("settings.general.row.language.title")} title={language.t("settings.general.row.language.title")}
description={language.t("settings.general.row.language.description")} description={language.t("settings.general.row.language.description")}
@ -248,7 +249,7 @@ export const SettingsGeneral: Component = () => {
triggerStyle={{ "min-width": "180px" }} triggerStyle={{ "min-width": "180px" }}
/> />
</SettingsRow> </SettingsRow>
</div> </SettingsList>
</div> </div>
) )
@ -256,7 +257,7 @@ export const SettingsGeneral: Component = () => {
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
<h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.appearance")}</h3> <h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.appearance")}</h3>
<div class="bg-surface-raised-base px-4 rounded-lg"> <SettingsList>
<SettingsRow <SettingsRow
title={language.t("settings.general.row.colorScheme.title")} title={language.t("settings.general.row.colorScheme.title")}
description={language.t("settings.general.row.colorScheme.description")} description={language.t("settings.general.row.colorScheme.description")}
@ -333,7 +334,7 @@ export const SettingsGeneral: Component = () => {
)} )}
</Select> </Select>
</SettingsRow> </SettingsRow>
</div> </SettingsList>
</div> </div>
) )
@ -341,7 +342,7 @@ export const SettingsGeneral: Component = () => {
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
<h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.notifications")}</h3> <h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.notifications")}</h3>
<div class="bg-surface-raised-base px-4 rounded-lg"> <SettingsList>
<SettingsRow <SettingsRow
title={language.t("settings.general.notifications.agent.title")} title={language.t("settings.general.notifications.agent.title")}
description={language.t("settings.general.notifications.agent.description")} description={language.t("settings.general.notifications.agent.description")}
@ -377,7 +378,7 @@ export const SettingsGeneral: Component = () => {
/> />
</div> </div>
</SettingsRow> </SettingsRow>
</div> </SettingsList>
</div> </div>
) )
@ -385,7 +386,7 @@ export const SettingsGeneral: Component = () => {
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
<h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.sounds")}</h3> <h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.sounds")}</h3>
<div class="bg-surface-raised-base px-4 rounded-lg"> <SettingsList>
<SettingsRow <SettingsRow
title={language.t("settings.general.sounds.agent.title")} title={language.t("settings.general.sounds.agent.title")}
description={language.t("settings.general.sounds.agent.description")} description={language.t("settings.general.sounds.agent.description")}
@ -430,7 +431,7 @@ export const SettingsGeneral: Component = () => {
)} )}
/> />
</SettingsRow> </SettingsRow>
</div> </SettingsList>
</div> </div>
) )
@ -438,7 +439,7 @@ export const SettingsGeneral: Component = () => {
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
<h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.updates")}</h3> <h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.updates")}</h3>
<div class="bg-surface-raised-base px-4 rounded-lg"> <SettingsList>
<SettingsRow <SettingsRow
title={language.t("settings.updates.row.startup.title")} title={language.t("settings.updates.row.startup.title")}
description={language.t("settings.updates.row.startup.description")} description={language.t("settings.updates.row.startup.description")}
@ -474,7 +475,7 @@ export const SettingsGeneral: Component = () => {
: language.t("settings.updates.action.checkNow")} : language.t("settings.updates.action.checkNow")}
</Button> </Button>
</SettingsRow> </SettingsRow>
</div> </SettingsList>
</div> </div>
) )
@ -504,7 +505,7 @@ export const SettingsGeneral: Component = () => {
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
<h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.desktop.section.wsl")}</h3> <h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.desktop.section.wsl")}</h3>
<div class="bg-surface-raised-base px-4 rounded-lg"> <SettingsList>
<SettingsRow <SettingsRow
title={language.t("settings.desktop.wsl.title")} title={language.t("settings.desktop.wsl.title")}
description={language.t("settings.desktop.wsl.description")} description={language.t("settings.desktop.wsl.description")}
@ -517,7 +518,7 @@ export const SettingsGeneral: Component = () => {
/> />
</div> </div>
</SettingsRow> </SettingsRow>
</div> </SettingsList>
</div> </div>
) )
}} }}
@ -537,7 +538,7 @@ export const SettingsGeneral: Component = () => {
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
<h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.display")}</h3> <h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.display")}</h3>
<div class="bg-surface-raised-base px-4 rounded-lg"> <SettingsList>
<SettingsRow <SettingsRow
title={ title={
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
@ -555,7 +556,7 @@ export const SettingsGeneral: Component = () => {
<Switch checked={value() === "wayland"} onChange={onChange} /> <Switch checked={value() === "wayland"} onChange={onChange} />
</div> </div>
</SettingsRow> </SettingsRow>
</div> </SettingsList>
</div> </div>
) )
}} }}

View File

@ -9,6 +9,7 @@ import fuzzysort from "fuzzysort"
import { formatKeybind, parseKeybind, useCommand } from "@/context/command" import { formatKeybind, parseKeybind, useCommand } from "@/context/command"
import { useLanguage } from "@/context/language" import { useLanguage } from "@/context/language"
import { useSettings } from "@/context/settings" import { useSettings } from "@/context/settings"
import { SettingsList } from "./settings-list"
const IS_MAC = typeof navigator === "object" && /(Mac|iPod|iPhone|iPad)/.test(navigator.platform) const IS_MAC = typeof navigator === "object" && /(Mac|iPod|iPhone|iPad)/.test(navigator.platform)
const PALETTE_ID = "command.palette" const PALETTE_ID = "command.palette"
@ -406,7 +407,7 @@ export const SettingsKeybinds: Component = () => {
<Show when={(filtered().get(group) ?? []).length > 0}> <Show when={(filtered().get(group) ?? []).length > 0}>
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
<h3 class="text-14-medium text-text-strong pb-2">{language.t(groupKey[group])}</h3> <h3 class="text-14-medium text-text-strong pb-2">{language.t(groupKey[group])}</h3>
<div class="bg-surface-raised-base px-4 rounded-lg"> <SettingsList>
<For each={filtered().get(group) ?? []}> <For each={filtered().get(group) ?? []}>
{(id) => ( {(id) => (
<div class="flex items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none"> <div class="flex items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none">
@ -432,7 +433,7 @@ export const SettingsKeybinds: Component = () => {
</div> </div>
)} )}
</For> </For>
</div> </SettingsList>
</div> </div>
</Show> </Show>
)} )}

View File

@ -0,0 +1,5 @@
import { type Component, type JSX } from "solid-js"
export const SettingsList: Component<{ children: JSX.Element }> = (props) => {
return <div class="bg-surface-base px-4 rounded-lg">{props.children}</div>
}

View File

@ -8,6 +8,7 @@ import { type Component, For, Show } from "solid-js"
import { useLanguage } from "@/context/language" import { useLanguage } from "@/context/language"
import { useModels } from "@/context/models" import { useModels } from "@/context/models"
import { popularProviders } from "@/hooks/use-providers" import { popularProviders } from "@/hooks/use-providers"
import { SettingsList } from "./settings-list"
type ModelItem = ReturnType<ReturnType<typeof useModels>["list"]>[number] type ModelItem = ReturnType<ReturnType<typeof useModels>["list"]>[number]
@ -100,7 +101,7 @@ export const SettingsModels: Component = () => {
<ProviderIcon id={group.category} class="size-5 shrink-0 icon-strong-base" /> <ProviderIcon id={group.category} class="size-5 shrink-0 icon-strong-base" />
<span class="text-14-medium text-text-strong">{group.items[0].provider.name}</span> <span class="text-14-medium text-text-strong">{group.items[0].provider.name}</span>
</div> </div>
<div class="bg-surface-raised-base px-4 rounded-lg"> <SettingsList>
<For each={group.items}> <For each={group.items}>
{(item) => { {(item) => {
const key = { providerID: item.provider.id, modelID: item.id } const key = { providerID: item.provider.id, modelID: item.id }
@ -124,7 +125,7 @@ export const SettingsModels: Component = () => {
) )
}} }}
</For> </For>
</div> </SettingsList>
</div> </div>
)} )}
</For> </For>

View File

@ -11,6 +11,7 @@ import { useGlobalSync } from "@/context/global-sync"
import { DialogConnectProvider } from "./dialog-connect-provider" import { DialogConnectProvider } from "./dialog-connect-provider"
import { DialogSelectProvider } from "./dialog-select-provider" import { DialogSelectProvider } from "./dialog-select-provider"
import { DialogCustomProvider } from "./dialog-custom-provider" import { DialogCustomProvider } from "./dialog-custom-provider"
import { SettingsList } from "./settings-list"
type ProviderSource = "env" | "api" | "config" | "custom" type ProviderSource = "env" | "api" | "config" | "custom"
type ProviderItem = ReturnType<ReturnType<typeof useProviders>["connected"]>[number] type ProviderItem = ReturnType<ReturnType<typeof useProviders>["connected"]>[number]
@ -136,7 +137,7 @@ export const SettingsProviders: Component = () => {
<div class="flex flex-col gap-8 max-w-[720px]"> <div class="flex flex-col gap-8 max-w-[720px]">
<div class="flex flex-col gap-1" data-component="connected-providers-section"> <div class="flex flex-col gap-1" data-component="connected-providers-section">
<h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.providers.section.connected")}</h3> <h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.providers.section.connected")}</h3>
<div class="bg-surface-raised-base px-4 rounded-lg"> <SettingsList>
<Show <Show
when={connected().length > 0} when={connected().length > 0}
fallback={ fallback={
@ -169,12 +170,12 @@ export const SettingsProviders: Component = () => {
)} )}
</For> </For>
</Show> </Show>
</div> </SettingsList>
</div> </div>
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
<h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.providers.section.popular")}</h3> <h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.providers.section.popular")}</h3>
<div class="bg-surface-raised-base px-4 rounded-lg"> <SettingsList>
<For each={popular()}> <For each={popular()}>
{(item) => ( {(item) => (
<div class="flex flex-wrap items-center justify-between gap-4 min-h-16 py-3 border-b border-border-weak-base last:border-none"> <div class="flex flex-wrap items-center justify-between gap-4 min-h-16 py-3 border-b border-border-weak-base last:border-none">
@ -232,7 +233,7 @@ export const SettingsProviders: Component = () => {
{language.t("common.connect")} {language.t("common.connect")}
</Button> </Button>
</div> </div>
</div> </SettingsList>
<Button <Button
variant="ghost" variant="ghost"