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