Skip to content

Commit c5ca6ed

Browse files
mustard-mhgtsiolis
authored andcommitted
[dashboard] display warning for latest IDE versions
Co-authored-by: George Tsiolis <[email protected]>
1 parent 4ae0555 commit c5ca6ed

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

components/dashboard/src/start/StartPage.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
*/
66

77
import { useEffect } from "react";
8+
import Alert from "../components/Alert";
89
import gitpodIconUA from "../icons/gitpod-ua.svg";
10+
import { gitpodHostUrl } from "../service/service";
911

1012
export enum StartPhase {
1113
Checking = 0,
@@ -74,6 +76,7 @@ export interface StartPageProps {
7476
error?: StartWorkspaceError;
7577
title?: string;
7678
children?: React.ReactNode;
79+
showLatestIdeWarning?: boolean;
7780
}
7881

7982
export interface StartWorkspaceError {
@@ -105,6 +108,14 @@ export function StartPage(props: StartPageProps) {
105108
)}
106109
{error && <StartError error={error} />}
107110
{props.children}
111+
{props.showLatestIdeWarning && (
112+
<Alert type="warning" className="mt-4 w-96">
113+
You are using the latest release (unstable) for the editor.{" "}
114+
<a className="gp-link" target="_blank" href={gitpodHostUrl.asPreferences().toString()}>
115+
Change Preferences
116+
</a>
117+
</Alert>
118+
)}
108119
</div>
109120
</div>
110121
);

components/dashboard/src/start/StartWorkspace.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -524,13 +524,6 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
524524
{openLinkLabel}
525525
</button>
526526
</div>
527-
<div className="text-sm text-gray-400 dark:text-gray-500 mt-5">
528-
These IDE options are based on{" "}
529-
<a className="gp-link" href={gitpodHostUrl.asPreferences().toString()} target="_parent">
530-
your user preferences
531-
</a>
532-
.
533-
</div>
534527
{this.state.isSSHModalVisible === true && this.state.ownerToken && (
535528
<ConnectToSSHModal
536529
workspaceId={this.props.workspaceId}
@@ -633,9 +626,9 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
633626
);
634627
break;
635628
}
636-
629+
const useLatest = !!this.state.workspaceInstance?.configuration?.ideConfig?.useLatest;
637630
return (
638-
<StartPage phase={phase} error={error} title={title}>
631+
<StartPage phase={phase} error={error} title={title} showLatestIdeWarning={useLatest}>
639632
{statusMessage}
640633
</StartPage>
641634
);

components/ide/jetbrains/image/startup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ export IJ_HOST_SYSTEM_BASE_DIR=/workspace/.cache/JetBrains
2525
# Enable host status endpoint
2626
export CWM_HOST_STATUS_OVER_HTTP_TOKEN=gitpod
2727

28-
/ide-desktop/status "$1" "$2"
28+
/ide-desktop/status "$@"

0 commit comments

Comments
 (0)