Skip to content

Commit 062b77a

Browse files
committed
fix(frontend): polish auth, tree, and settings UX
1 parent ebdafe7 commit 062b77a

4 files changed

Lines changed: 24 additions & 11 deletions

File tree

frontend/src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ export default function LandingPage() {
673673
<span style={{ fontFamily: "var(--font-spectral), 'Spectral', Georgia, serif", fontWeight: 700, fontSize: '20px', color: '#1a5c2a', letterSpacing: '-0.02em', lineHeight: 1.1 }}>Sapling</span>
674674
</div>
675675
<div className="flex items-center">
676-
<button onClick={() => { window.location.href = `${API_URL}/api/auth/google`; }} className="text-[var(--brand-text2)] hover:text-[var(--brand-text1)] font-medium text-sm tracking-wide transition-all duration-300 mr-6 hidden sm:block">Sign In</button>
676+
<button onClick={() => router.push('/auth')} className="text-[var(--brand-text2)] hover:text-[var(--brand-text1)] font-medium text-sm tracking-wide transition-all duration-300 mr-6 hidden sm:block">Sign In</button>
677677
<button onClick={startOnboarding} className="relative overflow-hidden group bg-[#1B6C42] text-white px-7 py-2.5 rounded-full font-medium text-sm tracking-wide shadow-sm hover:shadow-md transition-all duration-400 hover:scale-[1.04] active:scale-[0.97] landing-btn-shimmer">
678678
Get Started
679679
</button>

frontend/src/components/screens/Auth.tsx

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,21 @@ function AuthInner() {
5959
overflow: "hidden",
6060
}}
6161
>
62-
<div style={{ display: "flex", alignItems: "center", gap: 10 }}>
62+
<button
63+
type="button"
64+
onClick={() => router.push("/")}
65+
aria-label="Back to home"
66+
style={{
67+
display: "flex",
68+
alignItems: "center",
69+
gap: 10,
70+
background: "transparent",
71+
border: 0,
72+
padding: 0,
73+
color: "inherit",
74+
cursor: "pointer",
75+
}}
76+
>
6377
<svg width="28" height="28" viewBox="0 0 24 24">
6478
<path d="M12 22 Q 5 15 5 9 Q 5 3 12 3 Q 19 3 19 9 Q 19 15 12 22 Z" fill="#fff" opacity={0.15} />
6579
<path
@@ -71,7 +85,7 @@ function AuthInner() {
7185
/>
7286
</svg>
7387
<span className="h-serif" style={{ fontSize: 22, fontWeight: 500 }}>Sapling</span>
74-
</div>
88+
</button>
7589
<div>
7690
<div className="h-serif" style={{ fontSize: 48, fontWeight: 500, lineHeight: 1.1, maxWidth: 440 }}>
7791
Your mind,
@@ -83,7 +97,7 @@ function AuthInner() {
8397
your knowledge graph session by session.
8498
</div>
8599
</div>
86-
<div style={{ fontSize: 11, opacity: 0.5 }}>Est. 2024 · Stanford, CA</div>
100+
<div aria-hidden style={{ height: 1 }} />
87101
<svg
88102
style={{ position: "absolute", right: -80, bottom: -60, opacity: 0.08 }}
89103
width="360"

frontend/src/components/screens/Settings.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export function Settings() {
205205
<div style={{ display: "flex", height: "calc(100vh - 112px)" }}>
206206
<div style={{ flex: 1, minWidth: 0, padding: "24px 32px", overflowY: "auto" }}>
207207
{tab === "profile" && settings && (
208-
<div style={{ maxWidth: 640 }}>
208+
<div style={{ maxWidth: 640, margin: "0 auto" }}>
209209
<div className="h-serif" style={{ fontSize: 22, marginBottom: 20 }}>Profile</div>
210210
<div
211211
className="card"
@@ -315,7 +315,7 @@ export function Settings() {
315315
)}
316316

317317
{tab === "preferences" && settings && (
318-
<div style={{ maxWidth: 640 }}>
318+
<div style={{ maxWidth: 640, margin: "0 auto" }}>
319319
<div className="h-serif" style={{ fontSize: 22, marginBottom: 20 }}>Preferences</div>
320320
<div
321321
style={{
@@ -446,7 +446,7 @@ export function Settings() {
446446
)}
447447

448448
{tab === "notifications" && settings && (
449-
<div style={{ maxWidth: 640 }}>
449+
<div style={{ maxWidth: 640, margin: "0 auto" }}>
450450
<div className="h-serif" style={{ fontSize: 22, marginBottom: 20 }}>Notifications</div>
451451
{(
452452
[
@@ -474,7 +474,7 @@ export function Settings() {
474474
)}
475475

476476
{tab === "data" && (
477-
<div style={{ maxWidth: 640 }}>
477+
<div style={{ maxWidth: 640, margin: "0 auto" }}>
478478
<div className="h-serif" style={{ fontSize: 22, marginBottom: 20 }}>Your Data</div>
479479
<div className="card" style={{ padding: "var(--pad-lg)" }}>
480480
<div style={{ fontWeight: 600, marginBottom: 4 }}>Export your data</div>
@@ -507,7 +507,7 @@ export function Settings() {
507507
)}
508508

509509
{tab === "danger" && (
510-
<div style={{ maxWidth: 640 }}>
510+
<div style={{ maxWidth: 640, margin: "0 auto" }}>
511511
<div className="h-serif" style={{ fontSize: 22, marginBottom: 20, color: "var(--err)" }}>
512512
Danger Zone
513513
</div>
@@ -622,7 +622,7 @@ function CosmeticsManager({ userId }: { userId: string }) {
622622
const lockedCount = catalogList.filter(c => !c.owned).length;
623623

624624
return (
625-
<div style={{ maxWidth: 720 }}>
625+
<div style={{ maxWidth: 720, margin: "0 auto" }}>
626626
<div className="h-serif" style={{ fontSize: 22, marginBottom: 12 }}>Cosmetics</div>
627627
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", borderBottom: "1px solid var(--border)", marginBottom: 16 }}>
628628
<div style={{ display: "flex", gap: 4 }}>

frontend/src/components/screens/Tree.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ export function Tree() {
235235
}}
236236
>
237237
<div style={{ position: "relative", flex: "0 1 260px" }}>
238-
<Icon name="search" size={13} />
239238
<input
240239
value={query}
241240
onChange={e => setQuery(e.target.value)}

0 commit comments

Comments
 (0)