Compare commits

..

1 Commits

Author SHA1 Message Date
Kit Langton b0ac25b0a8 fix(tui): distinguish disconnect actions 2026-08-06 19:56:43 -04:00
3 changed files with 6 additions and 10 deletions
@@ -123,6 +123,7 @@ function manageConnections(
onConnected?: OnIntegrationConnected,
) {
dialog.replace(() => {
const theme = useTheme("elevated")
const data = useData()
const client = useClient()
const toast = useToast()
@@ -142,6 +143,9 @@ function manageConnections(
...credentialConnections(integration).map((connection) => ({
title: `Disconnect ${connection.label}`,
value: connection.id,
category: "Connected accounts",
bg: theme.background.action.destructive.focused,
fg: theme.text.action.destructive.focused,
onSelect: () => {
void client.api.credential
.remove({ credentialID: connection.id, location: location(data) })
@@ -258,7 +258,6 @@ export function DialogMoveSession(props: DialogMoveSessionProps) {
const choice = await DialogWorkspaceFileChanges.show(dialog, status?.data ?? [], {
title: "Delete working copy?",
message: "This working copy has file changes. Do you want to delete it anyway?",
labels: { no: "cancel", yes: "delete" },
})
if (choice !== "yes") {
reopen()
@@ -29,7 +29,6 @@ export function DialogWorkspaceFileChanges(props: {
onSelect: (choice: WorkspaceFileChangesChoice) => void
title?: string
message?: string
labels?: Partial<Record<WorkspaceFileChangesChoice, string>>
}) {
const dialog = useDialog()
const theme = useTheme("elevated")
@@ -126,9 +125,7 @@ export function DialogWorkspaceFileChanges(props: {
dialog.clear()
}}
>
<text fg={item === store.active ? theme.text.action.primary.focused : theme.text.subdued}>
{props.labels?.[item] ?? (item === "no" ? "cancel" : "move")}
</text>
<text fg={item === store.active ? theme.text.action.primary.focused : theme.text.subdued}>{item}</text>
</box>
)}
</For>
@@ -140,11 +137,7 @@ export function DialogWorkspaceFileChanges(props: {
DialogWorkspaceFileChanges.show = (
dialog: DialogContext,
files: VcsFileStatus[],
options?: {
title?: string
message?: string
labels?: Partial<Record<WorkspaceFileChangesChoice, string>>
},
options?: { title?: string; message?: string },
) => {
return new Promise<WorkspaceFileChangesChoice | undefined>((resolve) => {
dialog.replace(