mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 08:07:49 +00:00
feat(welcome): add Remote Development to the empty welcome page (#460)
The empty-state landing offered only Open and Clone Repository; the Remote Development action was reachable only once recent projects existed.
This commit is contained in:
@@ -54,6 +54,7 @@ function HeaderButtons() {
|
||||
/** Shown when there are no recent projects (IntelliJ's empty welcome). */
|
||||
function Landing() {
|
||||
const canClone = useActions((s) => s.actions.has("vcs.clone"));
|
||||
const canRemote = useActions((s) => s.actions.has("remote.connect"));
|
||||
const opening = useProject((s) => s.opening);
|
||||
const shortcut = shortcutLabel("file.openProject");
|
||||
return (
|
||||
@@ -88,6 +89,19 @@ function Landing() {
|
||||
<T>Clone Repository</T>
|
||||
</button>
|
||||
)}
|
||||
{canRemote && (
|
||||
<button
|
||||
type="button"
|
||||
className={styles.landingAction}
|
||||
disabled={opening}
|
||||
onClick={() => void executeAction("remote.connect")}
|
||||
>
|
||||
<span className={styles.landingIcon}>
|
||||
<Icon name="terminal" size={20} />
|
||||
</span>
|
||||
<T>Remote Development</T>
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{shortcut && (
|
||||
<div className={styles.landingHint}>
|
||||
|
||||
Reference in New Issue
Block a user