mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-28 11:08:54 +00:00
fix(session-ui): use flat muted dividers for timeline notices (#64462)
This commit is contained in:
parent
c323ffb786
commit
b181df309d
2 changed files with 4 additions and 8 deletions
|
|
@ -9,8 +9,6 @@ export function TimelineSeparator(props: {
|
|||
providerID?: string
|
||||
variant?: string
|
||||
}) {
|
||||
const gradient =
|
||||
"linear-gradient(90deg, color-mix(in srgb, var(--v2-border-border-base) 0%, transparent) 0%, color-mix(in srgb, var(--v2-border-border-strong) 100%, transparent) 70%)"
|
||||
const label = () => (
|
||||
<bdi
|
||||
data-slot="session-timeline-notice-label"
|
||||
|
|
@ -25,7 +23,7 @@ export function TimelineSeparator(props: {
|
|||
|
||||
return (
|
||||
<div class="flex h-8 w-full items-center gap-3 text-v2-text-text-faint">
|
||||
<span class="h-px min-w-0 flex-1" style={{ "background-image": gradient }} />
|
||||
<span class="h-px min-w-0 flex-1 bg-v2-border-border-muted" />
|
||||
<span class="flex min-w-0 items-center gap-1 text-[13px] font-[440] leading-text-compact tracking-[-0.04px]">
|
||||
<Show when={props.providerID}>
|
||||
{(providerID) => <ProviderIcon id={providerID()} class="text-v2-icon-icon-faint" aria-hidden="true" />}
|
||||
|
|
@ -65,7 +63,7 @@ export function TimelineSeparator(props: {
|
|||
</Show>
|
||||
</span>
|
||||
</span>
|
||||
<span class="h-px min-w-0 flex-1 -scale-x-100" style={{ "background-image": gradient }} />
|
||||
<span class="h-px min-w-0 flex-1 bg-v2-border-border-muted" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ import { hasProviderIcon, ProviderIcon } from "@opencode/ui/provider-icon"
|
|||
import { Tooltip } from "@opencode/ui/tooltip"
|
||||
import { Show } from "solid-js"
|
||||
|
||||
const line = "h-px min-w-0 flex-1 bg-linear-to-r from-transparent to-v2-border-border-strong to-70%"
|
||||
|
||||
/**
|
||||
* A divider with its label, such as a model switch or Interrupted. Rows are spaced by block, so it is only as tall as its
|
||||
* text. A provider without its own icon shows none, rather than the generic fallback.
|
||||
|
|
@ -29,7 +27,7 @@ export function Separator(props: {
|
|||
|
||||
return (
|
||||
<div class="flex h-4 w-full items-center gap-3 text-v2-text-text-faint">
|
||||
<span class={`${line} rtl:-scale-x-100`} />
|
||||
<span class="h-px min-w-0 flex-1 bg-v2-border-border-muted" />
|
||||
<span class="flex min-w-0 items-center gap-1 text-[13px] font-[440] leading-text-compact tracking-[-0.04px]">
|
||||
<Show when={props.providerID && hasProviderIcon(props.providerID) ? props.providerID : undefined}>
|
||||
{(providerID) => <ProviderIcon id={providerID()} class="text-v2-icon-icon-faint" aria-hidden="true" />}
|
||||
|
|
@ -69,7 +67,7 @@ export function Separator(props: {
|
|||
</Show>
|
||||
</span>
|
||||
</span>
|
||||
<span class={`${line} ltr:-scale-x-100`} />
|
||||
<span class="h-px min-w-0 flex-1 bg-v2-border-border-muted" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue