fix(electrobun): wizard creation flow + GitLab probe + shell detection + dropdown flip
- Git probe tries GitHub then GitLab for owner/repo shorthand - Shows "Found on GitHub/GitLab" with platform indicator - system.shells RPC detects installed shells (bash/zsh/fish/sh/dash) - CustomDropdown flip logic uses 200px threshold for flip-up - Project creation properly persists all wizard fields + adds card
This commit is contained in:
parent
021feba3ed
commit
e61473b025
7 changed files with 112 additions and 21 deletions
|
|
@ -18,6 +18,7 @@
|
|||
gitProbeStatus: 'idle' | 'probing' | 'ok' | 'error'; gitProbeBranches: string[];
|
||||
githubInfo: { stars: number; description: string; defaultBranch: string } | null;
|
||||
githubProbeStatus: 'idle' | 'probing' | 'ok' | 'error'; githubLoading: boolean;
|
||||
githubPlatform: 'github' | 'gitlab' | null;
|
||||
cloning: boolean; templates: Array<{ id: string; name: string; description: string; icon: string }>;
|
||||
templateTargetDir: string; templateOriginDir: string;
|
||||
onUpdate: (field: string, value: unknown) => void;
|
||||
|
|
@ -28,7 +29,7 @@
|
|||
remoteHost, remoteUser, remotePath, remoteAuthMethod, remotePassword,
|
||||
remoteKeyPath, remoteSshfs, remoteSshfsMountpoint = '', pathValid, isGitRepo,
|
||||
gitBranch, gitProbeStatus, gitProbeBranches, githubInfo,
|
||||
githubProbeStatus = 'idle', githubLoading, cloning, templates,
|
||||
githubProbeStatus = 'idle', githubLoading, githubPlatform = null, cloning, templates,
|
||||
templateTargetDir, templateOriginDir = '', onUpdate,
|
||||
}: Props = $props();
|
||||
|
||||
|
|
@ -122,8 +123,10 @@
|
|||
<input class="wz-input" type="text" placeholder="owner/repo or https://gitlab.com/owner/repo"
|
||||
value={githubRepo} oninput={(e) => onUpdate('githubRepo', (e.target as HTMLInputElement).value)} />
|
||||
{#if githubLoading}<span class="wz-hint" style="color: var(--ctp-blue);">Checking…</span>{/if}
|
||||
{#if githubProbeStatus === 'ok'}<span class="wz-hint valid">Repository verified</span>{/if}
|
||||
{#if githubProbeStatus === 'error'}<span class="wz-hint error">Repository not found or inaccessible</span>{/if}
|
||||
{#if githubProbeStatus === 'ok' && githubPlatform === 'github'}<span class="wz-hint valid">Found on GitHub ✓</span>{/if}
|
||||
{#if githubProbeStatus === 'ok' && githubPlatform === 'gitlab'}<span class="wz-hint valid">Found on GitLab ✓</span>{/if}
|
||||
{#if githubProbeStatus === 'ok' && !githubPlatform}<span class="wz-hint valid">Repository verified ✓</span>{/if}
|
||||
{#if githubProbeStatus === 'error'}<span class="wz-hint error">Repository not found on GitHub or GitLab</span>{/if}
|
||||
{#if githubInfo}
|
||||
<div class="wz-github-info">
|
||||
<span class="wz-hint" style="color: var(--ctp-yellow);">★ {githubInfo.stars}</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue