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

Commit093ec3d

Browse files
authored
fix: improve checkbox text in template schedule settings dialog (#13669)
* fix: improve checkbox text in template schedule settings dialog* fix: format* fix: remove (s) plural language* fix: fix format
1 parent5a0afd8 commit093ec3d

File tree

2 files changed

+72
-28
lines changed

2 files changed

+72
-28
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import{action}from"@storybook/addon-actions";
2+
importtype{Meta,StoryObj}from"@storybook/react";
3+
import{ScheduleDialog}from"./ScheduleDialog";
4+
5+
constmeta:Meta<typeofScheduleDialog>={
6+
title:"pages/TemplateSettingsPage/ScheduleDialog",
7+
component:ScheduleDialog,
8+
args:{
9+
onConfirm:action("onConfirm"),
10+
onClose:action("onClose"),
11+
open:true,
12+
title:"Workspace Scheduling",
13+
},
14+
};
15+
16+
exportdefaultmeta;
17+
typeStory=StoryObj<typeofScheduleDialog>;
18+
19+
exportconstDormancyThreshold:Story={
20+
args:{
21+
dormantValueChanged:true,
22+
inactiveWorkspacesToGoDormant:1,
23+
inactiveWorkspacesToGoDormantInWeek:5,
24+
},
25+
};
26+
27+
exportconstDormancyDeletion:Story={
28+
args:{
29+
deletionValueChanged:true,
30+
dormantWorkspacesToBeDeleted:1,
31+
dormantWorkspacesToBeDeletedInWeek:5,
32+
},
33+
};

‎site/src/pages/TemplateSettingsPage/TemplateSchedulePage/ScheduleDialog.tsx

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { Interpolation, Theme } from "@emotion/react";
22
importCheckboxfrom"@mui/material/Checkbox";
33
importDialogActionsfrom"@mui/material/DialogActions";
44
importFormControlLabelfrom"@mui/material/FormControlLabel";
5-
import{Stack}from"@mui/system";
65
importtype{FC}from"react";
76
importtype{ConfirmDialogProps}from"components/Dialogs/ConfirmDialog/ConfirmDialog";
87
import{Dialog,DialogActionButtons}from"components/Dialogs/Dialog";
@@ -68,11 +67,18 @@ export const ScheduleDialog: FC<ScheduleDialogProps> = ({
6867
<>
6968
<h4>Dormancy Threshold</h4>
7069
<pcss={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-
<Stackdirection="row"spacing={5}>
96-
<pcss={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+
<pcss={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

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp