@@ -2,7 +2,6 @@ import type { Interpolation, Theme } from "@emotion/react";
22import Checkbox from "@mui/material/Checkbox" ;
33import DialogActions from "@mui/material/DialogActions" ;
44import FormControlLabel from "@mui/material/FormControlLabel" ;
5- import { Stack } from "@mui/system" ;
65import type { FC } from "react" ;
76import type { ConfirmDialogProps } from "components/Dialogs/ConfirmDialog/ConfirmDialog" ;
87import { Dialog , DialogActionButtons } from "components/Dialogs/Dialog" ;
@@ -68,11 +67,18 @@ export const ScheduleDialog: FC<ScheduleDialogProps> = ({
6867 < >
6968 < h4 > Dormancy Threshold</ h4 >
7069 < p css = { styles . dialogDescription } >
71- This change will result in { inactiveWorkspacesToGoDormant } { " " }
72- workspaces being immediately transitioned to the dormant state
73- and { inactiveWorkspacesToGoDormantInWeek } over the next seven
74- days. To prevent this, do you want to reset the inactivity
75- period for all template workspaces?
70+ This change will result in{ " " }
71+ < strong > { inactiveWorkspacesToGoDormant } </ strong > { " " }
72+ { inactiveWorkspacesToGoDormant === 1
73+ ? "workspace"
74+ : "workspaces" } { " " }
75+ being immediately transitioned to the dormant state and{ " " }
76+ < strong > { inactiveWorkspacesToGoDormantInWeek } </ strong > { " " }
77+ { inactiveWorkspacesToGoDormantInWeek === 1
78+ ? "workspace"
79+ : "workspaces" } { " " }
80+ over the next 7 days. To prevent this, do you want to reset the
81+ inactivity period for all template workspaces?
7682 </ p >
7783 < FormControlLabel
7884 css = { { marginTop : 16 } }
@@ -84,35 +90,40 @@ export const ScheduleDialog: FC<ScheduleDialogProps> = ({
8490 } }
8591 />
8692 }
87- label = "Reset"
93+ label = "Prevent Dormancy - Reset all workspace inactivity periods "
8894 />
8995 </ >
9096 ) }
9197
9298 { showDeletionWarning && (
9399 < >
94100 < h4 > Dormancy Auto-Deletion</ h4 >
95- < Stack direction = "row" spacing = { 5 } >
96- < p css = { styles . dialogDescription } >
97- This change will result in { dormantWorkspacesToBeDeleted } { " " }
98- workspaces being immediately deleted and{ " " }
99- { dormantWorkspacesToBeDeletedInWeek } over the next 7 days. To
100- prevent this, do you want to reset the dormancy period for all
101- template workspaces?
102- </ p >
103- < FormControlLabel
104- css = { { marginTop : 16 } }
105- control = {
106- < Checkbox
107- size = "small"
108- onChange = { ( e ) => {
109- updateDormantWorkspaces ( e . target . checked ) ;
110- } }
111- />
112- }
113- label = "Reset"
114- />
115- </ Stack >
101+ < p css = { styles . dialogDescription } >
102+ This change will result in{ " " }
103+ < strong > { dormantWorkspacesToBeDeleted } </ strong > { " " }
104+ { dormantWorkspacesToBeDeleted === 1
105+ ? "workspace"
106+ : "workspaces" } { " " }
107+ being immediately deleted and{ " " }
108+ < strong > { dormantWorkspacesToBeDeletedInWeek } </ strong > { " " }
109+ { dormantWorkspacesToBeDeletedInWeek === 1
110+ ? "workspace"
111+ : "workspaces" } { " " }
112+ over the next 7 days. To prevent this, do you want to reset the
113+ dormancy period for all template workspaces?
114+ </ p >
115+ < FormControlLabel
116+ css = { { marginTop : 16 } }
117+ control = {
118+ < Checkbox
119+ size = "small"
120+ onChange = { ( e ) => {
121+ updateDormantWorkspaces ( e . target . checked ) ;
122+ } }
123+ />
124+ }
125+ label = "Prevent Deletion - Reset all workspace dormancy periods"
126+ />
116127 </ >
117128 ) }
118129 </ >
0 commit comments