@@ -2,7 +2,6 @@ import type { Interpolation, Theme } from "@emotion/react";
2
2
import Checkbox from "@mui/material/Checkbox" ;
3
3
import DialogActions from "@mui/material/DialogActions" ;
4
4
import FormControlLabel from "@mui/material/FormControlLabel" ;
5
- import { Stack } from "@mui/system" ;
6
5
import type { FC } from "react" ;
7
6
import type { ConfirmDialogProps } from "components/Dialogs/ConfirmDialog/ConfirmDialog" ;
8
7
import { Dialog , DialogActionButtons } from "components/Dialogs/Dialog" ;
@@ -68,11 +67,18 @@ export const ScheduleDialog: FC<ScheduleDialogProps> = ({
68
67
< >
69
68
< h4 > Dormancy Threshold</ h4 >
70
69
< 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?
76
82
</ p >
77
83
< FormControlLabel
78
84
css = { { marginTop : 16 } }
@@ -84,35 +90,40 @@ export const ScheduleDialog: FC<ScheduleDialogProps> = ({
84
90
} }
85
91
/>
86
92
}
87
- label = "Reset"
93
+ label = "Prevent Dormancy - Reset all workspace inactivity periods "
88
94
/>
89
95
</ >
90
96
) }
91
97
92
98
{ showDeletionWarning && (
93
99
< >
94
100
< 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
+ />
116
127
</ >
117
128
) }
118
129
</ >
0 commit comments