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

Commit4b059c4

Browse files
authored
fix: make workspace tooltips actionable (#11700)
1 parent200a87e commit4b059c4

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const WorkspaceActions: FC<WorkspaceActionsProps> = ({
8383
workspaceUpdatePolicy(workspace,canChangeVersions)==="always"&&
8484
workspace.outdated;
8585

86-
consttooltipText=getTooltipText(workspace,mustUpdate);
86+
consttooltipText=getTooltipText(workspace,mustUpdate,canChangeVersions);
8787
constcanBeUpdated=workspace.outdated&&canAcceptJobs;
8888

8989
// A mapping of button type to the corresponding React component
@@ -202,17 +202,25 @@ export const WorkspaceActions: FC<WorkspaceActionsProps> = ({
202202
);
203203
};
204204

205-
functiongetTooltipText(workspace:Workspace,disabled:boolean):string{
206-
if(!disabled){
205+
functiongetTooltipText(
206+
workspace:Workspace,
207+
mustUpdate:boolean,
208+
canChangeVersions:boolean,
209+
):string{
210+
if(!mustUpdate&&!canChangeVersions){
207211
return"";
208212
}
209213

214+
if(!mustUpdate&&canChangeVersions){
215+
return"This template requires automatic updates on workspace startup, but template administrators can ignore this policy.";
216+
}
217+
210218
if(workspace.template_require_active_version){
211-
return"This template requires automatic updates";
219+
return"This template requires automatic updates on workspace startup. Contact your administrator if you want to preserve the template version.";
212220
}
213221

214222
if(workspace.automatic_updates==="always"){
215-
return"You haveenabledautomatic updatesfor this workspace";
223+
return"Automatic updates areenabled for this workspace. Modify the update policy in workspace settings if you want to preserve the template version.";
216224
}
217225

218226
return"";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp