✉️ collapse the messages folder rail into a toolbar
Browse files at this commitc8367007a19a6cfb1e545bbe4ae9e9c4b9ce3856Parent: d95087e- refactor
- ✉️ collapse the messages folder rail into a toolbar
1 changed file +15 -15
- src/pages/messages-page.tsx +15 -15
src/pages/messages-page.tsxmodified+15 -15
| @@ -165,14 +165,14 @@ export default function MessagesPage() { | |||
| 165 | <RouteGuard> | 165 | <RouteGuard> |
| 166 | <div class="min-h-[calc(100vh-7rem)] bg-background"> | 166 | <div class="min-h-[calc(100vh-7rem)] bg-background"> |
| 167 | <section class="data-shell overflow-hidden p-0 border-none"> | 167 | <section class="data-shell overflow-hidden p-0 border-none"> |
| 168 | - <div class="flex flex-col md:flex-row min-h-[calc(100vh-7rem)]"> | 168 | + <div class="flex min-h-[calc(100vh-7rem)] flex-col"> |
| 169 | - {/* Gmail Left Sidebar */} | 169 | + {/* Folder toolbar — the app shell already owns the global sidebar. */} |
| 170 | - <aside class="w-full md:w-60 border-r bg-card/60 p-4 shrink-0 space-y-6"> | 170 | + <aside class="flex flex-wrap items-center gap-2 border-b bg-card/60 px-3 py-2.5"> |
| 171 | {/* Compose Button */} | 171 | {/* Compose Button */} |
| 172 | <Button | 172 | <Button |
| 173 | variant="outline" | 173 | variant="outline" |
| 174 | - size="lg" | 174 | + size="sm" |
| 175 | - class="w-full justify-start gap-3 text-xs" | 175 | + class="order-2 ml-auto h-9 shrink-0 rounded-lg text-xs" |
| 176 | onClick={() => { | 176 | onClick={() => { |
| 177 | setReplyData(null); | 177 | setReplyData(null); |
| 178 | setComposeOpen(true); | 178 | setComposeOpen(true); |
| @@ -182,14 +182,14 @@ export default function MessagesPage() { | |||
| 182 | <span>{t("messages.newMessage")}</span> | 182 | <span>{t("messages.newMessage")}</span> |
| 183 | </Button> | 183 | </Button> |
| 184 | 184 | ||
| 185 | - {/* Gmail Folder Navigation List */} | 185 | + {/* Folder navigation stays compact, leaving the only sidebar to the app shell. */} |
| 186 | - <nav class="space-y-1"> | 186 | + <nav class="order-1 flex min-w-0 max-w-full flex-1 items-center gap-1 overflow-x-auto"> |
| 187 | <button | 187 | <button |
| 188 | type="button" | 188 | type="button" |
| 189 | class={cn( | 189 | class={cn( |
| 190 | - "flex h-9 w-full items-center justify-between rounded-r-full px-4 text-xs font-semibold transition-colors", | 190 | + "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors", |
| 191 | folder() === "inbox" | 191 | folder() === "inbox" |
| 192 | - ? "bg-primary/10 text-primary font-bold" | 192 | + ? "bg-primary/10 text-primary" |
| 193 | : "text-muted-foreground hover:bg-muted/40 hover:text-foreground" | 193 | : "text-muted-foreground hover:bg-muted/40 hover:text-foreground" |
| 194 | )} | 194 | )} |
| 195 | onClick={() => | 195 | onClick={() => |
| @@ -214,9 +214,9 @@ export default function MessagesPage() { | |||
| 214 | <button | 214 | <button |
| 215 | type="button" | 215 | type="button" |
| 216 | class={cn( | 216 | class={cn( |
| 217 | - "flex h-9 w-full items-center justify-between rounded-r-full px-4 text-xs font-semibold transition-colors", | 217 | + "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors", |
| 218 | folder() === "sent" | 218 | folder() === "sent" |
| 219 | - ? "bg-primary/10 text-primary font-bold" | 219 | + ? "bg-primary/10 text-primary" |
| 220 | : "text-muted-foreground hover:bg-muted/40 hover:text-foreground" | 220 | : "text-muted-foreground hover:bg-muted/40 hover:text-foreground" |
| 221 | )} | 221 | )} |
| 222 | onClick={() => | 222 | onClick={() => |
| @@ -236,9 +236,9 @@ export default function MessagesPage() { | |||
| 236 | <button | 236 | <button |
| 237 | type="button" | 237 | type="button" |
| 238 | class={cn( | 238 | class={cn( |
| 239 | - "flex h-9 w-full items-center justify-between rounded-r-full px-4 text-xs font-semibold transition-colors", | 239 | + "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors", |
| 240 | folder() === "archive" | 240 | folder() === "archive" |
| 241 | - ? "bg-primary/10 text-primary font-bold" | 241 | + ? "bg-primary/10 text-primary" |
| 242 | : "text-muted-foreground hover:bg-muted/40 hover:text-foreground" | 242 | : "text-muted-foreground hover:bg-muted/40 hover:text-foreground" |
| 243 | )} | 243 | )} |
| 244 | onClick={() => | 244 | onClick={() => |
| @@ -258,9 +258,9 @@ export default function MessagesPage() { | |||
| 258 | <button | 258 | <button |
| 259 | type="button" | 259 | type="button" |
| 260 | class={cn( | 260 | class={cn( |
| 261 | - "flex h-9 w-full items-center justify-between rounded-r-full px-4 text-xs font-semibold transition-colors", | 261 | + "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors", |
| 262 | folder() === "trash" | 262 | folder() === "trash" |
| 263 | - ? "bg-destructive/10 text-destructive font-bold" | 263 | + ? "bg-destructive/10 text-destructive" |
| 264 | : "text-muted-foreground hover:bg-muted/40 hover:text-foreground" | 264 | : "text-muted-foreground hover:bg-muted/40 hover:text-foreground" |
| 265 | )} | 265 | )} |
| 266 | onClick={() => | 266 | onClick={() => |