Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/desktop-sidebar-status-right.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sfmc-bds/desktop": patch
---

实例状态灯移到侧栏右侧,实例名称与侧栏其余文字左对齐。
4 changes: 2 additions & 2 deletions packages/desktop/src/renderer/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function profileSubtitle(profile: InstanceProfile): string {
: `${profile.username ? `${profile.username}@` : ""}${profile.host}${profile.port && profile.port !== 22 ? `:${profile.port}` : ""} ${profile.os === "windows" ? "Windows" : "Linux"}`;
}

/** 实例列表:每行一个实例(状态点 + 名称),当前实例高亮,悬停显示设置按钮 */
/** 实例列表:每行一个实例,名称在左、状态点在右。当前实例高亮,悬停显示设置按钮 */
function InstanceList({ collapsed }: { collapsed: boolean }) {
const { profiles, current, setCurrent, models, openProfileDialog } = useDesktop();
return (
Expand Down Expand Up @@ -55,9 +55,9 @@ function InstanceList({ collapsed }: { collapsed: boolean }) {
aria-current={active ? "true" : undefined}
onClick={() => setCurrent(profile.id)}
>
<StatusDot tone={state.tone} pulse={state.tone === "info"} />
<span className="truncate">{profile.name}</span>
<Icon name={profile.kind === "ssh" ? "server" : "monitor"} size={14} className="sb-instance-kind" />
<StatusDot tone={state.tone} pulse={state.tone === "info"} />
</button>
</Tooltip>
<IconButton
Expand Down
Loading