Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitefba477

Browse files
authored
fix: hide actions and notifications from deleted workspaces (#12563)
1 parent489b0ec commitefba477

File tree

1 file changed

+45
-35
lines changed

1 file changed

+45
-35
lines changed

‎site/src/pages/WorkspacePage/WorkspaceTopbar.tsx

Lines changed: 45 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
106106
allowAdvancedScheduling,
107107
);
108108

109+
constisImmutable=
110+
workspace.latest_build.status==="deleted"||
111+
workspace.latest_build.status==="deleting";
112+
109113
return(
110114
<Topbarcss={{gridArea:"topbar"}}>
111115
<Tooltiptitle="Back to workspaces">
@@ -196,11 +200,13 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
196200
</Popover>
197201
</TopbarData>
198202

199-
<WorkspaceScheduleControls
200-
workspace={workspace}
201-
template={template}
202-
canUpdateSchedule={canUpdateWorkspace}
203-
/>
203+
{!isImmutable&&(
204+
<WorkspaceScheduleControls
205+
workspace={workspace}
206+
template={template}
207+
canUpdateSchedule={canUpdateWorkspace}
208+
/>
209+
)}
204210

205211
{shouldDisplayDormantData&&(
206212
<TopbarData>
@@ -247,36 +253,40 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
247253
gap:12,
248254
}}
249255
>
250-
<WorkspaceNotifications
251-
workspace={workspace}
252-
template={template}
253-
latestVersion={latestVersion}
254-
permissions={permissions}
255-
onRestartWorkspace={handleRestart}
256-
onUpdateWorkspace={handleUpdate}
257-
onActivateWorkspace={handleDormantActivate}
258-
/>
259-
<WorkspaceStatusBadgeworkspace={workspace}/>
260-
<WorkspaceActions
261-
workspace={workspace}
262-
handleStart={handleStart}
263-
handleStop={handleStop}
264-
handleRestart={handleRestart}
265-
handleDelete={handleDelete}
266-
handleUpdate={handleUpdate}
267-
handleCancel={handleCancel}
268-
handleSettings={handleSettings}
269-
handleRetry={handleRetry}
270-
handleDebug={handleDebug}
271-
handleChangeVersion={handleChangeVersion}
272-
handleDormantActivate={handleDormantActivate}
273-
handleToggleFavorite={handleToggleFavorite}
274-
canDebug={canDebugMode}
275-
canChangeVersions={canChangeVersions}
276-
isUpdating={isUpdating}
277-
isRestarting={isRestarting}
278-
isOwner={isOwner}
279-
/>
256+
{!isImmutable&&(
257+
<>
258+
<WorkspaceNotifications
259+
workspace={workspace}
260+
template={template}
261+
latestVersion={latestVersion}
262+
permissions={permissions}
263+
onRestartWorkspace={handleRestart}
264+
onUpdateWorkspace={handleUpdate}
265+
onActivateWorkspace={handleDormantActivate}
266+
/>
267+
<WorkspaceStatusBadgeworkspace={workspace}/>
268+
<WorkspaceActions
269+
workspace={workspace}
270+
handleStart={handleStart}
271+
handleStop={handleStop}
272+
handleRestart={handleRestart}
273+
handleDelete={handleDelete}
274+
handleUpdate={handleUpdate}
275+
handleCancel={handleCancel}
276+
handleSettings={handleSettings}
277+
handleRetry={handleRetry}
278+
handleDebug={handleDebug}
279+
handleChangeVersion={handleChangeVersion}
280+
handleDormantActivate={handleDormantActivate}
281+
handleToggleFavorite={handleToggleFavorite}
282+
canDebug={canDebugMode}
283+
canChangeVersions={canChangeVersions}
284+
isUpdating={isUpdating}
285+
isRestarting={isRestarting}
286+
isOwner={isOwner}
287+
/>
288+
</>
289+
)}
280290
</div>
281291
</Topbar>
282292
);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp