Skip to content

Commit 948b619

Browse files
committed
fix(desktop): match title-only modal headers
1 parent d8fe1ae commit 948b619

5 files changed

Lines changed: 1 addition & 9 deletions

File tree

‎apps/desktop/src/main/dialogs.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export function showShellDialog(
4242
title: options.title ?? 'Sim',
4343
message: options.message,
4444
detail: options.detail ?? '',
45-
type: options.type ?? 'none',
4645
buttons,
4746
defaultId: options.defaultId ?? 0,
4847
cancelId,

‎apps/desktop/src/renderer/dialog/index.tsx‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { ChipModalBody, ChipModalFooter, ChipModalHeader, ChipModalSurface } from '@sim/emcn'
2-
import { CircleInfo, TriangleAlert } from '@sim/emcn/icons'
32
import { createRoot } from 'react-dom/client'
43
import { initializeShellPage, observeShellSize, shellWindow } from '@/renderer/shell'
54
import type { ShellDialogConfiguration } from '@/shared/shell'
@@ -10,7 +9,7 @@ interface ShellDialogProps {
109
}
1110

1211
function ShellDialog({ configuration }: ShellDialogProps) {
13-
const { message, detail, buttons, defaultId, cancelId, type } = configuration
12+
const { message, detail, buttons, defaultId, cancelId } = configuration
1413
const primaryId = buttons.length === 1 ? 0 : buttons.findIndex((_, index) => index !== cancelId)
1514
const respond = (response: number) => shellWindow?.respond(response)
1615
const close = () => respond(cancelId)
@@ -28,7 +27,6 @@ function ShellDialog({ configuration }: ShellDialogProps) {
2827
className='max-h-screen'
2928
>
3029
<ChipModalHeader
31-
icon={type === 'error' || type === 'warning' ? TriangleAlert : CircleInfo}
3230
onClose={close}
3331
className='[-webkit-app-region:drag] [&_button]:[-webkit-app-region:no-drag]'
3432
>

‎apps/desktop/src/renderer/server/server-modal.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
ChipModalHeader,
88
ChipModalSurface,
99
} from '@sim/emcn'
10-
import { Server } from '@sim/emcn/icons'
1110
import { observeShellSize } from '@/renderer/shell'
1211
import type { ShellWindowApi } from '@/shared/shell'
1312

@@ -70,7 +69,6 @@ export function ServerModal({ server, configuration, initialError }: ServerModal
7069
className='max-h-screen [&_input]:select-text'
7170
>
7271
<ChipModalHeader
73-
icon={Server}
7472
onClose={closeWindow}
7573
className='[-webkit-app-region:drag] [&_button]:[-webkit-app-region:no-drag]'
7674
>

‎apps/desktop/src/shared/shell.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export interface ShellDialogConfiguration {
44
title: string
55
message: string
66
detail: string
7-
type: 'none' | 'info' | 'error' | 'question' | 'warning'
87
buttons: string[]
98
defaultId: number
109
cancelId: number

‎apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/components/terminal-session/use-terminal-close-confirmation.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useCallback, useEffect, useRef, useState } from 'react'
22
import { ChipConfirmModal, toast } from '@sim/emcn'
3-
import { TerminalWindow } from '@sim/emcn/icons'
43
import { describeRunningCommand } from '@sim/terminal-protocol'
54
import { useCopilotTerminalStore } from '@/stores/copilot-terminal/store'
65

@@ -67,7 +66,6 @@ export function useTerminalCloseConfirmation(scopeId: string) {
6766
if (!open) settle(false)
6867
}}
6968
title={request.targets.length === 1 ? 'Close terminal?' : 'Close terminals?'}
70-
icon={TerminalWindow}
7169
text={
7270
running.length === 1
7371
? `${describeRunningCommand(running[0])} is still running. Closing the terminal will stop it.`

0 commit comments

Comments
 (0)