Skip to content

Commit c691df8

Browse files
mustard-mhroboquat
authored andcommitted
[dashboard] add notice for stable back and change latest desc
1 parent 417dc82 commit c691df8

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

components/dashboard/src/start/StartPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export function StartPage(props: StartPageProps) {
110110
{props.children}
111111
{props.showLatestIdeWarning && (
112112
<Alert type="warning" className="mt-4 w-96">
113-
You are using the latest release (unstable) for the editor.{" "}
113+
This workspace is configured with the latest release (unstable) for the editor.{" "}
114114
<a className="gp-link" target="_blank" href={gitpodHostUrl.asPreferences().toString()}>
115115
Change Preferences
116116
</a>

components/dashboard/src/start/StartWorkspace.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { watchHeadlessLogs } from "../components/PrebuildLogs";
2828
import { getGitpodService, gitpodHostUrl } from "../service/service";
2929
import { StartPage, StartPhase, StartWorkspaceError } from "./StartPage";
3030
import ConnectToSSHModal from "../workspaces/ConnectToSSHModal";
31+
import Alert from "../components/Alert";
3132
const sessionId = v4();
3233

3334
const WorkspaceLogs = React.lazy(() => import("../components/WorkspaceLogs"));
@@ -391,6 +392,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
391392
let title = undefined;
392393
let statusMessage = !!error ? undefined : <p className="text-base text-gray-400">Preparing workspace …</p>;
393394
const contextURL = ContextURL.getNormalizedURL(this.state.workspace)?.toString();
395+
const useLatest = !!this.state.workspaceInstance?.configuration?.ideConfig?.useLatest;
394396

395397
switch (this.state?.workspaceInstance?.status.phase) {
396398
// unknown indicates an issue within the system in that it cannot determine the actual phase of
@@ -524,6 +526,19 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
524526
{openLinkLabel}
525527
</button>
526528
</div>
529+
{!useLatest && (
530+
<Alert type="info" className="mt-4 w-96">
531+
You can change the default editor for opening workspaces in{" "}
532+
<a
533+
className="gp-link"
534+
target="_blank"
535+
href={gitpodHostUrl.asPreferences().toString()}
536+
>
537+
user preferences
538+
</a>
539+
.
540+
</Alert>
541+
)}
527542
{this.state.isSSHModalVisible === true && this.state.ownerToken && (
528543
<ConnectToSSHModal
529544
workspaceId={this.props.workspaceId}
@@ -626,7 +641,6 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
626641
);
627642
break;
628643
}
629-
const useLatest = !!this.state.workspaceInstance?.configuration?.ideConfig?.useLatest;
630644
return (
631645
<StartPage phase={phase} error={error} title={title} showLatestIdeWarning={useLatest}>
632646
{statusMessage}

0 commit comments

Comments
 (0)