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

fix: make workspace tooltips actionable#11700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mtojek merged 1 commit intomainfrom11595-ui-template
Jan 19, 2024
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -83,7 +83,7 @@ export const WorkspaceActions: FC<WorkspaceActionsProps> = ({
workspaceUpdatePolicy(workspace, canChangeVersions) === "always" &&
workspace.outdated;

const tooltipText = getTooltipText(workspace, mustUpdate);
const tooltipText = getTooltipText(workspace, mustUpdate, canChangeVersions);
const canBeUpdated = workspace.outdated && canAcceptJobs;

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

function getTooltipText(workspace: Workspace, disabled: boolean): string {
if (!disabled) {
function getTooltipText(
workspace: Workspace,
mustUpdate: boolean,
canChangeVersions: boolean,
): string {
if (!mustUpdate && !canChangeVersions) {
return "";
}

if (!mustUpdate && canChangeVersions) {
return "This template requires automatic updates on workspace startup, but template administrators can ignore this policy.";
}

if (workspace.template_require_active_version) {
return "This template requires automatic updates";
return "This template requires automatic updates on workspace startup. Contact your administrator if you want to preserve the template version.";
}

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

return "";
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp