[fix] solution/frontend,docs: 온보딩 위저드에서 사이드바 제거 — 사이트가 되기 전엔 사이트 메뉴가 없다
사이드바는 계정 메뉴(내 사이트·새 사이트)다. 아직 사이트가 아닌 것 위에 그걸 얹으면, 만들던 중에 [새 사이트]를 눌러 방금 입력한 것을 지우는 길만 열어 준다. 아임웹도 사이트 개설 흐름에는 계정 사이드바를 붙이지 않는다. - BuilderPage: 위저드를 AppShell 대신 얇은 상단 바(로고 + 나가는 길)로. 진행은 WizardSteps 가 이미 보여준다. 비로그인은 돌아갈 목록이 없어 그 자리에 [로그인] 을 둔다 - BuilderPage: 에디터 헤더에 [← 내 사이트] — "내 사이트 관리가 생기면 그때 잇는다"고 비워 뒀던 자리다 - DEVLOG: 계정 레벨/사이트 레벨을 가른 근거 검증 — tsc·eslint·vite build 통과. 위저드에 사이드바가 사라진 것은 브라우저에서 확인
This commit is contained in:
1 parent
282427e10b
commit
b07ade25b2
2 files changed
+70
-10
No files matched your search
@@ -3,7 +3,6 @@ import {ArrowLeft, ExternalLink, Loader2, LogOut, TriangleAlert} from 'lucide-re
|
||||
import {Link, useSearchParams} from 'react-router';
|
||||
import {SiteStatus} from '@o2o/shared';
|
||||
import {getAccessToken} from '@/api';
|
||||
import {AppShell} from '@/components/layout/AppShell';
|
||||
import {EditorSignInGate} from '@/features/auth/EditorSignInGate';
|
||||
import {
|
||||
Step1Industry,
|
||||
@@ -146,10 +145,14 @@ export function BuilderPage() {
|
||||
<span className="truncate rounded bg-success/20 px-2 py-0.5 font-semibold text-success">
|
||||
실사업장 · {storeName}
|
||||
</span>
|
||||
{/* ★ 예전엔 여기 [사업장 목록] 링크가 있었다. 그 화면은 내부 운영 앱(admin)으로
|
||||
나갔고, 사장님 앱에는 그 경로가 없다 — 남겨두면 404 다. admin 은 빌더를
|
||||
새 탭으로 열므로(admin/src/lib/solutionUrl.ts) 돌아가는 길은 탭 닫기다.
|
||||
사장님용 "내 사이트 관리"가 생기면 그때 이 자리에 잇는다. */}
|
||||
{/* 돌아가는 길. 로그인한 사람에게만 목록이 있다(비로그인은 에디터에 못 들어온다). */}
|
||||
<Link
|
||||
to="/sites"
|
||||
className="flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 text-background/70 transition-colors hover:bg-white/10 hover:text-background"
|
||||
>
|
||||
<ArrowLeft className="size-3" />
|
||||
<span>내 사이트</span>
|
||||
</Link>
|
||||
</>
|
||||
) : (
|
||||
<span className="truncate opacity-80">
|
||||
@@ -212,18 +215,44 @@ export function BuilderPage() {
|
||||
);
|
||||
}
|
||||
|
||||
// 위저드는 관리자 화면의 일부다 — 사이드바(로고·사업장·로그아웃)를 그대로 쓴다.
|
||||
// 에디터(EDITOR_STEP)만 전체 화면이라 위에서 먼저 빠져나간다.
|
||||
/**
|
||||
* 위저드는 **사이드바를 쓰지 않는다.**
|
||||
*
|
||||
* ★ 사이드바는 계정 메뉴(내 사이트·새 사이트)다. 아직 사이트가 아닌 것 위에 사이트 메뉴를
|
||||
* 얹으면, 만들던 중에 [새 사이트]를 눌러 방금 입력한 것을 지우는 길만 열어 준다.
|
||||
* 진행은 단계가 이미 보여주므로(WizardSteps) 여기 필요한 건 로고와 **나가는 길** 하나다.
|
||||
*/
|
||||
return (
|
||||
<AppShell>
|
||||
<div className="flex h-full min-h-full flex-col">
|
||||
<div className="flex h-screen w-screen flex-col overflow-hidden bg-background text-foreground">
|
||||
<div className="flex shrink-0 items-center justify-between border-b border-border px-4 py-2.5">
|
||||
<img src="/brand/web4ai-wordmark.svg" alt="Web4Ai" className="h-6 w-auto" />
|
||||
{/* 비로그인은 돌아갈 목록이 없다 — 그 자리에는 로그인을 둔다(빈 버튼을 두지 않는다). */}
|
||||
{isSignedIn ? (
|
||||
<Link
|
||||
to="/sites"
|
||||
className="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
|
||||
>
|
||||
<ArrowLeft className="size-3.5" />
|
||||
내 사이트
|
||||
</Link>
|
||||
) : (
|
||||
<Link
|
||||
to="/login"
|
||||
className="rounded-md px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
|
||||
>
|
||||
로그인
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex min-h-0 flex-1 flex-col overflow-y-auto">
|
||||
{step === 1 && <Step1Industry />}
|
||||
{step === 2 && <Step2PlaceSearch />}
|
||||
{step === 3 && <Step3DataReview />}
|
||||
{step === 4 && <Step4Template />}
|
||||
{step === 5 && <Step5Generating />}
|
||||
</div>
|
||||
</AppShell>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user