Repository navigation
[feature] one shared auth shell for the five sign-in screens - #10
Merged
Merged
Conversation
Home, /access, /accept/[id], /login and /consent each had their own layout and a mix of English and Chinese. They now share one shell: a dark brand panel with the relationship graph on the left, the screen's content on the right, collapsing to a top strip under 720px. - /: signed-out home is "Sign in to Pensieve" + sign-in methods (signed-in redirect unchanged). - /access: same logic, re-skinned; the non-member state shows an account chip and the graph's lit node becomes an empty dashed ring. - /accept/[id]: reads the invitation (SELECT only) to show the workspace name and inviter; handles invalid/expired, signed out, matching account and a different signed-in account (switch account). - /login and /consent: re-skinned; oauth_query still passed verbatim. Consent uses plain sections instead of nested cards. Sign-in methods come from lib/sign-in-methods.ts and only configured ones are rendered, so Microsoft / company SSO later is one more entry. Auth-screen copy is localised (zh-TW / en): pnsv_locale cookie, else the browser's preferred language, defaulting to Chinese. Footer switcher sets the cookie; <html lang> and page titles follow the locale.
❌ SonarQube Quality Gate ERROR — pathorsAI_pensieve
2 open issues on this PR:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
設計提案(方案 A):https://pensieve.pathors.com/o/jack-db85/d/pathors/sign-in-pages
改了什麼
/、/access、/accept/[id]、/login(MCP)、/consent(MCP)共用components/auth/auth-shell.tsx:左邊深藍關聯圖(沒權限/邀請失效時亮點變虛線圈),右邊表單;窄於 720px 時左欄縮成上方 150px 一條。lib/sign-in-methods.ts的清單,目前只有 Google(有設GOOGLE_CLIENT_ID才出現)。之後加 Microsoft 或公司 SSO 只要加一項;沒設定的方式不顯示,沒有「即將推出」。/login的 MCP 流程照舊把oauth_query原封不動 POST 回/api/auth/sign-in/social(SignInMethods mode="oauth-provider")。/accept/[id]直接查 invitation/organization/user(唯讀),顯示 workspace 名稱與邀請人;失效、已用過、過期的邀請有自己的狀態;登入帳號跟受邀 email 不同時說明並提供換帳號。pnsv_localecookie 優先,否則看瀏覽器偏好語言,預設中文;頁尾可切換;<html lang>與頁面 title 跟著語言。app/login-button.tsx、app/login/login-panel.tsx。components/ui、lib/access.ts沒動。驗證
tsc --noEmit、next build通過。next start(未登入):/、/access、/accept/<不存在>、/login、/consent皆 200,中英都正確;/o/jack-db85307 到/access;cookie 蓋過瀏覽器語言;375px 無橫向捲動;淺色深色都看過。