refactor(ui): replace middle-dot separators with clearer hierarchy (#6087)
* refactor(ui): replace middle-dot separators with clearer hierarchy * refactor(ui): use layout instead of punctuation separators
This commit is contained in:
1 parent
d6ddceed99
commit
7cb396788c
82 files changed
+433
-462
No files matched your search
@@ -526,10 +526,9 @@ function MarketplaceSkillRow({
|
||||
</div>
|
||||
<div className="mt-1 flex min-w-0 items-center gap-1.5 truncate text-[12px] text-muted-foreground">
|
||||
{skill.source}
|
||||
{skill.version ? <span>· v{skill.version}</span> : null}
|
||||
{skill.version ? <span>v{skill.version}</span> : null}
|
||||
{skill.provider === "skills_sh" ? (
|
||||
<>
|
||||
<span>·</span>
|
||||
{skill.metric === "installs_24h"
|
||||
? t("settings.skills.marketplaceInstalls24h", {
|
||||
count: skill.installs,
|
||||
|
||||
@@ -90,7 +90,7 @@ export function TokenUsageModelTrend({ days, modelDays, models }: {
|
||||
const tokens = columns.reduce((sum, column) => sum + column.values[index], 0);
|
||||
const rate = model?.cache_read_observed_input_tokens ? percent.format(model.cache_read_tokens / model.cache_read_observed_input_tokens) : "—";
|
||||
const parts = [
|
||||
[t("settings.usage.totalTokens"), `${number.format(tokens)} · ${percent.format(tokens / total)}`],
|
||||
[t("settings.usage.totalTokens"), `${number.format(tokens)} (${percent.format(tokens / total)})`],
|
||||
[t("settings.usage.cacheHitRate"), rate],
|
||||
];
|
||||
return <Tooltip key={index}>
|
||||
|
||||
@@ -107,10 +107,8 @@ export function ChannelValidationProgress({
|
||||
const status = validation?.status ?? (feature.configured ? "configured" : "needs_setup");
|
||||
const presentation = channelUiPresentation(feature.name, feature.webui);
|
||||
const identity = validation?.identity?.name
|
||||
? validation.identity.workspace
|
||||
? `${validation.identity.name} · ${validation.identity.workspace}`
|
||||
: validation.identity.name
|
||||
: presentation?.displayName ?? feature.display_name;
|
||||
|| presentation?.displayName || feature.display_name;
|
||||
const workspace = validation?.identity?.workspace;
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -173,7 +171,10 @@ export function ChannelValidationProgress({
|
||||
)}
|
||||
>
|
||||
{channelValidationStatusIcon(status)}
|
||||
<span className="min-w-0 truncate font-semibold">{identity}</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block truncate font-semibold">{identity}</span>
|
||||
{workspace ? <span className="block truncate font-normal">{workspace}</span> : null}
|
||||
</span>
|
||||
<span className="lowercase">{channelValidationStatusLabel(status, t)}</span>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
@@ -511,15 +511,13 @@ export function ModelsSettings({
|
||||
<span className="block text-[14px] font-medium text-foreground">
|
||||
{tx("settings.models.advancedOptions", "Advanced options")}
|
||||
</span>
|
||||
<span className="mt-0.5 block text-[12px] text-muted-foreground">
|
||||
{tx(
|
||||
"settings.models.advancedSummary",
|
||||
"Context {{context}} · Max {{max}} tokens",
|
||||
{
|
||||
context: Number.isFinite(form.contextWindowTokens) ? formatModelContextWindow(form.contextWindowTokens) : "—",
|
||||
max: formatContextWindow(form.maxTokens),
|
||||
},
|
||||
)}
|
||||
<span className="mt-0.5 flex flex-wrap gap-x-3 text-[12px] tabular-nums text-muted-foreground">
|
||||
<span>{tx("settings.models.contextSummary", "Context {{context}}", {
|
||||
context: Number.isFinite(form.contextWindowTokens) ? formatModelContextWindow(form.contextWindowTokens) : "—",
|
||||
})}</span>{" "}
|
||||
<span>{tx("settings.models.outputSummary", "Max {{max}} tokens", {
|
||||
max: formatContextWindow(form.maxTokens),
|
||||
})}</span>
|
||||
</span>
|
||||
</span>
|
||||
<ChevronDown
|
||||
|
||||
@@ -344,10 +344,9 @@ export function ModelIdPicker({
|
||||
{model.label ?? model.id}
|
||||
</span>
|
||||
{model.description || (model.label && model.label !== model.id) ? (
|
||||
<span className="mt-0.5 block truncate text-[10.5px] text-muted-foreground">
|
||||
{[model.label && model.label !== model.id ? model.id : null, model.description]
|
||||
.filter(Boolean)
|
||||
.join(" · ")}
|
||||
<span className="mt-0.5 flex min-w-0 flex-wrap gap-x-2 text-[10.5px] text-muted-foreground">
|
||||
{model.label && model.label !== model.id ? <span className="truncate font-mono">{model.id}</span> : null}{" "}
|
||||
{model.description ? <span className="truncate">{model.description}</span> : null}
|
||||
</span>
|
||||
) : null}
|
||||
</span>
|
||||
|
||||
@@ -23,15 +23,15 @@ export function TimezonePicker({ value, onChange, ...triggerProps }: {
|
||||
.formatToParts(now).find((part) => part.type === "timeZoneName")?.value ?? zone;
|
||||
const offset = new Intl.DateTimeFormat("en", { timeZone: zone, timeZoneName: "longOffset" })
|
||||
.formatToParts(now).find((part) => part.type === "timeZoneName")?.value ?? "";
|
||||
return { zone, detail: `${name} · ${offset.replace("GMT", "UTC")}` };
|
||||
return { zone, detail: name, offset: offset.replace("GMT", "UTC") };
|
||||
} catch {
|
||||
// Keep a server-supported timezone visible even if this browser cannot format it.
|
||||
return { zone, detail: zone };
|
||||
return { zone, detail: zone, offset: "" };
|
||||
}
|
||||
});
|
||||
}, [i18n.language, value]);
|
||||
const filtered = options.filter(({ zone, detail }) =>
|
||||
`${zone.replaceAll("_", " ")} ${zone} ${detail}`.toLocaleLowerCase(i18n.language)
|
||||
const filtered = options.filter(({ zone, detail, offset }) =>
|
||||
`${zone.replaceAll("_", " ")} ${zone} ${detail} ${offset}`.toLocaleLowerCase(i18n.language)
|
||||
.includes(query.trim().toLocaleLowerCase(i18n.language)));
|
||||
const select = (zone: string) => { onChange(zone); setOpen(false); };
|
||||
const navigation = useComboboxNavigation({
|
||||
@@ -52,10 +52,12 @@ export function TimezonePicker({ value, onChange, ...triggerProps }: {
|
||||
aria-label={t("sidebar.searchAria")} placeholder={t("sidebar.searchPlaceholder")}
|
||||
className="mb-1.5 h-9 rounded-full" />
|
||||
<div {...navigation.listProps} aria-label={triggerProps["aria-label"]} className="max-h-64 overflow-y-auto">
|
||||
{filtered.map(({ zone, detail }) => (
|
||||
{filtered.map(({ zone, detail, offset }) => (
|
||||
<ComboboxOption key={zone} {...navigation.getOptionProps(zone)} className="block">
|
||||
<span className="block">{zone}</span>
|
||||
<span className="block text-xs text-muted-foreground">{detail}</span>
|
||||
<span className="flex flex-wrap gap-x-2 text-xs text-muted-foreground">
|
||||
<span>{detail}</span>{" "}<span className="tabular-nums">{offset}</span>
|
||||
</span>
|
||||
</ComboboxOption>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -576,9 +576,7 @@ function McpAppsCatalogRow({
|
||||
`settings.mcp.presetDescriptions.${preset.name}`,
|
||||
preset.description || preset.note || preset.name,
|
||||
);
|
||||
const detail = agentPlugin && preset.requires
|
||||
? `${description} · ${preset.requires}`
|
||||
: description || preset.requires;
|
||||
const detail = description || preset.requires;
|
||||
const manualCallback =
|
||||
oauthFlow?.completion_input === "callback_url" && Boolean(oauthFlow.authorization_url);
|
||||
const callbackInputId = `mcp-oauth-callback-${preset.name}`;
|
||||
@@ -629,6 +627,9 @@ function McpAppsCatalogRow({
|
||||
<span className="truncate">
|
||||
{runtimeFailed ? failureLabel : detail}
|
||||
</span>
|
||||
{!runtimeFailed && agentPlugin && description && preset.requires ? (
|
||||
<span className="min-w-0 truncate">{preset.requires}</span>
|
||||
) : null}
|
||||
</p>
|
||||
</div>
|
||||
<div className="ml-auto flex shrink-0 items-center gap-1">
|
||||
@@ -1431,9 +1432,7 @@ function CliAppReadyPanel({
|
||||
</div>
|
||||
<div className="mt-0.5 flex min-w-0 flex-wrap items-center gap-1.5 text-[12px] text-muted-foreground">
|
||||
<span className="font-mono">@{app.name}</span>
|
||||
<span aria-hidden>·</span>
|
||||
<span className="truncate font-mono">{app.entry_point || app.name}</span>
|
||||
<span aria-hidden>·</span>
|
||||
<span>{app.category}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -535,7 +535,6 @@ function ConnectionPanel({
|
||||
preset.connection_summary && "mt-3 border-t border-border/45 pt-3",
|
||||
)}>
|
||||
<span>{formatTransport(preset.transport)}</span>
|
||||
<span aria-hidden>·</span>
|
||||
<span>{authentication}</span>
|
||||
<div className="ml-auto flex items-center gap-1.5">
|
||||
{preset.docs_url ? (
|
||||
@@ -587,11 +586,11 @@ function ConnectionPanel({
|
||||
const inputId = `mcp-manage-${preset.name}-${field.name}`;
|
||||
return (
|
||||
<label key={field.name} htmlFor={inputId} className="min-w-0">
|
||||
<span className="mb-1.5 flex items-center gap-1 text-[12.5px] font-medium text-muted-foreground">
|
||||
<span className="mb-1.5 flex items-center gap-2 text-[12.5px] font-medium text-muted-foreground">
|
||||
{field.label}
|
||||
{field.configured ? (
|
||||
<span className="font-normal text-emerald-600 dark:text-emerald-300">
|
||||
· {tx("settings.mcp.configured", "Configured")}
|
||||
{tx("settings.mcp.configured", "Configured")}
|
||||
</span>
|
||||
) : null}
|
||||
</span>
|
||||
|
||||
Reference in new issue
Block a user