🎨 migrate the app onto the Figma design system
Browse files at this commitb2d57d2afbfa20ab0730a1e5565b76a33d9c05fbParent: d2570ac- feat
- 🎨 migrate the app onto the Figma design system
83 changed files +1097 -858
- bun.lock +3 -0
- docs/ui/figma-migration-coverage.md +155 -0
- docs/ui/ui-redesign-tokens.md +23 -20
- e2e/auth-shell.spec.ts +2 -0
- index.html +17 -12
- package.json +1 -0
- public/favicon.svg +13 -4
- src/api/__tests__/auth/auth.test.ts +3 -3
- src/api/__tests__/contract/helpers/live-client.ts +1 -0
- src/api/auth/postLogin.ts +1 -0
- src/api/auth/postRegister.ts +1 -0
- src/components/attendance/attendance-report-view.tsx +1 -1
- src/components/brand/logo-mark.tsx +45 -0
- src/components/courses/course-card.tsx +7 -7
- src/components/courses/course-notes-panel.tsx +1 -1
- src/components/courses/course-subjects-panel.tsx +4 -4
- src/components/courses/course-teachers-panel.tsx +1 -1
- src/components/exams/bank-question-form.tsx +3 -3
- src/components/exams/exam-form.tsx +17 -17
- src/components/exams/exam-questions-panel.tsx +12 -12
- src/components/exams/exam-result-badge.tsx +2 -2
- src/components/exams/grade-form.tsx +1 -1
- src/components/homework/course-homework-panel.tsx +6 -6
- src/components/homework/homework-submission-panel.tsx +7 -7
- src/components/homework/homework-submissions-panel.tsx +10 -10
- src/components/layout/app-shell.tsx +11 -10
- src/components/layout/mobile-tab-bar.tsx +5 -5
- src/components/layout/nav-bar.tsx +6 -3
- src/components/layout/page-header.tsx +6 -4
- src/components/layout/side-nav.tsx +3 -3
- src/components/layout/sidebar-account.tsx +17 -2
- src/components/marks/marks-report-view.tsx +1 -1
- src/components/meals/meal-menu-card.tsx +5 -5
- src/components/messages/gmail-compose-box.tsx +7 -7
- src/components/messages/gmail-mail-detail.tsx +9 -9
- src/components/messages/gmail-mail-row.tsx +3 -3
- src/components/ui/alert.tsx +7 -5
- src/components/ui/badge.tsx +4 -1
- src/components/ui/button.tsx +3 -3
- src/components/ui/card.tsx +1 -1
- src/components/ui/chart-bar.tsx +3 -3
- src/components/ui/chart-heatmap.tsx +3 -3
- src/components/ui/chart-line.tsx +6 -6
- src/components/ui/chart-progress-ring.tsx +4 -4
- src/components/ui/data-table.tsx +1 -1
- src/components/ui/dialog.tsx +4 -4
- src/components/ui/empty-state.tsx +10 -10
- src/components/ui/icons.tsx +100 -272
- src/components/ui/input.tsx +1 -1
- src/components/ui/side-panel.tsx +3 -3
- src/components/ui/table.tsx +3 -3
- src/components/ui/tabs.tsx +1 -1
- src/components/ui/toast.tsx +2 -2
- src/components/users/user-table.tsx +7 -4
- src/components/whiteboard/whiteboard-canvas.tsx +104 -72
- src/i18n/messages.ts +10 -4
- src/index.css +79 -37
- src/lib/payments.ts +3 -3
- src/pages/admin-user-detail-page.tsx +1 -1
- src/pages/admin-users-page.tsx +3 -5
- src/pages/bank-question-detail-page.tsx +6 -6
- src/pages/classes-page.tsx +5 -2
- src/pages/course-detail-page.tsx +31 -31
- src/pages/courses-page.tsx +8 -8
- src/pages/dashboard-page.tsx +13 -13
- src/pages/exam-detail-page.tsx +39 -37
- src/pages/exams-page.tsx +19 -16
- src/pages/homework-detail-page.tsx +11 -11
- src/pages/homework-page.tsx +10 -10
- src/pages/login-page.tsx +34 -8
- src/pages/meal-detail-page.tsx +18 -18
- src/pages/meals-page.tsx +2 -2
- src/pages/messages-page.tsx +11 -12
- src/pages/payments-page.tsx +28 -19
- src/pages/question-bank-page.tsx +7 -4
- src/pages/register-page.tsx +23 -1
- src/pages/settings-page.tsx +9 -9
- src/pages/staff-work-page.tsx +16 -10
- src/pages/student-attendance-page.tsx +5 -2
- src/pages/student-marks-page.tsx +6 -4
- src/pages/whiteboard-page.tsx +12 -12
- src/pages/whiteboards-page.tsx +7 -7
- src/pages/work-log-page.tsx +4 -4
bun.lockmodified+3 -0
| @@ -6,6 +6,7 @@ | ||
| 6 | 6 | "name": "hezarfen-frontend", |
| 7 | 7 | "dependencies": { |
| 8 | 8 | "@kobalte/core": "^0.13.12", |
| 9 | + "@phosphor-icons/core": "2.1.1", | |
| 9 | 10 | "@tanstack/solid-router": "^1.170.18", |
| 10 | 11 | "@tanstack/solid-table": "^8.21.3", |
| 11 | 12 | "class-variance-authority": "^0.7.1", |
| @@ -207,6 +208,8 @@ | ||
| 207 | 208 | |
| 208 | 209 | "@oxc-project/types": ["@oxc-project/types@0.139.0", "", {}, "sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw=="], |
| 209 | 210 | |
| 211 | + "@phosphor-icons/core": ["@phosphor-icons/core@2.1.1", "", {}, "sha512-v4ARvrip4qBCImOE5rmPUylOEK4iiED9ZyKjcvzuezqMaiRASCHKcRIuvvxL/twvLpkfnEODCOJp5dM4eZilxQ=="], | |
| 212 | + | |
| 210 | 213 | "@playwright/test": ["@playwright/test@1.62.1", "", { "dependencies": { "playwright": "1.62.1" }, "bin": { "playwright": "cli.js" } }, "sha512-DTcUc8qii+cpHvtOwggMtBRMjKZHXYWdw8syRYu2vtzuq4Wxphqq4NfCs5Zt44L6mA8rfDfj+PHnxFc/FeK6mQ=="], |
| 211 | 214 | |
| 212 | 215 | "@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.1.5", "", { "os": "android", "cpu": "arm64" }, "sha512-lZg8fqIv2v7FF237bwMgzGZEJvGL79/s5knJ/i6FmsGF4XXlzccZ4jb+TrFIxtSSxFtIpdsgrPZeMk1I9AFcyQ=="], |
docs/ui/figma-migration-coverage.mdadded+155 -0
| @@ -0,0 +1,155 @@ | ||
| 1 | +# Figma UI Migration Coverage | |
| 2 | + | |
| 3 | +Source: `Hezarfen App Design` (`E8K670gsUx87yMOySGWrKf`) | |
| 4 | + | |
| 5 | +Last reviewed: 2026-09-12 | |
| 6 | + | |
| 7 | +This document is the route-level source of truth for the Figma migration. A | |
| 8 | +Figma example never replaces a working authorization rule, API contract, | |
| 9 | +loading/error state, or mutation flow. Static names and metrics in the design | |
| 10 | +must always be replaced with real application data. | |
| 11 | + | |
| 12 | +## Design pages | |
| 13 | + | |
| 14 | +| Figma page | Node | Coverage | | |
| 15 | +|---|---:|---| | |
| 16 | +| Components | `3:3` | Shared controls, navigation, data display, and feedback audited | | |
| 17 | +| Icons | `3:4` | 84 Phosphor Regular 16px icons audited; shared app glyphs migrated | | |
| 18 | +| Admin | `3:5` | 24 screens plus 2 modal variants audited | | |
| 19 | +| Teacher | `3:6` | 14 screens plus 2 modal variants audited | | |
| 20 | +| Student | `3:7` | 11 screens plus 2 modal variants audited | | |
| 21 | +| Parent | `3:8` | 8 screens audited | | |
| 22 | +| System | `103:2` | 7 screens audited | | |
| 23 | +| Mobile Kit | `40:2` | Shared 393px mobile primitives audited | | |
| 24 | +| Student Mobile | `40:3` | 9 screens audited | | |
| 25 | +| Parent Mobile | `40:4` | 6 screens audited | | |
| 26 | +| Dark Mode | `113:9393` | 10 reference screens audited | | |
| 27 | + | |
| 28 | +The Cover manifest also names a Foundations page, but no Foundations node URL | |
| 29 | +was supplied. Exact values already exposed by component and dark-mode contexts | |
| 30 | +are used; unknown values are not inferred. | |
| 31 | + | |
| 32 | +## Implemented foundation | |
| 33 | + | |
| 34 | +- Figma semantic light/dark aliases with the landing page's `#00ADD8` brand | |
| 35 | + override and pixel-wing logo. | |
| 36 | +- User-selected accent colors remain authoritative over the default brand. | |
| 37 | +- Desktop shell: 260px expanded sidebar, 45px top bar, 34px navigation rows, | |
| 38 | + 30px sub-navigation rows, and an 1100px content area at the 1440px reference. | |
| 39 | +- Controls: 36px base button/input, 26px small button, 20px badge, 32px tab. | |
| 40 | +- Mobile tab leaf: 56px; existing iOS/Android safe-area handling is preserved. | |
| 41 | +- Shared Card, PageHeader, EmptyState, Alert, Dialog, SidePanel, and Toast | |
| 42 | + surfaces use the new geometry and semantic tokens. | |
| 43 | +- Shared table shells, headers, rows, empty states, dashboard cards, and charts | |
| 44 | + use the Figma semantic surface and border aliases. | |
| 45 | +- 39 glyphs that overlap the current application are sourced from the pinned | |
| 46 | + official Phosphor Regular SVG package and inherit the active theme color. | |
| 47 | +- `/login` matches the SYS-01 480px standalone authentication panel while | |
| 48 | + retaining the current username/password backend contract. | |
| 49 | + | |
| 50 | +## Existing routes represented in Figma | |
| 51 | + | |
| 52 | +| Route | Figma coverage | Migration rule | | |
| 53 | +|---|---|---| | |
| 54 | +| `/` | Admin, teacher, student, parent dashboards | Restyle role branches; keep read-only, API-backed data | | |
| 55 | +| `/login` | SYS-01 | Visual migration; keep current auth contract | | |
| 56 | +| `/courses`, `/courses/:id` | Teacher/student classes and mobile lessons | Reuse current course/enrollment behavior | | |
| 57 | +| `/homework`, `/homework/:id` | Teacher/student homework | Reuse DataTable, submissions, files, and role gates | | |
| 58 | +| `/exams`, `/exams/:id` | Admin/teacher/student exams and results | Keep draft/publish, attempts, grading, and statistics gates | | |
| 59 | +| `/question-bank`, `/question-bank/:id` | Admin/teacher question bank | Keep server pagination and copy semantics | | |
| 60 | +| `/calendar` | Teacher/student schedules | Keep current calendar; timetable is a future view | | |
| 61 | +| `/marks` | Student/parent result concepts | Keep student-only report contract and parent-linked access | | |
| 62 | +| `/messages` | Teacher/parent communication | Keep folders, paging, compose, archive, and trash | | |
| 63 | +| `/appointments` | Parent mobile appointment | Keep reason, confirmation, conflict, and status flows | | |
| 64 | +| `/pomodoro` | Student work session | Keep current start/finish contract until DTO expands | | |
| 65 | +| `/whiteboards`, `/whiteboards/:id` | Teacher/student boards | Keep WebSocket canvas, lock, history, and permissions | | |
| 66 | +| `/work` | Teacher work log | Keep server-stamped check-in/out behavior | | |
| 67 | +| `/management/student-marks` | Teacher student analysis | Do not fabricate mastery/AI fields | | |
| 68 | +| `/management/student-attendance` | Teacher/admin attendance | Keep course/session roll-call permissions | | |
| 69 | +| `/management/classes`, `/management/classes/:id` | Admin classes | Keep class/member/course management behavior | | |
| 70 | +| `/management/settings` | Admin settings | Keep manager+ institution settings scope | | |
| 71 | +| `/management/payments` | Admin payments | Keep ledger and permission behavior | | |
| 72 | +| `/management/staff-work` | Admin staff work | Keep existing read/update/delete contract | | |
| 73 | +| `/admin/users`, `/admin/users/:id` | Admin users and roles | Keep admin guard and critical confirmations | | |
| 74 | +| `/students` | Parent development views | Keep linked-child authorization | | |
| 75 | +| `/meals`, `/meals/:id` | Admin cafeteria | Keep menu, booking, balance, and attendance behavior | | |
| 76 | +| `/payments` | Parent/student statement | Remain read-only until a payment-provider API exists | | |
| 77 | + | |
| 78 | +## Figma features blocked by product or backend scope | |
| 79 | + | |
| 80 | +These designs are recorded but must not be implemented with placeholder data or | |
| 81 | +false actions: | |
| 82 | + | |
| 83 | +- AI recommendation approval queue, evidence history, and rule management. | |
| 84 | +- AI question generation and institution-level competency analytics. | |
| 85 | +- Ses Atölyesi audio generation, player, quality gate, and listening analytics. | |
| 86 | +- Student/parent teacher-approved study plans and mastery time series. | |
| 87 | +- Institution selection and multi-institution session context. | |
| 88 | +- Password reset, remember-me session policy, and SSO. | |
| 89 | +- Six-step institution setup wizard and e-Okul/CSV/XLSX import pipeline. | |
| 90 | +- License purchase/billing, KVKK audit log, optical-form processing, and | |
| 91 | + institution-level PDF/CSV reports. | |
| 92 | +- Schedule generation and conflict resolution. | |
| 93 | +- Payment initiation/provider flow and stored payment-method controls. | |
| 94 | +- General offline mutation queue, idempotency, conflict handling, and incident IDs. | |
| 95 | +- Invite-code boards and enriched Pomodoro lesson/break/streak fields. | |
| 96 | +- Parent/student personal notification, privacy, and AI-preference endpoints. | |
| 97 | + | |
| 98 | +## Application routes not represented by a Figma screen | |
| 99 | + | |
| 100 | +Keep the current UI and behavior until a specific design is added: | |
| 101 | + | |
| 102 | +- `/register` | |
| 103 | +- `/guide` | |
| 104 | +- `/profile/me`, `/profile/:userId` | |
| 105 | +- `/notes` | |
| 106 | +- `/questions`, `/questions/:id` | |
| 107 | +- `/events`, `/events/:id` | |
| 108 | +- `/exam-room/:id` | |
| 109 | +- `/exams/:id/live` | |
| 110 | +- `/management/pomodoros` | |
| 111 | +- `/management/terms` | |
| 112 | +- `/whiteboards/:id` live canvas details beyond the list concept | |
| 113 | +- `/meals/:id` detailed account/service/management tabs | |
| 114 | +- `/studies`, `/clubs`, and `/attendance` redirect aliases | |
| 115 | + | |
| 116 | +## Asset policy | |
| 117 | + | |
| 118 | +Figma defines 84 Phosphor Regular icons in 16px outer/leaf boxes, with documented | |
| 119 | +13px, 14px, 15px, 18px, 20px, 22px, 26px, and 28px exceptions. The 39 glyphs | |
| 120 | +currently shared by Figma and the application are compiled from the pinned | |
| 121 | +`@phosphor-icons/core@2.1.1` Regular SVG sources. Existing local Lucide-style | |
| 122 | +icons remain only for intentionally app-specific glyphs not present on the | |
| 123 | +Figma Icons page. Temporary Figma URLs are never committed. | |
| 124 | + | |
| 125 | +## Validation checklist | |
| 126 | + | |
| 127 | +- `bun run build` | |
| 128 | +- `bun run test` | |
| 129 | +- Desktop screenshots at 1440x1024 in light and dark themes | |
| 130 | +- Mobile screenshots at 393x852, 375px, and 320px widths | |
| 131 | +- iOS and Android bottom-safe-area checks | |
| 132 | +- Role/module navigation and authorization regression checks | |
| 133 | +- Keyboard/focus checks for dialogs, side panels, tables, and mobile navigation | |
| 134 | +- Asset outer-box and leaf-size comparison before declaring icon fidelity complete | |
| 135 | + | |
| 136 | +## Remaining implementation plan | |
| 137 | + | |
| 138 | +### In progress — existing backend support | |
| 139 | + | |
| 140 | +1. Parent mobile composition at 393px, then 375px and 320px: | |
| 141 | + dashboard, linked students, messages, payments, and appointments. | |
| 142 | +2. System polish: notification panel, branded 404, network/error states, | |
| 143 | + keyboard/focus audit, dark-mode screenshots, and role/module regression. | |
| 144 | + | |
| 145 | +Secondary desktop composition and student mobile composition are complete in | |
| 146 | +code. Student mobile was reasoned against Tailwind breakpoints rather than | |
| 147 | +eyeballed: the 393px, 375px, and 320px screenshot checks in the validation | |
| 148 | +checklist are still outstanding and need a running backend and a seeded | |
| 149 | +student session. | |
| 150 | + | |
| 151 | +### Waiting for backend or product decisions | |
| 152 | + | |
| 153 | +The items in “Figma features blocked by product or backend scope” stay out of | |
| 154 | +the frontend until their API contracts and authorization rules exist. They must | |
| 155 | +not be simulated with static Figma values or non-functional buttons. |
docs/ui/ui-redesign-tokens.mdmodified+23 -20
| @@ -2,29 +2,31 @@ | ||
| 2 | 2 | |
| 3 | 3 | ## Source |
| 4 | 4 | |
| 5 | -bDash is Hezarfen's visual source of truth. Hezarfen keeps its SolidJS | |
| 6 | -architecture, Kobalte behavior, content model, workflows, semantic status colors, | |
| 7 | -and accessibility. React/Radix implementation details are not copied. | |
| 5 | +The `Hezarfen App Design` Figma file (`E8K670gsUx87yMOySGWrKf`) is the layout | |
| 6 | +and component source of truth. The public landing project at | |
| 7 | +`/Users/burakboduroglu/Projects/hezarfen` is the brand source of truth for the | |
| 8 | +logo and blue palette. Hezarfen keeps its SolidJS architecture, Kobalte | |
| 9 | +behavior, content model, workflows, semantic status colors, and accessibility. | |
| 10 | +Static sample content from Figma never replaces live application data. | |
| 8 | 11 | |
| 9 | 12 | ## Color |
| 10 | 13 | |
| 11 | 14 | Light: |
| 12 | 15 | |
| 13 | -- background, card, popover, sidebar: `#F8F9FA` | |
| 14 | -- foreground: `#212529` | |
| 15 | -- primary: `#495057`; primary foreground: `#F8F9FA` | |
| 16 | -- secondary and muted: `#DEE2E6` | |
| 17 | -- accent and border: `#CED4DA` | |
| 18 | -- input: `#ADB5BD`; muted foreground and ring: `#6C757D` | |
| 16 | +- brand and brand accent: `#00ADD8`; brand hover: `#0097BD` | |
| 17 | +- surface/base: `#FFFFFF`; surface/overlay: `#F7F7F7` | |
| 18 | +- surface/tint: `#F5F5F5`; surface/fill: `#E5E5E5` | |
| 19 | +- text/strong: `#0A0A0A`; text/default: `#18181B` | |
| 20 | +- text/subtle: `#737373`; text/placeholder: `#A1A1A1` | |
| 21 | +- border/line: `rgba(10, 10, 10, 0.1)`; border/hairline: `#E9E9E9` | |
| 19 | 22 | |
| 20 | 23 | Dark: |
| 21 | 24 | |
| 22 | -- background, card, popover, sidebar: `#212529` | |
| 23 | -- foreground: `#F8F9FA` | |
| 24 | -- primary: `#CED4DA`; primary foreground: `#212529` | |
| 25 | -- secondary and muted: `#495057` | |
| 26 | -- accent: `#6C757D`; border: `#495057`; input: `#6C757D` | |
| 27 | -- muted foreground: `#CED4DA`; ring: `#ADB5BD` | |
| 25 | +- surface/base and background: `#0F0F0F` | |
| 26 | +- surface/overlay, tint, and fill: `#262626` | |
| 27 | +- text/strong: `#FAFAFA`; text/default: `#F5F5F5` | |
| 28 | +- text/subtle and placeholder: `#A1A1A1`; border: `#333333` | |
| 29 | +- brand stays `#00ADD8`; brand hover stays `#0097BD` | |
| 28 | 30 | |
| 29 | 31 | Success, warning, destructive, and info remain semantic. Custom palette choice |
| 30 | 32 | continues to override `--ui-accent`, which feeds `--primary`. |
| @@ -41,10 +43,11 @@ continues to override `--ui-accent`, which feeds `--primary`. | ||
| 41 | 43 | |
| 42 | 44 | - Base radius: `0.5rem` |
| 43 | 45 | - Controls and menus: `rounded-md` |
| 44 | -- Cards and tables: `rounded-lg` | |
| 45 | -- Resource/page header: `rounded-xl` | |
| 46 | -- Default control: `h-9`; small control: `h-8`; large control: `h-10` | |
| 47 | -- Content surfaces: `shadow-sm`; menus/popovers: `shadow-xl shadow-black/10` | |
| 46 | +- Cards, tables, dialogs, and empty states: `rounded-xl` | |
| 47 | +- Page headers are plain content hierarchy, not decorative cards | |
| 48 | +- Default control: `h-9`; small button: `26px`; tabs: `32px`; badges: `20px` | |
| 49 | +- Content surfaces use a hairline border without a standing shadow; menus and | |
| 50 | + overlays use the documented contextual elevation | |
| 48 | 51 | - Dialogs and side panels: `shadow-2xl shadow-black/20` |
| 49 | 52 | - Content surfaces stay opaque. Blur is limited to modal overlays and table |
| 50 | 53 | headers where hierarchy needs it. |
| @@ -59,7 +62,7 @@ display-font, translucent surface, or custom shadow rules. | ||
| 59 | 62 | |
| 60 | 63 | ## DataTable |
| 61 | 64 | |
| 62 | -- Table shell: `rounded-lg border bg-card` | |
| 65 | +- Table shell: `rounded-xl border-border-line bg-surface-base` | |
| 63 | 66 | - Header: sticky, `text-xs` medium **Title Case** (no uppercase transform), |
| 64 | 67 | `tracking-normal`, muted foreground/background |
| 65 | 68 | - Body: flat rows (no zebra), restrained hover, `tabular-nums` cells so digits |
e2e/auth-shell.spec.tsmodified+2 -0
| @@ -1,11 +1,13 @@ | ||
| 1 | 1 | import { expect, test } from "@playwright/test"; |
| 2 | 2 | |
| 3 | +const school = process.env.E2E_SCHOOL_SLUG ?? "demo"; | |
| 3 | 4 | const username = process.env.E2E_ADMIN_USERNAME ?? "admin"; |
| 4 | 5 | const password = process.env.E2E_ADMIN_PASSWORD ?? "admin123"; |
| 5 | 6 | |
| 6 | 7 | test("sign-in reaches the authenticated shell with keyboard-accessible navigation", async ({ page }) => { |
| 7 | 8 | await page.goto("/login"); |
| 8 | 9 | await expect(page.locator("#login-username")).toBeVisible(); |
| 10 | + await page.locator("#login-school").fill(school); | |
| 9 | 11 | await page.locator("#login-username").fill(username); |
| 10 | 12 | await page.locator("#login-password").fill(password); |
| 11 | 13 | await page.locator("form").getByRole("button", { name: /log in|sign in|giriş yap/i }).click(); |
index.htmlmodified+17 -12
| @@ -2,19 +2,15 @@ | ||
| 2 | 2 | <html lang="en"> |
| 3 | 3 | <head> |
| 4 | 4 | <meta charset="UTF-8" /> |
| 5 | - <!-- interactive-widget=resizes-content: with the default the soft keyboard | |
| 6 | - only shrinks the visual viewport, so a fixed panel keeps its full | |
| 7 | - height and its composer stays behind the keys. Resizing the layout | |
| 8 | - viewport instead makes 100dvh and fixed insets follow the keyboard, | |
| 9 | - which keeps the field the user is typing in on screen. --> | |
| 10 | - <meta | |
| 11 | - name="viewport" | |
| 12 | - content="width=device-width, initial-scale=1.0, viewport-fit=cover, interactive-widget=resizes-content" | |
| 13 | - /> | |
| 5 | + <!-- interactive-widget is set at runtime, Android-only (see below): a static | |
| 6 | + key logs "not recognized" on desktop browsers, while Android Chrome | |
| 7 | + needs resizes-content so the soft keyboard resizes the layout viewport | |
| 8 | + and a fixed composer's field stays above the keys. --> | |
| 9 | + <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" /> | |
| 14 | 10 | <meta name="color-scheme" content="light dark" /> |
| 15 | 11 | <!-- Repainted from --background by preferences-context on every theme |
| 16 | 12 | change; this literal is only the value the first paint uses. --> |
| 17 | - <meta name="theme-color" content="#fafafa" /> | |
| 13 | + <meta name="theme-color" content="#f7f7f7" /> | |
| 18 | 14 | <meta |
| 19 | 15 | name="description" |
| 20 | 16 | content="Hezarfen; eğitim, ders, sınav, ödev, takvim ve kampüs işlemlerini tek yerde yöneten güvenli öğrenme platformudur." |
| @@ -33,11 +29,20 @@ | ||
| 33 | 29 | if (dark) document.documentElement.classList.add("dark"); |
| 34 | 30 | // The stylesheet has not loaded yet, so these repeat --background / |
| 35 | 31 | // --background(dark) as literals. Keep them in step with index.css. |
| 36 | - document.documentElement.style.backgroundColor = dark ? "#0a0a0a" : "#fafafa"; | |
| 32 | + document.documentElement.style.backgroundColor = dark ? "#0f0f0f" : "#f7f7f7"; | |
| 37 | 33 | const themeColor = document.querySelector('meta[name="theme-color"]'); |
| 38 | - if (themeColor) themeColor.setAttribute("content", dark ? "#0a0a0a" : "#fafafa"); | |
| 34 | + if (themeColor) themeColor.setAttribute("content", dark ? "#0f0f0f" : "#f7f7f7"); | |
| 39 | 35 | const locale = localStorage.getItem("hezarfen.locale"); |
| 40 | 36 | if (locale === "en" || locale === "tr") document.documentElement.lang = locale; |
| 37 | + // interactive-widget is Android-Chrome-only: appending it here keeps | |
| 38 | + // desktop browsers from logging "viewport argument key not | |
| 39 | + // recognized", while Android keeps resizes-content so the soft | |
| 40 | + // keyboard resizes the layout viewport instead of just the visual | |
| 41 | + // one. Runs before first paint, next to the other viewport setup. | |
| 42 | + if (/android/i.test(navigator.userAgent)) { | |
| 43 | + const viewport = document.querySelector('meta[name="viewport"]'); | |
| 44 | + if (viewport) viewport.setAttribute("content", viewport.getAttribute("content") + ", interactive-widget=resizes-content"); | |
| 45 | + } | |
| 41 | 46 | // Android reports only the display cutout through CSS env(), so the |
| 42 | 47 | // gesture bar is invisible to the page. The Tauri shell exposes its |
| 43 | 48 | // height here; read before first paint so nothing renders under it. |
package.jsonmodified+1 -0
| @@ -18,6 +18,7 @@ | ||
| 18 | 18 | }, |
| 19 | 19 | "dependencies": { |
| 20 | 20 | "@kobalte/core": "^0.13.12", |
| 21 | + "@phosphor-icons/core": "2.1.1", | |
| 21 | 22 | "@tanstack/solid-router": "^1.170.18", |
| 22 | 23 | "@tanstack/solid-table": "^8.21.3", |
| 23 | 24 | "class-variance-authority": "^0.7.1", |
public/favicon.svgmodified+13 -4
| @@ -1,5 +1,14 @@ | ||
| 1 | -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"> | |
| 2 | - <rect width="64" height="64" rx="16" fill="#f97316"/> | |
| 3 | - <path fill="#fff7ed" d="M14 18h36v8H14zm4 12h28v18H18z"/> | |
| 4 | - <path fill="#9a3412" d="M24 34h16v4H24zm0 8h12v3H24z"/> | |
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-label="Hezarfen"> | |
| 2 | + <title>Hezarfen</title> | |
| 3 | + <rect width="64" height="64" rx="14" fill="#070b0d"/> | |
| 4 | + <g fill="#00add8"> | |
| 5 | + <rect x="10" y="40" width="12" height="12" rx="3"/> | |
| 6 | + <rect x="25" y="28" width="12" height="12" rx="3"/> | |
| 7 | + <rect x="40" y="16" width="12" height="12" rx="3"/> | |
| 8 | + </g> | |
| 9 | + <g fill="#eef6f8" opacity="0.3"> | |
| 10 | + <rect x="25" y="43" width="12" height="9" rx="3"/> | |
| 11 | + <rect x="40" y="31" width="12" height="9" rx="3"/> | |
| 12 | + <rect x="40" y="43" width="12" height="9" rx="3"/> | |
| 13 | + </g> | |
| 5 | 14 | </svg> |
src/api/__tests__/auth/auth.test.tsmodified+3 -3
| @@ -13,13 +13,13 @@ describe("auth API", () => { | ||
| 13 | 13 | const mockUser = { id: "u1", username: "test" }; |
| 14 | 14 | mockFetchSuccess(mockUser); |
| 15 | 15 | |
| 16 | - const result = await postLogin({ username: "test", password: "password" }); | |
| 16 | + const result = await postLogin({ school: "demo", username: "test", password: "password" }); | |
| 17 | 17 | expect(result).toEqual(mockUser); |
| 18 | 18 | |
| 19 | 19 | const [url, init] = lastFetchCall(); |
| 20 | 20 | expect(url).toBe("/api/auth/login"); |
| 21 | 21 | expect(init?.method).toBe("POST"); |
| 22 | - expect(init?.body).toBe(JSON.stringify({ username: "test", password: "password" })); | |
| 22 | + expect(init?.body).toBe(JSON.stringify({ school: "demo", username: "test", password: "password" })); | |
| 23 | 23 | }); |
| 24 | 24 | |
| 25 | 25 | it("postLogout calls /auth/logout", async () => { |
| @@ -36,7 +36,7 @@ describe("auth API", () => { | ||
| 36 | 36 | const mockUser = { id: "u2", username: "newuser" }; |
| 37 | 37 | mockFetchSuccess(mockUser); |
| 38 | 38 | |
| 39 | - const data = { username: "newuser", password: "password", email: "test@test.com" }; | |
| 39 | + const data = { school: "demo", username: "newuser", password: "password", email: "test@test.com" }; | |
| 40 | 40 | const result = await postRegister(data); |
| 41 | 41 | expect(result).toEqual(mockUser); |
| 42 | 42 |
src/api/__tests__/contract/helpers/live-client.tsmodified+1 -0
| @@ -80,6 +80,7 @@ export async function loginAdmin(): Promise<void> { | ||
| 80 | 80 | await json("/auth/login", { |
| 81 | 81 | method: "POST", |
| 82 | 82 | body: { |
| 83 | + school: env.SCHOOL_SLUG ?? "demo", | |
| 83 | 84 | username: env.ADMIN_USERNAME ?? "admin", |
| 84 | 85 | password: env.ADMIN_PASSWORD ?? "admin123", |
| 85 | 86 | }, |
src/api/auth/postLogin.tsmodified+1 -0
| @@ -2,6 +2,7 @@ import { client } from "../client"; | ||
| 2 | 2 | import type { User } from "../client"; |
| 3 | 3 | |
| 4 | 4 | export type LoginBody = { |
| 5 | + school: string; | |
| 5 | 6 | username: string; |
| 6 | 7 | password: string; |
| 7 | 8 | }; |
src/api/auth/postRegister.tsmodified+1 -0
| @@ -2,6 +2,7 @@ import { client } from "../client"; | ||
| 2 | 2 | import type { User } from "../client"; |
| 3 | 3 | |
| 4 | 4 | export type RegisterBody = { |
| 5 | + school: string; | |
| 5 | 6 | username: string; |
| 6 | 7 | password: string; |
| 7 | 8 | }; |
src/components/attendance/attendance-report-view.tsxmodified+1 -1
| @@ -130,7 +130,7 @@ export function AttendanceReportView(props: { report: AttendanceReport; compact? | ||
| 130 | 130 | class="min-w-0" |
| 131 | 131 | columns={columns()} |
| 132 | 132 | data={props.report.courses} |
| 133 | - tableClass={cn("w-full", compact() ? "text-xs" : "table-fixed min-w-160")} | |
| 133 | + tableClass={cn("w-full", compact() ? "text-xs" : "table-fixed sm:min-w-160")} | |
| 134 | 134 | enableColumnVisibility={false} |
| 135 | 135 | /> |
| 136 | 136 | </Show> |
src/components/brand/logo-mark.tsxadded+45 -0
| @@ -0,0 +1,45 @@ | ||
| 1 | +import { Show } from "solid-js"; | |
| 2 | + | |
| 3 | +type LogoMarkProps = { | |
| 4 | + size?: number; | |
| 5 | + class?: string; | |
| 6 | +}; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Hezarfen's pixel wing from the public landing page. The blue leading edge | |
| 10 | + * represents upward progress; the quieter cells form the rest of the wing. | |
| 11 | + * At favicon-sized dimensions only the leading edge is rendered. | |
| 12 | + */ | |
| 13 | +export function LogoMark(props: LogoMarkProps) { | |
| 14 | + const size = () => props.size ?? 26; | |
| 15 | + const compact = () => size() < 24; | |
| 16 | + | |
| 17 | + return ( | |
| 18 | + <svg | |
| 19 | + width={size()} | |
| 20 | + height={size()} | |
| 21 | + viewBox="0 0 256 256" | |
| 22 | + fill="none" | |
| 23 | + aria-hidden="true" | |
| 24 | + shape-rendering="crispEdges" | |
| 25 | + class={props.class} | |
| 26 | + > | |
| 27 | + <g fill="hsl(var(--brand))"> | |
| 28 | + <rect x="30" y="166" width="44" height="44" rx="6" /> | |
| 29 | + <rect x="86" y="122" width="44" height="44" rx="6" /> | |
| 30 | + <rect x="142" y="78" width="44" height="44" rx="6" /> | |
| 31 | + <rect x="198" y="34" width="44" height="44" rx="6" /> | |
| 32 | + </g> | |
| 33 | + | |
| 34 | + <Show when={!compact()}> | |
| 35 | + <g fill="currentColor" opacity="0.22"> | |
| 36 | + <rect x="86" y="178" width="44" height="32" rx="6" /> | |
| 37 | + <rect x="142" y="134" width="44" height="32" rx="6" /> | |
| 38 | + <rect x="142" y="178" width="44" height="32" rx="6" /> | |
| 39 | + <rect x="198" y="90" width="44" height="32" rx="6" /> | |
| 40 | + <rect x="198" y="134" width="44" height="32" rx="6" /> | |
| 41 | + </g> | |
| 42 | + </Show> | |
| 43 | + </svg> | |
| 44 | + ); | |
| 45 | +} |
src/components/courses/course-card.tsxmodified+7 -7
| @@ -23,10 +23,10 @@ export function CourseCard(props: { | ||
| 23 | 23 | <Link |
| 24 | 24 | to="/courses/$id" |
| 25 | 25 | params={{ id: props.course.id }} |
| 26 | - class="group grid gap-3 rounded-lg border border-border bg-card px-4 py-3 outline-hidden transition-colors hover:border-primary/35 hover:bg-muted/20 focus-visible:ring-2 focus-visible:ring-ring sm:grid-cols-[minmax(0,1fr)_auto] sm:items-center" | |
| 26 | + class="group grid gap-3 rounded-xl border border-border-line bg-surface-base px-4 py-3 outline-hidden transition-colors hover:border-primary/35 hover:bg-surface-tint focus-visible:ring-2 focus-visible:ring-ring sm:grid-cols-[minmax(0,1fr)_auto] sm:items-center" | |
| 27 | 27 | > |
| 28 | 28 | <div class="flex min-w-0 items-start gap-3"> |
| 29 | - <span class="mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground"> | |
| 29 | + <span class="mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-surface-tint text-text-subtle"> | |
| 30 | 30 | <IconBook class="h-4 w-4" /> |
| 31 | 31 | </span> |
| 32 | 32 | <div class="min-w-0"> |
| @@ -35,8 +35,8 @@ export function CourseCard(props: { | ||
| 35 | 35 | <Badge variant="outline" class="rounded-md text-[10px] font-medium">{props.labels.kind}</Badge> |
| 36 | 36 | <Show when={props.enrolled}><Badge variant="secondary" class="rounded-md text-[10px]">{props.labels.enrolled}</Badge></Show> |
| 37 | 37 | </div> |
| 38 | - <p class="mt-0.5 line-clamp-1 text-sm text-muted-foreground">{props.course.description || "—"}</p> | |
| 39 | - <div class="mt-1.5 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground"> | |
| 38 | + <p class="mt-0.5 line-clamp-1 text-sm text-text-subtle">{props.course.description || "—"}</p> | |
| 39 | + <div class="mt-1.5 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-subtle"> | |
| 40 | 40 | <span>{props.term}</span> |
| 41 | 41 | <span class="flex min-w-0 items-center gap-1.5"> |
| 42 | 42 | <IconUsers class="h-3.5 w-3.5 shrink-0" /> |
| @@ -46,12 +46,12 @@ export function CourseCard(props: { | ||
| 46 | 46 | </div> |
| 47 | 47 | </div> |
| 48 | 48 | |
| 49 | - <div class="flex items-center justify-between gap-4 border-t border-border/60 pt-3 sm:border-l sm:border-t-0 sm:pl-5 sm:pt-0"> | |
| 49 | + <div class="flex items-center justify-between gap-4 border-t border-border-hairline pt-3 sm:border-l sm:border-t-0 sm:pl-5 sm:pt-0"> | |
| 50 | 50 | <div class="text-left sm:text-right"> |
| 51 | - <p class="text-[10px] font-medium uppercase tracking-wider text-muted-foreground">{props.labels.capacity}</p> | |
| 51 | + <p class="text-[10px] font-medium uppercase tracking-wider text-text-subtle">{props.labels.capacity}</p> | |
| 52 | 52 | <p class="mt-0.5 font-semibold tabular-nums">{props.course.capacity ?? props.labels.unlimited}</p> |
| 53 | 53 | </div> |
| 54 | - <IconChevronRight class="h-4 w-4 text-muted-foreground transition-transform group-hover:translate-x-0.5 group-hover:text-foreground" /> | |
| 54 | + <IconChevronRight class="h-4 w-4 text-text-subtle transition-transform group-hover:translate-x-0.5 group-hover:text-text-default" /> | |
| 55 | 55 | </div> |
| 56 | 56 | </Link> |
| 57 | 57 | ); |
src/components/courses/course-notes-panel.tsxmodified+1 -1
| @@ -57,7 +57,7 @@ export function CourseNotesPanel(props: { | ||
| 57 | 57 | }; |
| 58 | 58 | |
| 59 | 59 | return ( |
| 60 | - <section class="min-w-0 space-y-4 rounded-lg border border-border/60 bg-card/60 p-3 shadow-xs sm:p-4 dark:border-white/8 dark:bg-card/40"> | |
| 60 | + <section class="min-w-0 space-y-4 rounded-xl border border-border-line bg-surface-base p-3 sm:p-4"> | |
| 61 | 61 | <Show when={flash()}> |
| 62 | 62 | <Alert variant="success">{flash()}</Alert> |
| 63 | 63 | </Show> |
src/components/courses/course-subjects-panel.tsxmodified+4 -4
| @@ -42,7 +42,7 @@ export function CourseSubjectsPanel(props: { courseId: string; canManage: boolea | ||
| 42 | 42 | { |
| 43 | 43 | accessorKey: "description", |
| 44 | 44 | header: t("form.description"), |
| 45 | - meta: { cellClass: "text-sm text-muted-foreground" }, | |
| 45 | + meta: { cellClass: "text-sm text-text-subtle" }, | |
| 46 | 46 | cell: (cell) => cell.row.original.description || "—", |
| 47 | 47 | }, |
| 48 | 48 | ...(props.canManage |
| @@ -123,10 +123,10 @@ export function CourseSubjectsPanel(props: { courseId: string; canManage: boolea | ||
| 123 | 123 | </div> |
| 124 | 124 | {error() && <p class="text-sm text-destructive">{error()}</p>} |
| 125 | 125 | <div class="flex flex-wrap gap-2"> |
| 126 | - <Button type="submit" class="rounded-sm" disabled={pending()}> | |
| 126 | + <Button type="submit" class="rounded-lg" disabled={pending()}> | |
| 127 | 127 | {editing() ? t("common.update") : t("common.create")} |
| 128 | 128 | </Button> |
| 129 | - <Button type="button" variant="outline" class="rounded-sm" onClick={() => setPanelOpen(false)}> | |
| 129 | + <Button type="button" variant="outline" class="rounded-lg" onClick={() => setPanelOpen(false)}> | |
| 130 | 130 | {t("common.cancel")} |
| 131 | 131 | </Button> |
| 132 | 132 | </div> |
| @@ -157,7 +157,7 @@ export function CourseSubjectsPanel(props: { courseId: string; canManage: boolea | ||
| 157 | 157 | }} |
| 158 | 158 | /> |
| 159 | 159 | |
| 160 | - {error() && <p class="rounded-sm bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>} | |
| 160 | + {error() && <p class="rounded-xl bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>} | |
| 161 | 161 | |
| 162 | 162 | <Suspense fallback={<DataTableSkeleton />}> |
| 163 | 163 | <Show when={(subjects() ?? []).length > 0} fallback={<EmptyState title={t("subjects.empty")} />}> |
src/components/courses/course-teachers-panel.tsxmodified+1 -1
| @@ -49,7 +49,7 @@ export function CourseTeachersPanel(props: { | ||
| 49 | 49 | <Button |
| 50 | 50 | variant="ghost" |
| 51 | 51 | size="sm" |
| 52 | - class="h-8 w-8 p-0 text-destructive hover:bg-destructive/10" | |
| 52 | + class="h-8 w-8 rounded-lg p-0 text-destructive hover:bg-destructive/10" | |
| 53 | 53 | onClick={() => setRemoveTarget(cell.row.original)} |
| 54 | 54 | > |
| 55 | 55 | <IconTrash class="h-4 w-4" /> |
src/components/exams/bank-question-form.tsxmodified+3 -3
| @@ -86,11 +86,11 @@ export function BankQuestionForm(props: { | ||
| 86 | 86 | |
| 87 | 87 | return ( |
| 88 | 88 | <div class="space-y-4"> |
| 89 | - <p class="rounded-lg border border-amber-500/20 bg-amber-500/8 px-3 py-2 text-xs text-muted-foreground"> | |
| 89 | + <p class="rounded-md border border-border-line bg-surface-overlay px-3 py-2 text-xs text-text-subtle"> | |
| 90 | 90 | {t("bank.copyNotice")} |
| 91 | 91 | </p> |
| 92 | 92 | |
| 93 | - <div class="space-y-1.5 rounded-lg border bg-card p-3.5 shadow-xs"> | |
| 93 | + <div class="space-y-1.5 rounded-xl border border-border-line bg-surface-overlay p-3.5"> | |
| 94 | 94 | <Label for="bank-course" class="text-xs font-semibold text-muted-foreground">{t("nav.courses")}</Label> |
| 95 | 95 | <Select |
| 96 | 96 | id="bank-course" |
| @@ -107,7 +107,7 @@ export function BankQuestionForm(props: { | ||
| 107 | 107 | <p class="text-[11px] text-muted-foreground">{t("bank.courseHint")}</p> |
| 108 | 108 | </div> |
| 109 | 109 | |
| 110 | - <div class="space-y-1.5 rounded-lg border bg-card p-3.5 shadow-xs"> | |
| 110 | + <div class="space-y-1.5 rounded-xl border border-border-line bg-surface-overlay p-3.5"> | |
| 111 | 111 | <Label for="bank-visibility" class="text-xs font-semibold text-muted-foreground">{t("bank.whoCanSee")}</Label> |
| 112 | 112 | <Select |
| 113 | 113 | id="bank-visibility" |
src/components/exams/exam-form.tsxmodified+17 -17
| @@ -206,8 +206,8 @@ export function ExamForm(props: { | ||
| 206 | 206 | <> |
| 207 | 207 | <form class="space-y-4" onSubmit={handleSubmit}> |
| 208 | 208 | {/* Section 1: Basic Info */} |
| 209 | - <div class="space-y-3 rounded-lg border border-sky-500/15 bg-sky-500/2.5 p-4 shadow-xs"> | |
| 210 | - <h3 class="text-xs font-semibold uppercase tracking-wider text-muted-foreground">{t("exams.sectionBasic")}</h3> | |
| 209 | + <div class="space-y-3 rounded-xl border border-border-line bg-surface-overlay p-4"> | |
| 210 | + <h3 class="text-xs font-semibold text-text-subtle">{t("exams.sectionBasic")}</h3> | |
| 211 | 211 | <div class="space-y-1.5"> |
| 212 | 212 | <Label for="exam-title">{t("form.title")}</Label> |
| 213 | 213 | <Input |
| @@ -241,8 +241,8 @@ export function ExamForm(props: { | ||
| 241 | 241 | </div> |
| 242 | 242 | |
| 243 | 243 | {/* Section 2: Mode & Schedule */} |
| 244 | - <div class="space-y-3 rounded-lg border border-amber-500/15 bg-amber-500/3 p-4 shadow-xs"> | |
| 245 | - <h3 class="text-xs font-semibold uppercase tracking-wider text-muted-foreground">{t("exams.sectionSchedule")}</h3> | |
| 244 | + <div class="space-y-3 rounded-xl border border-border-line bg-surface-overlay p-4"> | |
| 245 | + <h3 class="text-xs font-semibold text-text-subtle">{t("exams.sectionSchedule")}</h3> | |
| 246 | 246 | <div class="space-y-1.5"> |
| 247 | 247 | <Label for="exam-mode">{t("exams.mode")}</Label> |
| 248 | 248 | <Select |
| @@ -319,8 +319,8 @@ export function ExamForm(props: { | ||
| 319 | 319 | </div> |
| 320 | 320 | |
| 321 | 321 | {/* Section 3: Time Limit / Duration */} |
| 322 | - <div class="space-y-3 rounded-lg border border-indigo-500/15 bg-indigo-500/3 p-4 shadow-xs"> | |
| 323 | - <h3 class="text-xs font-semibold uppercase tracking-wider text-muted-foreground">{t("exams.sectionDuration")}</h3> | |
| 322 | + <div class="space-y-3 rounded-xl border border-border-line bg-surface-overlay p-4"> | |
| 323 | + <h3 class="text-xs font-semibold text-text-subtle">{t("exams.sectionDuration")}</h3> | |
| 324 | 324 | <label class="flex items-center gap-2 text-sm font-medium"> |
| 325 | 325 | <input |
| 326 | 326 | type="checkbox" |
| @@ -339,7 +339,7 @@ export function ExamForm(props: { | ||
| 339 | 339 | type="number" |
| 340 | 340 | min={1} |
| 341 | 341 | max={1440} |
| 342 | - class="mt-1.5 h-9 bg-background/60" | |
| 342 | + class="mt-1.5 h-9" | |
| 343 | 343 | placeholder="60" |
| 344 | 344 | value={durationMinutes()} |
| 345 | 345 | onInput={(e) => setDurationMinutes(e.currentTarget.value)} |
| @@ -349,10 +349,10 @@ export function ExamForm(props: { | ||
| 349 | 349 | </div> |
| 350 | 350 | |
| 351 | 351 | {/* Section 4: Participation & Attempts */} |
| 352 | - <div class="space-y-3 rounded-lg border border-emerald-500/15 bg-emerald-500/3 p-4 shadow-xs"> | |
| 353 | - <h3 class="text-xs font-semibold uppercase tracking-wider text-muted-foreground">{t("exams.sectionAccess")}</h3> | |
| 352 | + <div class="space-y-3 rounded-xl border border-border-line bg-surface-overlay p-4"> | |
| 353 | + <h3 class="text-xs font-semibold text-text-subtle">{t("exams.sectionAccess")}</h3> | |
| 354 | 354 | |
| 355 | - <div class="rounded-xl border bg-background/60 px-3 py-2"> | |
| 355 | + <div class="rounded-md border border-border-line bg-surface-base px-3 py-2"> | |
| 356 | 356 | <label class="flex items-start gap-2 text-sm"> |
| 357 | 357 | <input |
| 358 | 358 | type="checkbox" |
| @@ -372,7 +372,7 @@ export function ExamForm(props: { | ||
| 372 | 372 | <div class="ml-6 mt-2 flex items-center gap-2"> |
| 373 | 373 | <Input |
| 374 | 374 | id="exam-max-attempts" |
| 375 | - class="h-10 w-20 text-center" | |
| 375 | + class="h-9 w-20 text-center" | |
| 376 | 376 | type="number" |
| 377 | 377 | min={1} |
| 378 | 378 | step={1} |
| @@ -385,7 +385,7 @@ export function ExamForm(props: { | ||
| 385 | 385 | </Show> |
| 386 | 386 | </div> |
| 387 | 387 | |
| 388 | - <label class="flex items-start gap-2 rounded-xl border bg-background/60 px-3 py-2 text-sm"> | |
| 388 | + <label class="flex items-start gap-2 rounded-md border border-border-line bg-surface-base px-3 py-2 text-sm"> | |
| 389 | 389 | <input |
| 390 | 390 | type="checkbox" |
| 391 | 391 | class="mt-0.5 h-4 w-4 shrink-0 rounded border-border" |
| @@ -398,7 +398,7 @@ export function ExamForm(props: { | ||
| 398 | 398 | </div> |
| 399 | 399 | </label> |
| 400 | 400 | |
| 401 | - <label class="flex items-start gap-2 rounded-xl border bg-background/60 px-3 py-2 text-sm"> | |
| 401 | + <label class="flex items-start gap-2 rounded-md border border-border-line bg-surface-base px-3 py-2 text-sm"> | |
| 402 | 402 | <input |
| 403 | 403 | type="checkbox" |
| 404 | 404 | class="mt-0.5 h-4 w-4 shrink-0 rounded border-border" |
| @@ -411,7 +411,7 @@ export function ExamForm(props: { | ||
| 411 | 411 | </div> |
| 412 | 412 | </label> |
| 413 | 413 | |
| 414 | - <label class="flex items-start gap-2 rounded-xl border bg-background/60 px-3 py-2 text-sm"> | |
| 414 | + <label class="flex items-start gap-2 rounded-md border border-border-line bg-surface-base px-3 py-2 text-sm"> | |
| 415 | 415 | <input |
| 416 | 416 | type="checkbox" |
| 417 | 417 | class="mt-0.5 h-4 w-4 shrink-0 rounded border-border" |
| @@ -427,12 +427,12 @@ export function ExamForm(props: { | ||
| 427 | 427 | |
| 428 | 428 | {error() && <p class="text-sm text-destructive">{error()}</p>} |
| 429 | 429 | |
| 430 | - <div class="sticky bottom-0 -mx-5 flex flex-wrap items-center gap-2 border-t border-border bg-background px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6"> | |
| 431 | - <Button type="submit" class="flex-1 sm:flex-none" disabled={pending()}> | |
| 430 | + <div class="sticky bottom-0 -mx-5 flex flex-wrap items-center gap-2 border-t border-border-hairline bg-surface-base px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6"> | |
| 431 | + <Button type="submit" class="flex-1 rounded-lg sm:flex-none" disabled={pending()}> | |
| 432 | 432 | {props.submitLabel ?? t("common.save")} |
| 433 | 433 | </Button> |
| 434 | 434 | {props.onCancel && ( |
| 435 | - <Button type="button" variant="outline" class="flex-1 sm:flex-none" onClick={props.onCancel}> | |
| 435 | + <Button type="button" variant="outline" class="flex-1 rounded-lg sm:flex-none" onClick={props.onCancel}> | |
| 436 | 436 | {t("common.cancel")} |
| 437 | 437 | </Button> |
| 438 | 438 | )} |
src/components/exams/exam-questions-panel.tsxmodified+12 -12
| @@ -211,10 +211,10 @@ export function ExamQuestionsPanel(props: { | ||
| 211 | 211 | <Alert variant="success">{flash()}</Alert> |
| 212 | 212 | </Show> |
| 213 | 213 | |
| 214 | - <div class="flex flex-wrap items-center justify-between gap-2 border-b border-border/50 pb-3"> | |
| 214 | + <div class="flex flex-wrap items-center justify-between gap-2 border-b border-border-hairline pb-3"> | |
| 215 | 215 | <div class="flex items-center gap-2"> |
| 216 | 216 | <h2 class="text-base font-semibold">{t("questions.title")}</h2> |
| 217 | - <Badge variant="secondary" class="rounded-full font-mono text-xs"> | |
| 217 | + <Badge variant="secondary" class="font-mono text-xs"> | |
| 218 | 218 | {questionCount()} |
| 219 | 219 | </Badge> |
| 220 | 220 | </div> |
| @@ -288,13 +288,13 @@ export function ExamQuestionsPanel(props: { | ||
| 288 | 288 | /> |
| 289 | 289 | </FormDialog> |
| 290 | 290 | |
| 291 | - {error() && <p class="rounded-sm bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>} | |
| 291 | + {error() && <p class="rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p>} | |
| 292 | 292 | |
| 293 | 293 | <Suspense fallback={<PageSpinner />}> |
| 294 | 294 | <Show |
| 295 | 295 | when={questionList().length > 0} |
| 296 | 296 | fallback={ |
| 297 | - <div class="rounded-lg border border-dashed p-6 text-center"> | |
| 297 | + <div class="rounded-xl border border-dashed border-border-line bg-surface-overlay p-6 text-center"> | |
| 298 | 298 | <p class="text-sm text-muted-foreground">{t("questions.empty")}</p> |
| 299 | 299 | <Show when={!props.readOnly}> |
| 300 | 300 | <Button |
| @@ -318,7 +318,7 @@ export function ExamQuestionsPanel(props: { | ||
| 318 | 318 | <ol class="space-y-3"> |
| 319 | 319 | <For each={pageItems()}> |
| 320 | 320 | {(q, index) => ( |
| 321 | - <li class="rounded-lg border bg-card p-4 shadow-2xs"> | |
| 321 | + <li class="rounded-xl border border-border-line bg-surface-base p-4"> | |
| 322 | 322 | <div class="flex flex-wrap items-start justify-between gap-3"> |
| 323 | 323 | <div class="min-w-0 flex-1 space-y-2.5"> |
| 324 | 324 | <div class="flex flex-wrap items-center gap-2"> |
| @@ -335,13 +335,13 @@ export function ExamQuestionsPanel(props: { | ||
| 335 | 335 | {/* One badge per direction: a question can be both (added |
| 336 | 336 | from the bank, then saved back), so they stack. */} |
| 337 | 337 | <Show when={isFromBank(q)}> |
| 338 | - <Badge variant="outline" class="gap-1 border-sky-500/40 text-sky-700 dark:text-sky-400"> | |
| 338 | + <Badge variant="outline" class="gap-1 border-brand/40 text-brand"> | |
| 339 | 339 | <IconArchive class="h-3 w-3" /> |
| 340 | 340 | {t("bank.fromBankBadge")} |
| 341 | 341 | </Badge> |
| 342 | 342 | </Show> |
| 343 | 343 | <Show when={isSavedToBank(q)}> |
| 344 | - <Badge variant="outline" class="gap-1 border-amber-500/40 text-amber-700 dark:text-amber-400"> | |
| 344 | + <Badge variant="outline" class="gap-1 border-warning/50 bg-warning/10 text-warning"> | |
| 345 | 345 | <IconArchive class="h-3 w-3" /> |
| 346 | 346 | {t("bank.savedToBankBadge")} |
| 347 | 347 | </Badge> |
| @@ -351,7 +351,7 @@ export function ExamQuestionsPanel(props: { | ||
| 351 | 351 | <img |
| 352 | 352 | src={`/api/exams/${props.examId}/questions/${q.id}/image`} |
| 353 | 353 | alt={t("questions.image")} |
| 354 | - class="h-56 w-full max-w-2xl rounded-md border bg-muted/20 object-contain" | |
| 354 | + class="h-56 w-full max-w-2xl rounded-md border border-border-line bg-surface-overlay object-contain" | |
| 355 | 355 | /> |
| 356 | 356 | </Show> |
| 357 | 357 | <Show when={!props.readOnly && q.image}> |
| @@ -375,10 +375,10 @@ export function ExamQuestionsPanel(props: { | ||
| 375 | 375 | class={ |
| 376 | 376 | choice.id === q.correct |
| 377 | 377 | ? "flex items-start gap-3 rounded-md border border-primary/30 bg-primary/10 px-3 py-2 font-medium text-foreground" |
| 378 | - : "flex items-start gap-3 rounded-md border border-transparent bg-muted/30 px-3 py-2 text-muted-foreground" | |
| 378 | + : "flex items-start gap-3 rounded-md border border-border-hairline bg-surface-overlay px-3 py-2 text-muted-foreground" | |
| 379 | 379 | } |
| 380 | 380 | > |
| 381 | - <span class="mt-0.5 inline-flex h-5 min-w-5 items-center justify-center rounded-[3px] border bg-background font-mono text-[11px] font-bold text-foreground shadow-2xs"> | |
| 381 | + <span class="mt-0.5 inline-flex h-5 min-w-5 items-center justify-center rounded-[3px] border border-border-line bg-surface-base font-mono text-[11px] font-bold text-foreground"> | |
| 382 | 382 | {String.fromCharCode(65 + choiceIndex())} |
| 383 | 383 | </span> |
| 384 | 384 | <span class="min-w-0 flex-1 space-y-2 whitespace-pre-wrap"> |
| @@ -477,7 +477,7 @@ export function ExamQuestionsPanel(props: { | ||
| 477 | 477 | type="button" |
| 478 | 478 | variant="outline" |
| 479 | 479 | size="sm" |
| 480 | - class="h-8 gap-1 text-xs" | |
| 480 | + class="h-8 gap-1 rounded-lg text-xs" | |
| 481 | 481 | disabled={safePage() <= 0} |
| 482 | 482 | onClick={() => setPage((p) => Math.max(0, p - 1))} |
| 483 | 483 | > |
| @@ -491,7 +491,7 @@ export function ExamQuestionsPanel(props: { | ||
| 491 | 491 | type="button" |
| 492 | 492 | variant="outline" |
| 493 | 493 | size="sm" |
| 494 | - class="h-8 gap-1 text-xs" | |
| 494 | + class="h-8 gap-1 rounded-lg text-xs" | |
| 495 | 495 | disabled={safePage() >= totalPages() - 1} |
| 496 | 496 | onClick={() => setPage((p) => Math.min(totalPages() - 1, p + 1))} |
| 497 | 497 | > |
src/components/exams/exam-result-badge.tsxmodified+2 -2
| @@ -5,7 +5,7 @@ export function ExamResultBadge(props: { mark?: number | null; notGraded?: boole | ||
| 5 | 5 | const t = useT(); |
| 6 | 6 | if (props.notGraded || props.mark == null) { |
| 7 | 7 | return ( |
| 8 | - <Badge variant="outline" class="rounded-sm px-3 py-1 text-sm"> | |
| 8 | + <Badge variant="outline" class="font-medium"> | |
| 9 | 9 | {t("exams.notGraded")} |
| 10 | 10 | </Badge> |
| 11 | 11 | ); |
| @@ -13,7 +13,7 @@ export function ExamResultBadge(props: { mark?: number | null; notGraded?: boole | ||
| 13 | 13 | const mark = props.mark; |
| 14 | 14 | const variant = mark >= 70 ? "default" : mark >= 50 ? "secondary" : "destructive"; |
| 15 | 15 | return ( |
| 16 | - <Badge variant={variant} class="rounded-sm px-3 py-1 text-base font-semibold"> | |
| 16 | + <Badge variant={variant} class="font-semibold tabular-nums"> | |
| 17 | 17 | {mark}/100 |
| 18 | 18 | </Badge> |
| 19 | 19 | ); |
src/components/exams/grade-form.tsxmodified+1 -1
| @@ -73,7 +73,7 @@ export function GradeForm(props: { | ||
| 73 | 73 | <Label for="grade-mark">{t("form.mark")}</Label> |
| 74 | 74 | <Input |
| 75 | 75 | id="grade-mark" |
| 76 | - class="rounded-sm" | |
| 76 | + class="rounded-md" | |
| 77 | 77 | type="number" |
| 78 | 78 | min={0} |
| 79 | 79 | max={100} |
src/components/homework/course-homework-panel.tsxmodified+6 -6
| @@ -170,7 +170,7 @@ export function CourseHomeworkPanel(props: { | ||
| 170 | 170 | id: "due_at", |
| 171 | 171 | accessorFn: (row) => row.due_at, |
| 172 | 172 | header: t("homework.dueAt"), |
| 173 | - meta: { cellClass: "mono text-xs text-muted-foreground" }, | |
| 173 | + meta: { cellClass: "mono text-xs text-text-subtle" }, | |
| 174 | 174 | cell: (cell) => formatDateTime(cell.row.original.due_at, locale()), |
| 175 | 175 | }, |
| 176 | 176 | { |
| @@ -234,14 +234,14 @@ export function CourseHomeworkPanel(props: { | ||
| 234 | 234 | <div class="space-y-1.5"> |
| 235 | 235 | <Label for="homework-due-date">{t("homework.dueAt")}</Label> |
| 236 | 236 | <div class="grid grid-cols-2 gap-2"> |
| 237 | - <DatePicker id="homework-due-date" class="h-10" placeholder={t("form.datePlaceholder")} value={dueDate()} required onChange={setDueDate} /> | |
| 238 | - <Input class="h-10 rounded-sm font-mono placeholder:text-muted-foreground/35" placeholder="17:00" value={dueTime()} required onInput={(event) => setDueTime(event.currentTarget.value)} /> | |
| 237 | + <DatePicker id="homework-due-date" class="h-9" placeholder={t("form.datePlaceholder")} value={dueDate()} required onChange={setDueDate} /> | |
| 238 | + <Input class="h-9 rounded-md font-mono placeholder:text-text-placeholder" placeholder="17:00" value={dueTime()} required onInput={(event) => setDueTime(event.currentTarget.value)} /> | |
| 239 | 239 | </div> |
| 240 | 240 | </div> |
| 241 | - <p class="rounded-xl border bg-muted/30 px-3 py-2 text-xs text-muted-foreground">{t("homework.wholeCourseHelp")}</p> | |
| 241 | + <p class="rounded-xl border border-border-line bg-surface-tint px-3 py-2 text-xs text-text-subtle">{t("homework.wholeCourseHelp")}</p> | |
| 242 | 242 | <div class="flex flex-wrap gap-2"> |
| 243 | - <Button type="submit" class="rounded-xl" disabled={pending() || (subjects() ?? []).length === 0}>{editing() ? t("common.update") : t("common.create")}</Button> | |
| 244 | - <Button type="button" variant="outline" class="rounded-xl" onClick={() => setPanelOpen(false)}>{t("common.cancel")}</Button> | |
| 243 | + <Button type="submit" class="rounded-lg" disabled={pending() || (subjects() ?? []).length === 0}>{editing() ? t("common.update") : t("common.create")}</Button> | |
| 244 | + <Button type="button" variant="outline" class="rounded-lg" onClick={() => setPanelOpen(false)}>{t("common.cancel")}</Button> | |
| 245 | 245 | </div> |
| 246 | 246 | </form> |
| 247 | 247 | </SidePanel> |
src/components/homework/homework-submission-panel.tsxmodified+7 -7
| @@ -141,7 +141,7 @@ export function HomeworkSubmissionPanel(props: { homeworkId: string }) { | ||
| 141 | 141 | <section class="data-shell space-y-4 p-5"> |
| 142 | 142 | <div> |
| 143 | 143 | <h2 class="text-lg font-semibold">{t("homework.submit")}</h2> |
| 144 | - <p class="mt-1 text-sm text-muted-foreground">{t("homework.submitHelp")}</p> | |
| 144 | + <p class="mt-1 text-sm text-text-subtle">{t("homework.submitHelp")}</p> | |
| 145 | 145 | </div> |
| 146 | 146 | <Show when={flash()}> |
| 147 | 147 | <Alert variant="success">{flash()}</Alert> |
| @@ -152,7 +152,7 @@ export function HomeworkSubmissionPanel(props: { homeworkId: string }) { | ||
| 152 | 152 | <Suspense fallback={<PageSpinner />}> |
| 153 | 153 | <Show when={result()}> |
| 154 | 154 | {(row) => ( |
| 155 | - <div class="rounded-lg border bg-muted/20 p-3 text-sm"> | |
| 155 | + <div class="rounded-xl border border-border-line bg-surface-tint p-3 text-sm"> | |
| 156 | 156 | <div class="flex flex-wrap items-center gap-2"> |
| 157 | 157 | <Badge variant="outline" class="rounded-full">{statusLabel(row().status)}</Badge> |
| 158 | 158 | <Show when={row().mark != null}> |
| @@ -180,7 +180,7 @@ export function HomeworkSubmissionPanel(props: { homeworkId: string }) { | ||
| 180 | 180 | </Show> |
| 181 | 181 | </div> |
| 182 | 182 | </form> |
| 183 | - <div class={cn("rounded-lg border bg-background/70 p-3", hasFiles() && "space-y-3")}> | |
| 183 | + <div class={cn("rounded-xl border border-border-line bg-surface-base p-3", hasFiles() && "space-y-3")}> | |
| 184 | 184 | <div class="flex flex-wrap items-center justify-between gap-2"> |
| 185 | 185 | <div class="flex items-center gap-2"> |
| 186 | 186 | <p class="text-sm font-medium">{t("notes.files")}</p> |
| @@ -201,11 +201,11 @@ export function HomeworkSubmissionPanel(props: { homeworkId: string }) { | ||
| 201 | 201 | {(file) => { |
| 202 | 202 | const meta = fileTypeMeta(file); |
| 203 | 203 | return ( |
| 204 | - <li class="flex items-center gap-2 rounded-lg border bg-card px-2.5 py-2 text-sm"> | |
| 205 | - <span class={`flex h-8 w-8 shrink-0 items-center justify-center rounded-md border ${meta.class}`}>{meta.icon}</span> | |
| 204 | + <li class="flex items-center gap-2 rounded-xl border border-border-hairline bg-surface-base px-2.5 py-2 text-sm"> | |
| 205 | + <span class={`flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-border-hairline ${meta.class}`}>{meta.icon}</span> | |
| 206 | 206 | <div class="min-w-0 flex-1"> |
| 207 | 207 | <p class="truncate font-medium">{file.name}</p> |
| 208 | - <p class="text-xs text-muted-foreground">{formatBytes(file.size)}</p> | |
| 208 | + <p class="text-xs text-text-subtle">{formatBytes(file.size)}</p> | |
| 209 | 209 | </div> |
| 210 | 210 | <a href={getHomeworkSubmissionFileUrl(props.homeworkId, file.id)} download={file.name}> |
| 211 | 211 | <Button type="button" size="icon" variant="ghost" class="h-7 w-7 rounded-lg" title={t("notes.downloadFile")}> |
| @@ -222,7 +222,7 @@ export function HomeworkSubmissionPanel(props: { homeworkId: string }) { | ||
| 222 | 222 | </ul> |
| 223 | 223 | <Show when={submission()}> |
| 224 | 224 | {(row) => ( |
| 225 | - <p class="text-xs text-muted-foreground"> | |
| 225 | + <p class="text-xs text-text-subtle"> | |
| 226 | 226 | {t("homework.submittedAt")}: {formatDateTime(row().updated_at, locale())} |
| 227 | 227 | <Show when={row().late}> · {t("homework.late")}</Show> |
| 228 | 228 | </p> |
src/components/homework/homework-submissions-panel.tsxmodified+10 -10
| @@ -99,7 +99,7 @@ export function HomeworkSubmissionsPanel(props: { homeworkId: string; courseId: | ||
| 99 | 99 | {(submission) => ( |
| 100 | 100 | <div class="space-y-1"> |
| 101 | 101 | <Badge variant="secondary" class="rounded-full">{t("homework.submitted")}</Badge> |
| 102 | - <p class="text-xs text-muted-foreground">{formatDateTime(submission().updated_at, locale())}</p> | |
| 102 | + <p class="text-xs text-text-subtle">{formatDateTime(submission().updated_at, locale())}</p> | |
| 103 | 103 | <Show when={submission().late}><p class="text-xs text-amber-600">{t("homework.late")}</p></Show> |
| 104 | 104 | </div> |
| 105 | 105 | )} |
| @@ -110,7 +110,7 @@ export function HomeworkSubmissionsPanel(props: { homeworkId: string; courseId: | ||
| 110 | 110 | id: "result", |
| 111 | 111 | header: t("homework.result"), |
| 112 | 112 | cell: (cell) => ( |
| 113 | - <Show when={cell.row.original.result} fallback={<span class="text-muted-foreground">—</span>}> | |
| 113 | + <Show when={cell.row.original.result} fallback={<span class="text-text-subtle">—</span>}> | |
| 114 | 114 | {(result) => ( |
| 115 | 115 | <div class="space-y-1"> |
| 116 | 116 | <Badge variant="outline" class="rounded-full">{statusLabel(result().status)}</Badge> |
| @@ -145,7 +145,7 @@ export function HomeworkSubmissionsPanel(props: { homeworkId: string; courseId: | ||
| 145 | 145 | <section class="data-shell space-y-4 p-5"> |
| 146 | 146 | <div> |
| 147 | 147 | <h2 class="text-lg font-semibold">{t("homework.submissions")}</h2> |
| 148 | - <p class="mt-1 text-sm text-muted-foreground">{t("homework.submissionsHelp")}</p> | |
| 148 | + <p class="mt-1 text-sm text-text-subtle">{t("homework.submissionsHelp")}</p> | |
| 149 | 149 | </div> |
| 150 | 150 | <Show when={flash()}><Alert variant="success">{flash()}</Alert></Show> |
| 151 | 151 | <Show when={error() && !gradeTarget()}><Alert variant="destructive">{error()}</Alert></Show> |
| @@ -178,18 +178,18 @@ export function HomeworkSubmissionsPanel(props: { homeworkId: string; courseId: | ||
| 178 | 178 | <Show when={viewTarget()?.submission}> |
| 179 | 179 | {(submission) => ( |
| 180 | 180 | <div class="space-y-4"> |
| 181 | - <div class="rounded-lg border bg-muted/20 p-3"> | |
| 182 | - <p class="text-xs text-muted-foreground">{t("exams.textAnswer")}</p> | |
| 181 | + <div class="rounded-xl border border-border-line bg-surface-tint p-3"> | |
| 182 | + <p class="text-xs text-text-subtle">{t("exams.textAnswer")}</p> | |
| 183 | 183 | <Show |
| 184 | 184 | when={submission().text} |
| 185 | - fallback={<p class="mt-2 text-sm text-muted-foreground">{t("homework.noAnswer")}</p>} | |
| 185 | + fallback={<p class="mt-2 text-sm text-text-subtle">{t("homework.noAnswer")}</p>} | |
| 186 | 186 | > |
| 187 | 187 | {(text) => <div class="mt-2 text-sm leading-relaxed" innerHTML={text()} />} |
| 188 | 188 | </Show> |
| 189 | 189 | </div> |
| 190 | 190 | {/* Skipped entirely (not just an empty placeholder) when there are no files — this is a read-only view, so a "no files" row would just be dead weight. */} |
| 191 | 191 | <Show when={submission().files.length > 0}> |
| 192 | - <div class="space-y-2 rounded-lg border bg-background/70 p-3"> | |
| 192 | + <div class="space-y-2 rounded-xl border border-border-line bg-surface-base p-3"> | |
| 193 | 193 | <div class="flex items-center gap-2"> |
| 194 | 194 | <p class="text-sm font-medium">{t("notes.files")}</p> |
| 195 | 195 | <Badge variant="secondary" class="rounded-full">{submission().files.length}</Badge> |
| @@ -199,11 +199,11 @@ export function HomeworkSubmissionsPanel(props: { homeworkId: string; courseId: | ||
| 199 | 199 | {(file) => { |
| 200 | 200 | const meta = fileTypeMeta(file); |
| 201 | 201 | return ( |
| 202 | - <li class="flex items-center gap-2 rounded-lg border bg-card px-2.5 py-2 text-sm"> | |
| 203 | - <span class={`flex h-8 w-8 shrink-0 items-center justify-center rounded-md border ${meta.class}`}>{meta.icon}</span> | |
| 202 | + <li class="flex items-center gap-2 rounded-xl border border-border-hairline bg-surface-base px-2.5 py-2 text-sm"> | |
| 203 | + <span class={`flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-border-hairline ${meta.class}`}>{meta.icon}</span> | |
| 204 | 204 | <div class="min-w-0 flex-1"> |
| 205 | 205 | <p class="truncate font-medium">{file.name}</p> |
| 206 | - <p class="text-xs text-muted-foreground">{formatBytes(file.size)}</p> | |
| 206 | + <p class="text-xs text-text-subtle">{formatBytes(file.size)}</p> | |
| 207 | 207 | </div> |
| 208 | 208 | <a href={getHomeworkRosterSubmissionFileUrl(props.homeworkId, viewTarget()!.user, file.id)} download={file.name}> |
| 209 | 209 | <Button type="button" size="icon" variant="ghost" class="h-7 w-7 rounded-lg" title={t("notes.downloadFile")}> |
src/components/layout/app-shell.tsxmodified+11 -10
| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | import { Show, createMemo, createSignal, type ParentProps } from "solid-js"; |
| 2 | 2 | import { Link, useLocation, useNavigate } from "@tanstack/solid-router"; |
| 3 | +import { LogoMark } from "@/components/brand/logo-mark"; | |
| 3 | 4 | import { AccountProfileDialog } from "@/components/users/account-profile-dialog"; |
| 4 | 5 | import { CelebiPanel } from "@/components/layout/celebi-panel"; |
| 5 | 6 | import { CommandPalette } from "@/components/layout/command-palette"; |
| @@ -20,7 +21,7 @@ import { ShellFeedProvider } from "@/stores/shell-feed-context"; | ||
| 20 | 21 | import { usePreferences, useT } from "@/stores/preferences-context"; |
| 21 | 22 | import { cn } from "@/lib/cn"; |
| 22 | 23 | |
| 23 | -const SIDEBAR_EXPANDED = "w-60"; | |
| 24 | +const SIDEBAR_EXPANDED = "w-[260px]"; | |
| 24 | 25 | const SIDEBAR_COLLAPSED = "w-24"; |
| 25 | 26 | |
| 26 | 27 | export function AppShell(props: ParentProps) { |
| @@ -48,7 +49,7 @@ export function AppShell(props: ParentProps) { | ||
| 48 | 49 | |
| 49 | 50 | return ( |
| 50 | 51 | <div class="min-h-[var(--app-viewport)] bg-background text-foreground"> |
| 51 | - <Show when={!auth.user()}> | |
| 52 | + <Show when={!auth.user() && location().pathname !== "/login"}> | |
| 52 | 53 | <NavBar /> |
| 53 | 54 | </Show> |
| 54 | 55 | <ShellFeedProvider> |
| @@ -63,7 +64,7 @@ export function AppShell(props: ParentProps) { | ||
| 63 | 64 | <div |
| 64 | 65 | class={cn( |
| 65 | 66 | "flex shrink-0 items-center gap-2 border-b border-border/70", |
| 66 | - collapsed() ? "h-auto flex-col justify-center gap-1.5 px-2 py-2" : "h-16 px-3", | |
| 67 | + collapsed() ? "h-auto flex-col justify-center gap-1.5 px-2 py-2" : "h-[45px] px-3", | |
| 67 | 68 | )} |
| 68 | 69 | > |
| 69 | 70 | <Link |
| @@ -71,8 +72,8 @@ export function AppShell(props: ParentProps) { | ||
| 71 | 72 | class={cn("flex min-w-0 items-center gap-2.5", collapsed() ? "justify-center" : "flex-1")} |
| 72 | 73 | title={t("app.name")} |
| 73 | 74 | > |
| 74 | - <span class="flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-primary text-xs font-bold text-primary-foreground"> | |
| 75 | - H | |
| 75 | + <span class="flex h-8 w-8 shrink-0 items-center justify-center text-foreground"> | |
| 76 | + <LogoMark size={28} /> | |
| 76 | 77 | </span> |
| 77 | 78 | <Show when={!collapsed()}> |
| 78 | 79 | <span class="truncate text-base font-semibold tracking-tight text-foreground dark:text-white 2xl:text-lg">{t("app.name")}</span> |
| @@ -109,8 +110,8 @@ export function AppShell(props: ParentProps) { | ||
| 109 | 110 | |
| 110 | 111 | <main class="min-w-0 flex-1"> |
| 111 | 112 | <Show when={auth.user() && !fullScreen()}> |
| 112 | - <header class="sticky top-[env(safe-area-inset-top)] z-30 flex h-16 items-center gap-3 border-b border-border/70 bg-background px-4 sm:px-6 lg:px-8"> | |
| 113 | - <div class="flex min-w-0 shrink-0 items-center gap-2 sm:w-52 lg:w-60"> | |
| 113 | + <header class="sticky top-[env(safe-area-inset-top)] z-30 flex h-[45px] items-center gap-3 border-b border-border/70 bg-background px-4 sm:px-6 lg:px-4"> | |
| 114 | + <div class="flex min-w-0 shrink-0 items-center gap-2 sm:w-52 lg:w-[260px]"> | |
| 114 | 115 | <Show when={location().pathname !== "/"}> |
| 115 | 116 | <button |
| 116 | 117 | type="button" |
| @@ -162,9 +163,9 @@ export function AppShell(props: ParentProps) { | ||
| 162 | 163 | </Show> |
| 163 | 164 | <div |
| 164 | 165 | class={cn( |
| 165 | - "mx-auto w-full px-4 py-6 sm:px-6 lg:px-8 lg:py-6", | |
| 166 | - auth.user() && !fullScreen() && "pb-[calc(5rem+max(env(safe-area-inset-bottom),var(--android-nav-inset,0px)))] lg:pb-6", | |
| 167 | - wide() ? "max-w-none" : "max-w-[1280px] xl:max-w-[1600px] 2xl:max-w-none", | |
| 166 | + "mx-auto w-full px-4 py-6 sm:px-6 lg:px-10 lg:py-6", | |
| 167 | + auth.user() && !fullScreen() && "pb-[calc(3.5rem+max(env(safe-area-inset-bottom),var(--android-nav-inset,0px)))] lg:pb-6", | |
| 168 | + wide() ? "max-w-none" : "max-w-[1180px]", | |
| 168 | 169 | )} |
| 169 | 170 | > |
| 170 | 171 | {props.children} |
src/components/layout/mobile-tab-bar.tsxmodified+5 -5
| @@ -20,7 +20,7 @@ export function MobileTabBar(props: { onMenu: () => void }) { | ||
| 20 | 20 | aria-label={t("nav.menu")} |
| 21 | 21 | > |
| 22 | 22 | <ul |
| 23 | - class="mx-auto grid h-16 max-w-3xl" | |
| 23 | + class="mx-auto grid h-14 max-w-3xl" | |
| 24 | 24 | style={{ "grid-template-columns": `repeat(${items().length + 1}, minmax(0, 1fr))` }} |
| 25 | 25 | > |
| 26 | 26 | <For each={items()}> |
| @@ -36,8 +36,8 @@ export function MobileTabBar(props: { onMenu: () => void }) { | ||
| 36 | 36 | active() ? "text-foreground" : "text-muted-foreground", |
| 37 | 37 | )} |
| 38 | 38 | > |
| 39 | - <span class={cn("flex h-8 w-10 items-center justify-center rounded-md", active() && "bg-muted")}> | |
| 40 | - <item.Icon class="h-4.5 w-4.5" /> | |
| 39 | + <span class="flex h-7 w-10 items-center justify-center"> | |
| 40 | + <item.Icon class="h-[22px] w-[22px]" /> | |
| 41 | 41 | </span> |
| 42 | 42 | <span class="max-w-full truncate">{t(item.labelKey)}</span> |
| 43 | 43 | </Link> |
| @@ -52,8 +52,8 @@ export function MobileTabBar(props: { onMenu: () => void }) { | ||
| 52 | 52 | class="flex h-full w-full flex-col items-center justify-center gap-1 px-1 text-[10px] font-medium text-muted-foreground" |
| 53 | 53 | onClick={() => props.onMenu()} |
| 54 | 54 | > |
| 55 | - <span class="flex h-8 w-10 items-center justify-center rounded-md"> | |
| 56 | - <IconMenu class="h-4.5 w-4.5" /> | |
| 55 | + <span class="flex h-7 w-10 items-center justify-center"> | |
| 56 | + <IconMenu class="h-[22px] w-[22px]" /> | |
| 57 | 57 | </span> |
| 58 | 58 | <span class="truncate">{t("nav.menu")}</span> |
| 59 | 59 | </button> |
src/components/layout/nav-bar.tsxmodified+6 -3
| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | import { Link } from "@tanstack/solid-router"; |
| 2 | 2 | import { Show, createSignal } from "solid-js"; |
| 3 | +import { LogoMark } from "@/components/brand/logo-mark"; | |
| 3 | 4 | import { Button } from "@/components/ui/button"; |
| 4 | 5 | import { SideNav } from "@/components/layout/side-nav"; |
| 5 | 6 | import { UserMenu } from "@/components/layout/user-menu"; |
| @@ -32,8 +33,8 @@ export function NavBar() { | ||
| 32 | 33 | </Show> |
| 33 | 34 | |
| 34 | 35 | <Link to="/" class="flex min-w-0 items-center gap-2.5"> |
| 35 | - <span class="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-primary text-xs font-bold text-primary-foreground"> | |
| 36 | - H | |
| 36 | + <span class="flex h-8 w-8 shrink-0 items-center justify-center text-foreground"> | |
| 37 | + <LogoMark size={28} /> | |
| 37 | 38 | </span> |
| 38 | 39 | <span class="truncate text-base font-semibold tracking-tight sm:text-lg"> |
| 39 | 40 | {t("app.name")} |
| @@ -63,7 +64,9 @@ export function NavBar() { | ||
| 63 | 64 | <aside class="absolute inset-y-0 left-0 flex w-72 max-w-[85vw] flex-col border-r border-border bg-sidebar pb-[max(env(safe-area-inset-bottom),var(--android-nav-inset,0px))] pt-[env(safe-area-inset-top)] shadow-sm"> |
| 64 | 65 | <div class="flex h-14 shrink-0 items-center justify-between gap-2 border-b border-border px-3"> |
| 65 | 66 | <span class="flex min-w-0 items-center gap-2"> |
| 66 | - <span class="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-primary text-xs font-bold text-primary-foreground">H</span> | |
| 67 | + <span class="flex h-8 w-8 shrink-0 items-center justify-center text-foreground"> | |
| 68 | + <LogoMark size={28} /> | |
| 69 | + </span> | |
| 67 | 70 | <span class="truncate text-base font-semibold">{t("app.name")}</span> |
| 68 | 71 | </span> |
| 69 | 72 | <Button |
src/components/layout/page-header.tsxmodified+6 -4
| @@ -16,7 +16,7 @@ export function PageHeader( | ||
| 16 | 16 | return ( |
| 17 | 17 | <div |
| 18 | 18 | class={cn( |
| 19 | - "rounded-xl border border-border/60 bg-card text-card-foreground shadow-sm", | |
| 19 | + "text-foreground", | |
| 20 | 20 | props.class, |
| 21 | 21 | )} |
| 22 | 22 | > |
| @@ -24,8 +24,8 @@ export function PageHeader( | ||
| 24 | 24 | class={cn( |
| 25 | 25 | "flex flex-col sm:flex-row sm:items-center sm:justify-between", |
| 26 | 26 | props.compact |
| 27 | - ? "gap-3 px-4 py-3 sm:px-5 sm:py-3.5" | |
| 28 | - : "gap-4 px-4 py-4 sm:px-5 sm:py-5", | |
| 27 | + ? "min-h-[66px] gap-3 py-1" | |
| 28 | + : "min-h-[66px] gap-4 py-1", | |
| 29 | 29 | )} |
| 30 | 30 | > |
| 31 | 31 | <div class={cn("min-w-0", props.compact ? "space-y-0.5" : "max-w-2xl space-y-1")}> |
| @@ -35,7 +35,9 @@ export function PageHeader( | ||
| 35 | 35 | <h1 |
| 36 | 36 | class={cn( |
| 37 | 37 | "font-semibold tracking-tight", |
| 38 | - props.compact ? "text-lg sm:text-xl" : "text-xl sm:text-2xl", | |
| 38 | + props.compact | |
| 39 | + ? "text-xl leading-7 sm:text-[28px] sm:leading-9" | |
| 40 | + : "text-2xl leading-8 sm:text-[28px] sm:leading-9", | |
| 39 | 41 | )} |
| 40 | 42 | > |
| 41 | 43 | {props.title} |
src/components/layout/side-nav.tsxmodified+3 -3
| @@ -36,7 +36,7 @@ export function SideNav(props: { onNavigate?: () => void; collapsed?: boolean }) | ||
| 36 | 36 | title={t(item.labelKey)} |
| 37 | 37 | aria-current={active() ? "page" : undefined} |
| 38 | 38 | class={cn( |
| 39 | - "relative flex h-9 items-center rounded-md text-[13px] font-medium outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring", | |
| 39 | + "relative flex h-[34px] items-center rounded-lg text-[13px] font-medium outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring", | |
| 40 | 40 | props.collapsed ? "mx-auto h-10 w-12 justify-center px-0" : "gap-3 px-3", |
| 41 | 41 | active() |
| 42 | 42 | ? "bg-primary/10 text-primary" |
| @@ -81,7 +81,7 @@ export function SideNav(props: { onNavigate?: () => void; collapsed?: boolean }) | ||
| 81 | 81 | class={cn( |
| 82 | 82 | // Active submenu item: bold foreground text + a bright segment over |
| 83 | 83 | // the group's left guide line (no filled pill). |
| 84 | - "relative flex h-8 items-center gap-2.5 rounded-md px-2.5 text-[13px] outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring", | |
| 84 | + "relative flex h-[30px] items-center gap-2.5 rounded-md px-2.5 text-[13px] outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring", | |
| 85 | 85 | itemActive() |
| 86 | 86 | ? "font-semibold text-foreground before:absolute before:-left-[9px] before:top-1 before:bottom-1 before:w-0.5 before:rounded-full before:bg-foreground" |
| 87 | 87 | : "font-medium text-muted-foreground hover:bg-muted/70 hover:text-foreground", |
| @@ -116,7 +116,7 @@ export function SideNav(props: { onNavigate?: () => void; collapsed?: boolean }) | ||
| 116 | 116 | <details class="group/nav" open={active()}> |
| 117 | 117 | <summary |
| 118 | 118 | class={cn( |
| 119 | - "flex h-9 cursor-pointer list-none items-center gap-3 rounded-md px-3 text-[13px] font-medium outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden", | |
| 119 | + "flex h-[34px] cursor-pointer list-none items-center gap-3 rounded-lg px-3 text-[13px] font-medium outline-hidden transition-colors focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden", | |
| 120 | 120 | active() |
| 121 | 121 | ? "bg-muted/70 text-foreground" |
| 122 | 122 | : "text-muted-foreground hover:bg-muted/70 hover:text-foreground", |
src/components/layout/sidebar-account.tsxmodified+17 -2
| @@ -1,6 +1,8 @@ | ||
| 1 | 1 | import { useNavigate } from "@tanstack/solid-router"; |
| 2 | -import { Show, createSignal } from "solid-js"; | |
| 2 | +import { Show, createResource, createSignal } from "solid-js"; | |
| 3 | 3 | import type { User } from "@/api/client"; |
| 4 | +import { getMyProfile } from "@/api/users"; | |
| 5 | +import { avatarRevision } from "@/lib/avatar"; | |
| 4 | 6 | import type { MessageKey } from "@/i18n/messages"; |
| 5 | 7 | import { AccountProfileDialog } from "@/components/users/account-profile-dialog"; |
| 6 | 8 | import { |
| @@ -28,6 +30,18 @@ export function SidebarAccount(props: { collapsed?: boolean; onLogout: () => voi | ||
| 28 | 30 | const navigate = useNavigate(); |
| 29 | 31 | const [profileOpen, setProfileOpen] = createSignal(false); |
| 30 | 32 | |
| 33 | + // The auth user carries no avatar meta, so without this both chips below | |
| 34 | + // attempt the image and 404 when there is no photo. One profile read tells | |
| 35 | + // both; it re-reads on every avatar upload/delete via avatarRevision, and | |
| 36 | + // stays unfetched while logged out. | |
| 37 | + const [profile] = createResource(() => (auth.user() ? avatarRevision() : null), () => | |
| 38 | + getMyProfile(), | |
| 39 | + ); | |
| 40 | + const hasAvatar = () => { | |
| 41 | + const p = profile(); | |
| 42 | + return p ? p.avatar !== null : false; | |
| 43 | + }; | |
| 44 | + | |
| 31 | 45 | return ( |
| 32 | 46 | <> |
| 33 | 47 | <Show when={auth.user()}> |
| @@ -49,6 +63,7 @@ export function SidebarAccount(props: { collapsed?: boolean; onLogout: () => voi | ||
| 49 | 63 | <UserAvatar |
| 50 | 64 | userId={u().id} |
| 51 | 65 | name={name()} |
| 66 | + hasAvatar={hasAvatar()} | |
| 52 | 67 | size="sm" |
| 53 | 68 | class={props.collapsed ? "h-9 w-9" : undefined} |
| 54 | 69 | /> |
| @@ -68,7 +83,7 @@ export function SidebarAccount(props: { collapsed?: boolean; onLogout: () => voi | ||
| 68 | 83 | class="m-1.5 gap-2.5 rounded-xl bg-muted/70 p-2.5 focus:bg-muted data-highlighted:bg-muted dark:bg-white/8 dark:focus:bg-white/10 dark:data-highlighted:bg-white/10" |
| 69 | 84 | onSelect={() => void navigate({ to: "/profile/me" })} |
| 70 | 85 | > |
| 71 | - <UserAvatar userId={u().id} name={name()} size="md" class="ring-0" /> | |
| 86 | + <UserAvatar userId={u().id} name={name()} hasAvatar={hasAvatar()} size="md" class="ring-0" /> | |
| 72 | 87 | <span class="min-w-0 flex-1"> |
| 73 | 88 | <span class="block truncate text-sm font-semibold">{name()}</span> |
| 74 | 89 | <span class="block truncate text-xs text-muted-foreground dark:text-white/60">{t("profile.myProfile")}</span> |
src/components/marks/marks-report-view.tsxmodified+1 -1
| @@ -130,7 +130,7 @@ export function MarksReportView(props: { report: MarksReport; compact?: boolean | ||
| 130 | 130 | class="min-w-0" |
| 131 | 131 | columns={columns()} |
| 132 | 132 | data={block.results} |
| 133 | - tableClass={cn("w-full", compact() ? "text-xs" : "table-fixed min-w-xl")} | |
| 133 | + tableClass={cn("w-full", compact() ? "text-xs" : "table-fixed sm:min-w-xl")} | |
| 134 | 134 | enableColumnVisibility={false} |
| 135 | 135 | /> |
| 136 | 136 | </Show> |
src/components/meals/meal-menu-card.tsxmodified+5 -5
| @@ -10,21 +10,21 @@ export function MealMenuCard(props: { menu: MealMenu; locale: string; labels: { | ||
| 10 | 10 | const conflicts = () => [...new Set(props.menu.dishes.flatMap((dish) => dish.conflicts))]; |
| 11 | 11 | |
| 12 | 12 | return ( |
| 13 | - <Link to="/meals/$id" params={{ id: props.menu.id }} class="group flex min-h-56 flex-col rounded-lg border border-border/70 bg-card p-4 shadow-2xs transition hover:-translate-y-0.5 hover:border-primary/40 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"> | |
| 13 | + <Link to="/meals/$id" params={{ id: props.menu.id }} class="group flex min-h-56 flex-col rounded-xl border border-border-line bg-surface-base p-4 transition hover:-translate-y-0.5 hover:border-primary/40 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"> | |
| 14 | 14 | <div class="flex items-start justify-between gap-3"> |
| 15 | 15 | <div class="flex min-w-0 items-center gap-3"> |
| 16 | - <span class="flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border bg-muted/40"><IconUtensils class="h-5 w-5" /></span> | |
| 17 | - <div><h2 class="font-semibold">{props.menu.slot}</h2><time class="mono text-xs text-muted-foreground" datetime={props.menu.date}>{props.menu.date}</time></div> | |
| 16 | + <span class="flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border-hairline bg-surface-tint"><IconUtensils class="h-5 w-5" /></span> | |
| 17 | + <div><h2 class="font-semibold text-text-strong">{props.menu.slot}</h2><time class="mono text-xs text-text-subtle" datetime={props.menu.date}>{props.menu.date}</time></div> | |
| 18 | 18 | </div> |
| 19 | 19 | <span class="font-semibold tabular-nums">{formatTry(total(), props.locale)}</span> |
| 20 | 20 | </div> |
| 21 | 21 | <div class="mt-4 flex flex-wrap gap-1.5"><For each={props.menu.dishes}>{(dish) => <Badge variant="outline">{dish.name}</Badge>}</For></div> |
| 22 | 22 | <Show when={conflicts().length > 0}> |
| 23 | - <div class="mt-3 flex items-start gap-2 rounded-xl border border-amber-500/40 bg-amber-500/10 p-2 text-xs text-amber-800 dark:text-amber-200"> | |
| 23 | + <div class="mt-3 flex items-start gap-2 rounded-xl border border-warning/50 bg-warning/10 p-2 text-xs text-warning"> | |
| 24 | 24 | <IconAlert class="mt-0.5 h-4 w-4" /><span>{props.labels.conflict}: {conflicts().join(", ")}</span> |
| 25 | 25 | </div> |
| 26 | 26 | </Show> |
| 27 | - <div class="mt-auto flex justify-between border-t border-border/60 pt-3 text-xs text-muted-foreground"> | |
| 27 | + <div class="mt-auto flex justify-between border-t border-border-hairline pt-3 text-xs text-text-subtle"> | |
| 28 | 28 | <span>{props.menu.dishes.length} {props.labels.dishes}</span> |
| 29 | 29 | <span>{props.labels.capacity}: <span class="mono">{props.menu.capacity ?? "∞"}</span></span> |
| 30 | 30 | </div> |
src/components/messages/gmail-compose-box.tsxmodified+7 -7
| @@ -81,11 +81,11 @@ export function GmailComposeBox(props: GmailComposeBoxProps) { | ||
| 81 | 81 | return ( |
| 82 | 82 | <Show when={props.open}> |
| 83 | 83 | <div |
| 84 | - class="fixed inset-x-0 bottom-0 z-50 w-full rounded-t-2xl border border-border/80 bg-card pb-[max(env(safe-area-inset-bottom),var(--android-nav-inset,0px))] shadow-2xl transition-all duration-200 sm:inset-x-auto sm:right-6 sm:w-[560px] sm:rounded-t-lg sm:pb-0" | |
| 84 | + class="fixed inset-x-0 bottom-0 z-50 w-full rounded-t-2xl border border-border-line bg-surface-base pb-[max(env(safe-area-inset-bottom),var(--android-nav-inset,0px))] shadow-2xl shadow-black/20 transition-all duration-200 sm:inset-x-auto sm:right-6 sm:w-[560px] sm:rounded-t-xl sm:pb-0" | |
| 85 | 85 | style={{ "max-height": isMinimized() ? "44px" : "640px" }} |
| 86 | 86 | > |
| 87 | 87 | {/* Gmail Header */} |
| 88 | - <div class="flex h-9 items-center justify-between rounded-t-lg border-b bg-muted/80 px-4"> | |
| 88 | + <div class="flex h-9 items-center justify-between rounded-t-xl border-b border-border-hairline bg-surface-overlay px-4"> | |
| 89 | 89 | <div class="flex items-center gap-2"> |
| 90 | 90 | <span class="h-2.5 w-2.5 rounded-full bg-primary" /> |
| 91 | 91 | <h3 class="text-xs font-bold text-foreground truncate max-w-[340px]"> |
| @@ -116,7 +116,7 @@ export function GmailComposeBox(props: GmailComposeBoxProps) { | ||
| 116 | 116 | <Show when={!isMinimized()}> |
| 117 | 117 | <form class="flex h-[min(520px,60vh)] flex-col sm:h-[520px]" onSubmit={handleSend}> |
| 118 | 118 | {/* Recipient Line */} |
| 119 | - <div class="flex items-center border-b px-3 py-1.5 gap-2 text-xs"> | |
| 119 | + <div class="flex items-center border-b border-border-hairline px-3 py-1.5 gap-2 text-xs"> | |
| 120 | 120 | <span class="w-12 font-medium text-muted-foreground shrink-0"> |
| 121 | 121 | {t("messages.recipient")}: |
| 122 | 122 | </span> |
| @@ -132,7 +132,7 @@ export function GmailComposeBox(props: GmailComposeBoxProps) { | ||
| 132 | 132 | </div> |
| 133 | 133 | |
| 134 | 134 | {/* Subject Line */} |
| 135 | - <div class="flex items-center border-b px-3 py-1 gap-2 text-xs"> | |
| 135 | + <div class="flex items-center border-b border-border-hairline px-3 py-1 gap-2 text-xs"> | |
| 136 | 136 | <span class="w-12 font-medium text-muted-foreground shrink-0"> |
| 137 | 137 | {t("form.title")}: |
| 138 | 138 | </span> |
| @@ -147,7 +147,7 @@ export function GmailComposeBox(props: GmailComposeBoxProps) { | ||
| 147 | 147 | </div> |
| 148 | 148 | |
| 149 | 149 | {/* Optional Label Tag Line */} |
| 150 | - <div class="flex items-center border-b px-3 py-1 gap-2 text-xs"> | |
| 150 | + <div class="flex items-center border-b border-border-hairline px-3 py-1 gap-2 text-xs"> | |
| 151 | 151 | <span class="w-12 font-medium text-muted-foreground shrink-0"> |
| 152 | 152 | Etiket: |
| 153 | 153 | </span> |
| @@ -175,11 +175,11 @@ export function GmailComposeBox(props: GmailComposeBoxProps) { | ||
| 175 | 175 | </Show> |
| 176 | 176 | |
| 177 | 177 | {/* Gmail Bottom Action Toolbar */} |
| 178 | - <div class="flex items-center justify-between border-t bg-muted/30 px-3 py-2.5"> | |
| 178 | + <div class="flex items-center justify-between border-t border-border-hairline bg-surface-tint px-3 py-2.5"> | |
| 179 | 179 | <Button |
| 180 | 180 | type="submit" |
| 181 | 181 | size="sm" |
| 182 | - class="h-9 rounded-md bg-primary px-5 font-semibold text-primary-foreground shadow-sm hover:bg-primary/90" | |
| 182 | + class="h-9 rounded-lg px-5 font-semibold" | |
| 183 | 183 | disabled={pending()} |
| 184 | 184 | > |
| 185 | 185 | <IconSend class="mr-2 h-4 w-4" /> |
src/components/messages/gmail-mail-detail.tsxmodified+9 -9
| @@ -110,7 +110,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { | ||
| 110 | 110 | return ( |
| 111 | 111 | <div class="flex flex-col h-full bg-background overflow-auto"> |
| 112 | 112 | {/* Top Gmail Navigation & Action Bar */} |
| 113 | - <div class="sticky top-0 z-10 flex items-center justify-between gap-2 border-b bg-card/90 px-3 py-2.5 backdrop-blur-xs sm:px-4"> | |
| 113 | + <div class="sticky top-0 z-10 flex items-center justify-between gap-2 border-b border-border-hairline bg-surface-base/90 px-3 py-2.5 backdrop-blur-xs sm:px-4"> | |
| 114 | 114 | {/* The action set is wider than a phone, so it scrolls sideways instead |
| 115 | 115 | of squeezing every button or wrapping into a second bar. */} |
| 116 | 116 | <div class="no-scrollbar flex min-w-0 flex-1 items-center gap-2 overflow-x-auto"> |
| @@ -224,7 +224,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { | ||
| 224 | 224 | {/* Main Mail Content View Container */} |
| 225 | 225 | <div class="flex-1 p-4 sm:p-6 max-w-4xl mx-auto w-full space-y-6"> |
| 226 | 226 | {/* Email Subject Title Header */} |
| 227 | - <div class="flex items-center justify-between gap-3 border-b pb-4"> | |
| 227 | + <div class="flex items-center justify-between gap-3 border-b border-border-hairline pb-4"> | |
| 228 | 228 | <div class="flex items-center gap-3"> |
| 229 | 229 | <h1 class="text-xl font-bold tracking-tight text-foreground"> |
| 230 | 230 | {props.message.subject} |
| @@ -240,7 +240,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { | ||
| 240 | 240 | {/* Sender Info Card */} |
| 241 | 241 | <div class="flex items-start justify-between gap-4"> |
| 242 | 242 | <div class="flex items-center gap-3 min-w-0"> |
| 243 | - <div class="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary font-bold text-sm text-primary-foreground shadow-2xs"> | |
| 243 | + <div class="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary font-bold text-sm text-primary-foreground"> | |
| 244 | 244 | {peerName().charAt(0).toUpperCase()} |
| 245 | 245 | </div> |
| 246 | 246 | <div class="min-w-0"> |
| @@ -275,13 +275,13 @@ export function GmailMailDetail(props: GmailMailDetailProps) { | ||
| 275 | 275 | </div> |
| 276 | 276 | |
| 277 | 277 | {/* Email Body Card */} |
| 278 | - <div class="rounded-lg border border-border/80 bg-card p-6 shadow-2xs leading-relaxed text-sm text-foreground/90 whitespace-pre-wrap min-h-[140px]"> | |
| 278 | + <div class="rounded-xl border border-border-line bg-surface-base p-6 leading-relaxed text-sm text-foreground/90 whitespace-pre-wrap min-h-[140px]"> | |
| 279 | 279 | <div innerHTML={props.message.body} /> |
| 280 | 280 | </div> |
| 281 | 281 | |
| 282 | 282 | {/* Gmail Style Inline Reply Area */} |
| 283 | 283 | <Show when={!isSent()}> |
| 284 | - <div class="pt-4 border-t"> | |
| 284 | + <div class="pt-4 border-t border-border-hairline"> | |
| 285 | 285 | <Show |
| 286 | 286 | when={isReplying()} |
| 287 | 287 | fallback={ |
| @@ -289,7 +289,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { | ||
| 289 | 289 | <div class="flex items-center gap-3"> |
| 290 | 290 | <Button |
| 291 | 291 | variant="outline" |
| 292 | - class="rounded-xl px-5 h-9 text-xs font-semibold hover:bg-accent" | |
| 292 | + class="rounded-lg px-5 h-9 text-xs font-semibold hover:bg-accent" | |
| 293 | 293 | onClick={handleStartReply} |
| 294 | 294 | > |
| 295 | 295 | <IconMessage class="mr-2 h-4 w-4" /> |
| @@ -301,9 +301,9 @@ export function GmailMailDetail(props: GmailMailDetailProps) { | ||
| 301 | 301 | {/* Gmail Inline Reply Editor */} |
| 302 | 302 | <form |
| 303 | 303 | onSubmit={handleSendReply} |
| 304 | - class="rounded-lg border border-border bg-card p-4 shadow-xs space-y-3" | |
| 304 | + class="rounded-xl border border-border-line bg-surface-base p-4 shadow-xs space-y-3" | |
| 305 | 305 | > |
| 306 | - <div class="flex items-center justify-between text-xs border-b pb-2"> | |
| 306 | + <div class="flex items-center justify-between text-xs border-b border-border-hairline pb-2"> | |
| 307 | 307 | <div class="flex items-center gap-2"> |
| 308 | 308 | <span class="font-bold text-foreground">{t("messages.replyTo")}</span> |
| 309 | 309 | <Badge variant="secondary" class="text-xs font-medium"> |
| @@ -334,7 +334,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { | ||
| 334 | 334 | <Button |
| 335 | 335 | type="submit" |
| 336 | 336 | size="sm" |
| 337 | - class="rounded-xl px-5 h-9 bg-primary font-semibold text-primary-foreground shadow-2xs hover:bg-primary/90" | |
| 337 | + class="rounded-lg px-5 h-9 font-semibold" | |
| 338 | 338 | disabled={sending() || !replyBody().trim()} |
| 339 | 339 | > |
| 340 | 340 | <IconSend class="mr-2 h-4 w-4" /> |
src/components/messages/gmail-mail-row.tsxmodified+3 -3
| @@ -47,9 +47,9 @@ export function GmailMailRow(props: GmailMailRowProps) { | ||
| 47 | 47 | // A phone cannot fit sender, subject, snippet, date and actions on one |
| 48 | 48 | // 40px line, so below sm: the row stacks and grows to a thumb-sized |
| 49 | 49 | // target; from sm: up it stays the dense single line it always was. |
| 50 | - "group relative flex shrink-0 cursor-pointer select-none flex-col gap-0.5 border-b border-l-4 border-border/60 px-3 py-2.5 text-xs transition-colors duration-150", | |
| 50 | + "group relative flex shrink-0 cursor-pointer select-none flex-col gap-0.5 border-b border-l-4 border-border-hairline px-3 py-2.5 text-xs transition-colors duration-150", | |
| 51 | 51 | "sm:h-10 sm:flex-row sm:items-center sm:gap-3 sm:px-4 sm:py-0", |
| 52 | - unread() ? "border-l-primary bg-card font-semibold text-foreground hover:bg-accent/40" : "border-l-transparent bg-background/60 text-muted-foreground hover:bg-muted/50", | |
| 52 | + unread() ? "border-l-primary bg-surface-base font-semibold text-foreground hover:bg-accent/40" : "border-l-transparent bg-surface-overlay text-muted-foreground hover:bg-muted/50", | |
| 53 | 53 | props.isSelected && "bg-accent/80 text-foreground" |
| 54 | 54 | )} |
| 55 | 55 | onClick={props.onSelect} |
| @@ -66,7 +66,7 @@ export function GmailMailRow(props: GmailMailRowProps) { | ||
| 66 | 66 | {isSent() ? `${t("messages.to")}${peerName()}` : peerName()} |
| 67 | 67 | </span> |
| 68 | 68 | <Show when={role()}> |
| 69 | - <span class="shrink-0 text-[9px] uppercase font-mono px-1 py-0.2 rounded bg-muted text-muted-foreground border border-border/50"> | |
| 69 | + <span class="shrink-0 text-[9px] uppercase font-mono px-1 py-0.2 rounded bg-muted text-muted-foreground border border-border-hairline"> | |
| 70 | 70 | {t(`role.${role()}` as any)} |
| 71 | 71 | </span> |
| 72 | 72 | </Show> |
src/components/ui/alert.tsxmodified+7 -5
| @@ -3,17 +3,19 @@ import { splitProps } from "solid-js"; | ||
| 3 | 3 | import { cn } from "@/lib/cn"; |
| 4 | 4 | |
| 5 | 5 | export function Alert( |
| 6 | - props: ParentProps<ComponentProps<"div"> & { variant?: "default" | "destructive" | "success" }>, | |
| 6 | + props: ParentProps<ComponentProps<"div"> & { variant?: "default" | "destructive" | "success" | "warning" | "info" }>, | |
| 7 | 7 | ) { |
| 8 | 8 | const [local, rest] = splitProps(props, ["class", "children", "variant"]); |
| 9 | 9 | return ( |
| 10 | 10 | <div |
| 11 | 11 | role="alert" |
| 12 | 12 | class={cn( |
| 13 | - "relative w-full rounded-lg border px-4 py-3 text-sm", | |
| 14 | - local.variant === "destructive" && "border-destructive/50 text-destructive", | |
| 15 | - local.variant === "success" && "border-emerald-600/30 bg-emerald-500/10 text-emerald-800 dark:text-emerald-300 font-medium", | |
| 16 | - (!local.variant || local.variant === "default") && "bg-background text-foreground", | |
| 13 | + "relative flex min-h-[70px] w-full items-center rounded-lg border px-5 py-4 text-sm", | |
| 14 | + local.variant === "destructive" && "border-destructive/30 bg-destructive/10 text-destructive", | |
| 15 | + local.variant === "success" && "border-success/30 bg-success/10 font-medium text-success", | |
| 16 | + local.variant === "warning" && "border-warning/30 bg-warning/10 font-medium text-warning", | |
| 17 | + local.variant === "info" && "border-info/30 bg-info/10 font-medium text-info", | |
| 18 | + (!local.variant || local.variant === "default") && "border-border-line bg-surface-base text-foreground", | |
| 17 | 19 | local.class, |
| 18 | 20 | )} |
| 19 | 21 | {...rest} |
src/components/ui/badge.tsxmodified+4 -1
| @@ -4,7 +4,7 @@ import { splitProps } from "solid-js"; | ||
| 4 | 4 | import { cn } from "@/lib/cn"; |
| 5 | 5 | |
| 6 | 6 | const badgeVariants = cva( |
| 7 | - "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring/70 focus:ring-offset-1", | |
| 7 | + "inline-flex h-5 min-h-5 items-center rounded-full border px-2 text-xs font-semibold leading-none transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring/70 focus:ring-offset-1", | |
| 8 | 8 | { |
| 9 | 9 | variants: { |
| 10 | 10 | variant: { |
| @@ -12,6 +12,9 @@ const badgeVariants = cva( | ||
| 12 | 12 | secondary: "border-transparent bg-secondary text-secondary-foreground", |
| 13 | 13 | outline: "border-border text-foreground", |
| 14 | 14 | destructive: "border-transparent bg-destructive/90 text-destructive-foreground", |
| 15 | + success: "border-transparent bg-success/15 text-success", | |
| 16 | + warning: "border-transparent bg-warning/15 text-warning", | |
| 17 | + info: "border-transparent bg-info/15 text-info", | |
| 15 | 18 | }, |
| 16 | 19 | }, |
| 17 | 20 | defaultVariants: { |
src/components/ui/button.tsxmodified+3 -3
| @@ -4,7 +4,7 @@ import { type ComponentProps, type ValidComponent, splitProps } from "solid-js"; | ||
| 4 | 4 | import { cn } from "@/lib/cn"; |
| 5 | 5 | |
| 6 | 6 | export const buttonVariants = cva( |
| 7 | - "inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-semibold transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring/75 focus-visible:ring-offset-1 focus-visible:ring-offset-background active:scale-[0.98] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", | |
| 7 | + "inline-flex cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring/75 focus-visible:ring-offset-1 focus-visible:ring-offset-background active:scale-[0.98] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", | |
| 8 | 8 | { |
| 9 | 9 | variants: { |
| 10 | 10 | variant: { |
| @@ -18,8 +18,8 @@ export const buttonVariants = cva( | ||
| 18 | 18 | link: "text-primary underline-offset-4 hover:underline active:scale-100", |
| 19 | 19 | }, |
| 20 | 20 | size: { |
| 21 | - default: "h-9 px-4 py-2", | |
| 22 | - sm: "h-8 rounded-md px-3 text-xs", | |
| 21 | + default: "h-9 rounded-lg px-3 py-2", | |
| 22 | + sm: "h-[26px] gap-1 rounded-md px-2 text-xs", | |
| 23 | 23 | lg: "h-10 rounded-md px-8", |
| 24 | 24 | icon: "h-9 w-9", |
| 25 | 25 | }, |
src/components/ui/card.tsxmodified+1 -1
| @@ -7,7 +7,7 @@ export function Card(props: ParentProps<ComponentProps<"div">>) { | ||
| 7 | 7 | return ( |
| 8 | 8 | <div |
| 9 | 9 | class={cn( |
| 10 | - "rounded-lg border bg-card text-card-foreground shadow-sm", | |
| 10 | + "rounded-lg border border-border-line bg-surface-base text-card-foreground shadow-sm", | |
| 11 | 11 | local.class, |
| 12 | 12 | )} |
| 13 | 13 | {...rest} |
src/components/ui/chart-bar.tsxmodified+3 -3
| @@ -48,9 +48,9 @@ export const ChartBar: Component<ChartBarProps> = (props) => { | ||
| 48 | 48 | }); |
| 49 | 49 | |
| 50 | 50 | return ( |
| 51 | - <div class={cn("flex flex-col gap-4 rounded-lg border border-border bg-card p-4 shadow-sm", props.class)}> | |
| 51 | + <div class={cn("flex flex-col gap-4 rounded-xl border border-border-line bg-surface-base p-4", props.class)}> | |
| 52 | 52 | <Show when={props.title}> |
| 53 | - <div class="border-b border-border pb-3"> | |
| 53 | + <div class="border-b border-border-hairline pb-3"> | |
| 54 | 54 | <div> |
| 55 | 55 | <h3 class="text-sm font-semibold tracking-tight text-foreground">{props.title}</h3> |
| 56 | 56 | <Show when={props.subtitle}> |
| @@ -91,7 +91,7 @@ export const ChartBar: Component<ChartBarProps> = (props) => { | ||
| 91 | 91 | </span> |
| 92 | 92 | </div> |
| 93 | 93 | |
| 94 | - <div class="relative h-2.5 w-full overflow-hidden rounded-full bg-muted/60 dark:bg-muted/40"> | |
| 94 | + <div class="relative h-2.5 w-full overflow-hidden rounded-full bg-surface-fill"> | |
| 95 | 95 | <div |
| 96 | 96 | class={cn( |
| 97 | 97 | "h-full rounded-full transition-all duration-500 ease-out", |
src/components/ui/chart-heatmap.tsxmodified+3 -3
| @@ -133,9 +133,9 @@ export const ChartHeatmap: Component<ChartHeatmapProps> = (props) => { | ||
| 133 | 133 | const hasData = createMemo(() => maxValue() > 0); |
| 134 | 134 | |
| 135 | 135 | return ( |
| 136 | - <div class={cn("flex flex-col gap-4 rounded-lg border border-border bg-card p-4 shadow-sm", props.class)}> | |
| 136 | + <div class={cn("flex flex-col gap-4 rounded-xl border border-border-line bg-surface-base p-4", props.class)}> | |
| 137 | 137 | <Show when={props.title}> |
| 138 | - <div class="border-b border-border pb-3"> | |
| 138 | + <div class="border-b border-border-hairline pb-3"> | |
| 139 | 139 | <h3 class="text-sm font-semibold tracking-tight text-foreground">{props.title}</h3> |
| 140 | 140 | <Show when={props.subtitle}> |
| 141 | 141 | <p class="mt-0.5 text-xs text-muted-foreground">{props.subtitle}</p> |
| @@ -215,7 +215,7 @@ export const ChartHeatmap: Component<ChartHeatmapProps> = (props) => { | ||
| 215 | 215 | </div> |
| 216 | 216 | </div> |
| 217 | 217 | |
| 218 | - <div class="flex flex-wrap items-center justify-between gap-2 border-t border-border pt-3"> | |
| 218 | + <div class="flex flex-wrap items-center justify-between gap-2 border-t border-border-hairline pt-3"> | |
| 219 | 219 | <Show when={props.footer}> |
| 220 | 220 | <p class="text-[11px] text-muted-foreground">{props.footer}</p> |
| 221 | 221 | </Show> |
src/components/ui/chart-line.tsxmodified+6 -6
| @@ -69,9 +69,9 @@ export const ChartLine: Component<ChartLineProps> = (props) => { | ||
| 69 | 69 | const averageY = () => PADDING.top + (1 - Math.min(1, summary()!.average / maxValue())) * plotHeight; |
| 70 | 70 | |
| 71 | 71 | return ( |
| 72 | - <div class={cn("flex flex-col gap-4 rounded-lg border border-border bg-card p-4 shadow-sm", props.class)}> | |
| 72 | + <div class={cn("flex flex-col gap-4 rounded-xl border border-border-line bg-surface-base p-4", props.class)}> | |
| 73 | 73 | <Show when={props.title}> |
| 74 | - <div class="border-b border-border pb-3"> | |
| 74 | + <div class="border-b border-border-hairline pb-3"> | |
| 75 | 75 | <h3 class="text-sm font-semibold tracking-tight text-foreground">{props.title}</h3> |
| 76 | 76 | <Show when={props.subtitle}> |
| 77 | 77 | <p class="mt-0.5 text-xs text-muted-foreground">{props.subtitle}</p> |
| @@ -91,19 +91,19 @@ export const ChartLine: Component<ChartLineProps> = (props) => { | ||
| 91 | 91 | {(stats) => ( |
| 92 | 92 | <div class="space-y-3"> |
| 93 | 93 | <dl class="grid grid-cols-2 gap-2 sm:grid-cols-4"> |
| 94 | - <div class="rounded-md bg-muted/35 px-2.5 py-2"> | |
| 94 | + <div class="rounded-lg bg-surface-overlay px-2.5 py-2"> | |
| 95 | 95 | <dt class="text-[10px] text-muted-foreground">{t("dashboard.chartExamCount")}</dt> |
| 96 | 96 | <dd class="mt-0.5 font-mono text-sm font-semibold tabular-nums">{props.items.length}</dd> |
| 97 | 97 | </div> |
| 98 | - <div class="rounded-md bg-muted/35 px-2.5 py-2"> | |
| 98 | + <div class="rounded-lg bg-surface-overlay px-2.5 py-2"> | |
| 99 | 99 | <dt class="text-[10px] text-muted-foreground">{t("dashboard.chartLatest")}</dt> |
| 100 | 100 | <dd class="mt-0.5 font-mono text-sm font-semibold tabular-nums">{stats().latest.formattedValue ?? stats().latest.value}</dd> |
| 101 | 101 | </div> |
| 102 | - <div class="rounded-md bg-muted/35 px-2.5 py-2"> | |
| 102 | + <div class="rounded-lg bg-surface-overlay px-2.5 py-2"> | |
| 103 | 103 | <dt class="text-[10px] text-muted-foreground">{t("dashboard.chartAverage")}</dt> |
| 104 | 104 | <dd class="mt-0.5 font-mono text-sm font-semibold tabular-nums">{stats().average.toFixed(1)}</dd> |
| 105 | 105 | </div> |
| 106 | - <div class="rounded-md bg-muted/35 px-2.5 py-2"> | |
| 106 | + <div class="rounded-lg bg-surface-overlay px-2.5 py-2"> | |
| 107 | 107 | <dt class="text-[10px] text-muted-foreground">{t("dashboard.chartRange")}</dt> |
| 108 | 108 | <dd class="mt-0.5 font-mono text-sm font-semibold tabular-nums">{stats().minimum.toFixed(1)}–{stats().maximum.toFixed(1)}</dd> |
| 109 | 109 | </div> |
src/components/ui/chart-progress-ring.tsxmodified+4 -4
| @@ -42,9 +42,9 @@ export const ChartProgressRing: Component<ChartProgressRingProps> = (props) => { | ||
| 42 | 42 | }); |
| 43 | 43 | |
| 44 | 44 | return ( |
| 45 | - <div class={cn("flex flex-col gap-4 rounded-lg border border-border bg-card p-4 shadow-sm", props.class)}> | |
| 45 | + <div class={cn("flex flex-col gap-4 rounded-xl border border-border-line bg-surface-base p-4", props.class)}> | |
| 46 | 46 | <Show when={props.title}> |
| 47 | - <div class="border-b border-border pb-3"> | |
| 47 | + <div class="border-b border-border-hairline pb-3"> | |
| 48 | 48 | <div> |
| 49 | 49 | <h3 class="text-sm font-semibold tracking-tight text-foreground">{props.title}</h3> |
| 50 | 50 | <Show when={props.subtitle}> |
| @@ -75,7 +75,7 @@ export const ChartProgressRing: Component<ChartProgressRingProps> = (props) => { | ||
| 75 | 75 | </div> |
| 76 | 76 | |
| 77 | 77 | {/* Multi-Segmented Progress Gauge Bar */} |
| 78 | - <div class="flex h-3.5 w-full overflow-hidden rounded-full bg-muted/60 dark:bg-muted/40 p-0.5 border border-border/40"> | |
| 78 | + <div class="flex h-3.5 w-full overflow-hidden rounded-full border border-border-hairline bg-surface-fill p-0.5"> | |
| 79 | 79 | <For each={props.segments}> |
| 80 | 80 | {(segment) => { |
| 81 | 81 | const pct = () => (calculatedTotal() > 0 ? (segment.value / calculatedTotal()) * 100 : 0); |
| @@ -96,7 +96,7 @@ export const ChartProgressRing: Component<ChartProgressRingProps> = (props) => { | ||
| 96 | 96 | <div class="grid grid-cols-2 gap-2 pt-1 sm:grid-cols-2"> |
| 97 | 97 | <For each={visibleSegments()}> |
| 98 | 98 | {(segment) => ( |
| 99 | - <div class="flex items-center justify-between rounded-xl border border-border/40 bg-muted/30 px-3 py-2 text-xs"> | |
| 99 | + <div class="flex items-center justify-between rounded-lg border border-border-hairline bg-surface-overlay px-3 py-2 text-xs"> | |
| 100 | 100 | <div class="flex items-center gap-2 truncate"> |
| 101 | 101 | <span class={cn("h-2.5 w-2.5 shrink-0 rounded-full", segment.colorClass)} /> |
| 102 | 102 | <span class="truncate font-medium text-muted-foreground">{segment.label}</span> |
src/components/ui/data-table.tsxmodified+1 -1
| @@ -413,7 +413,7 @@ export function DataTableFrame(props: ParentProps<{ class?: string }>) { | ||
| 413 | 413 | |
| 414 | 414 | export function DataTableEmpty(props: ParentProps<{ class?: string }>) { |
| 415 | 415 | return ( |
| 416 | - <div class={cn("rounded-lg border border-dashed border-border/70 bg-muted/15 px-6 py-10 text-center text-sm leading-6 text-muted-foreground", props.class)}> | |
| 416 | + <div class={cn("rounded-xl border border-dashed border-border-line bg-surface-overlay px-6 py-10 text-center text-sm leading-6 text-text-subtle", props.class)}> | |
| 417 | 417 | {props.children} |
| 418 | 418 | </div> |
| 419 | 419 | ); |
src/components/ui/dialog.tsxmodified+4 -4
| @@ -18,14 +18,14 @@ export function DialogContent<T extends ValidComponent = "div">( | ||
| 18 | 18 | ]); |
| 19 | 19 | return ( |
| 20 | 20 | <DialogPrimitive.Portal> |
| 21 | - <DialogPrimitive.Overlay class="fixed inset-0 z-50 bg-black/80 backdrop-blur-sm transition-opacity duration-200" /> | |
| 21 | + <DialogPrimitive.Overlay class="fixed inset-0 z-50 bg-[rgba(13,15,23,0.55)] transition-opacity duration-200" /> | |
| 22 | 22 | {/* flex center — animate-fade-up must not own transform positioning */} |
| 23 | 23 | {/* The centring box is inset by the system bars, so a tall dialog is |
| 24 | 24 | never clipped by the status bar or the gesture bar. */} |
| 25 | 25 | <div class="pointer-events-none fixed inset-0 z-50 flex items-center justify-center p-3 pb-[calc(0.75rem+max(env(safe-area-inset-bottom),var(--android-nav-inset,0px)))] pt-[calc(0.75rem+env(safe-area-inset-top))] sm:p-4"> |
| 26 | 26 | <DialogPrimitive.Content |
| 27 | 27 | class={cn( |
| 28 | - "pointer-events-auto relative flex max-h-[min(100%,48rem)] w-full max-w-lg flex-col overflow-hidden border border-border/80 bg-background text-foreground shadow-2xl shadow-black/20 outline-hidden animate-fade-up sm:rounded-lg", | |
| 28 | + "pointer-events-auto relative flex max-h-[min(100%,48rem)] w-full max-w-[480px] flex-col overflow-hidden border border-border-line bg-surface-base text-foreground shadow-[0_16px_40px_rgba(0,0,0,0.16)] outline-hidden animate-fade-up sm:rounded-2xl", | |
| 29 | 29 | local.class, |
| 30 | 30 | )} |
| 31 | 31 | // Standard dialogs dismiss outside/ESC; pass false only when losing |
| @@ -50,11 +50,11 @@ export function DialogContent<T extends ValidComponent = "div">( | ||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | export function DialogHeader(props: ParentProps<{ class?: string }>) { |
| 53 | - return <div class={cn("flex flex-col space-y-1.5 border-b border-border/80 px-5 py-4 pr-14 text-center sm:px-6 sm:text-left", props.class)}>{props.children}</div>; | |
| 53 | + return <div class={cn("flex flex-col space-y-1.5 border-b border-border-hairline px-5 py-5 pr-14 text-center sm:px-7 sm:text-left", props.class)}>{props.children}</div>; | |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | export function DialogBody(props: ParentProps<{ class?: string }>) { |
| 57 | - return <div class={cn("overflow-y-auto overscroll-contain px-5 py-4 sm:px-6", props.class)}>{props.children}</div>; | |
| 57 | + return <div class={cn("overflow-y-auto overscroll-contain px-5 py-5 sm:px-7", props.class)}>{props.children}</div>; | |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | export function DialogTitle<T extends ValidComponent = "h2">( |
src/components/ui/empty-state.tsxmodified+10 -10
| @@ -26,13 +26,13 @@ export function EmptyState(props: { | ||
| 26 | 26 | return ( |
| 27 | 27 | <div |
| 28 | 28 | class={cn( |
| 29 | - "flex min-h-48 flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border/70 bg-muted/15 px-6 py-8 text-center transition-all duration-300", | |
| 29 | + "flex min-h-[289px] flex-col items-center justify-center gap-5 rounded-xl border border-border-hairline bg-surface-base px-10 py-14 text-center transition-all duration-300", | |
| 30 | 30 | props.class, |
| 31 | 31 | )} |
| 32 | 32 | > |
| 33 | - <div class={cn("relative flex h-16 w-16 items-center justify-center rounded-lg border shadow-inner", KIND_TONE[kind()])}> | |
| 33 | + <div class={cn("relative flex h-14 w-14 items-center justify-center rounded-lg border", KIND_TONE[kind()])}> | |
| 34 | 34 | <Show when={kind() === "notes"}> |
| 35 | - <svg class="h-8 w-8" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> | |
| 35 | + <svg class="h-7 w-7" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> | |
| 36 | 36 | <path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1-2.5-2.5Z" /> |
| 37 | 37 | <path d="M6 6h10" /> |
| 38 | 38 | <path d="M6 10h8" /> |
| @@ -40,14 +40,14 @@ export function EmptyState(props: { | ||
| 40 | 40 | </svg> |
| 41 | 41 | </Show> |
| 42 | 42 | <Show when={kind() === "exams"}> |
| 43 | - <svg class="h-8 w-8" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> | |
| 43 | + <svg class="h-7 w-7" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> | |
| 44 | 44 | <path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /> |
| 45 | 45 | <polyline points="14 2 14 8 20 8" /> |
| 46 | 46 | <path d="m9 15 2 2 4-4" /> |
| 47 | 47 | </svg> |
| 48 | 48 | </Show> |
| 49 | 49 | <Show when={kind() === "events"}> |
| 50 | - <svg class="h-8 w-8" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> | |
| 50 | + <svg class="h-7 w-7" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> | |
| 51 | 51 | <rect width="18" height="18" x="3" y="4" rx="2" ry="2" /> |
| 52 | 52 | <line x1="16" x2="16" y1="2" y2="6" /> |
| 53 | 53 | <line x1="8" x2="8" y1="2" y2="6" /> |
| @@ -56,23 +56,23 @@ export function EmptyState(props: { | ||
| 56 | 56 | </svg> |
| 57 | 57 | </Show> |
| 58 | 58 | <Show when={kind() === "meals"}> |
| 59 | - <svg class="h-8 w-8" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> | |
| 59 | + <svg class="h-7 w-7" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> | |
| 60 | 60 | <path d="M3 2v7c0 1.1.9 2 2 2h0a2 2 0 0 0 2-2V2M5 2v20" /> |
| 61 | 61 | <path d="M15 2v20M15 8c0-3.3 1.3-6 4-6v20" /> |
| 62 | 62 | </svg> |
| 63 | 63 | </Show> |
| 64 | 64 | <Show when={kind() === "default" || kind() === "courses"}> |
| 65 | - <svg class="h-8 w-8" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> | |
| 65 | + <svg class="h-7 w-7" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> | |
| 66 | 66 | <path d="M22 10v6M2 10l10-5 10 5-10 5z" /> |
| 67 | 67 | <path d="M6 12v5c3 3 9 3 12 0v-5" /> |
| 68 | 68 | </svg> |
| 69 | 69 | </Show> |
| 70 | 70 | </div> |
| 71 | 71 | |
| 72 | - <div class="space-y-1"> | |
| 73 | - <p class="text-sm font-semibold text-foreground">{props.title}</p> | |
| 72 | + <div class="space-y-2"> | |
| 73 | + <p class="text-xl font-semibold leading-8 tracking-[-0.025em] text-text-strong sm:text-2xl">{props.title}</p> | |
| 74 | 74 | <Show when={props.description}> |
| 75 | - <p class="max-w-sm text-xs leading-relaxed text-muted-foreground">{props.description}</p> | |
| 75 | + <p class="max-w-[420px] text-sm leading-[21px] text-text-subtle">{props.description}</p> | |
| 76 | 76 | </Show> |
| 77 | 77 | </div> |
| 78 | 78 | </div> |
src/components/ui/icons.tsxmodified+100 -272
| @@ -1,10 +1,70 @@ | ||
| 1 | 1 | import type { JSX } from "solid-js"; |
| 2 | 2 | import { cn } from "@/lib/cn"; |
| 3 | +import arrowSquareOutUrl from "@phosphor-icons/core/regular/arrow-square-out.svg?url"; | |
| 4 | +import bellUrl from "@phosphor-icons/core/regular/bell.svg?url"; | |
| 5 | +import bookOpenUrl from "@phosphor-icons/core/regular/book-open.svg?url"; | |
| 6 | +import calendarDotsUrl from "@phosphor-icons/core/regular/calendar-dots.svg?url"; | |
| 7 | +import caretDownUrl from "@phosphor-icons/core/regular/caret-down.svg?url"; | |
| 8 | +import caretLeftUrl from "@phosphor-icons/core/regular/caret-left.svg?url"; | |
| 9 | +import caretRightUrl from "@phosphor-icons/core/regular/caret-right.svg?url"; | |
| 10 | +import caretUpDownUrl from "@phosphor-icons/core/regular/caret-up-down.svg?url"; | |
| 11 | +import chartBarUrl from "@phosphor-icons/core/regular/chart-bar.svg?url"; | |
| 12 | +import chartLineUpUrl from "@phosphor-icons/core/regular/chart-line-up.svg?url"; | |
| 13 | +import chatCircleDotsUrl from "@phosphor-icons/core/regular/chat-circle-dots.svg?url"; | |
| 14 | +import checkCircleUrl from "@phosphor-icons/core/regular/check-circle.svg?url"; | |
| 15 | +import checkUrl from "@phosphor-icons/core/regular/check.svg?url"; | |
| 16 | +import clockUrl from "@phosphor-icons/core/regular/clock.svg?url"; | |
| 17 | +import clipboardTextUrl from "@phosphor-icons/core/regular/clipboard-text.svg?url"; | |
| 18 | +import copyUrl from "@phosphor-icons/core/regular/copy.svg?url"; | |
| 19 | +import downloadSimpleUrl from "@phosphor-icons/core/regular/download-simple.svg?url"; | |
| 20 | +import examUrl from "@phosphor-icons/core/regular/exam.svg?url"; | |
| 21 | +import eyeUrl from "@phosphor-icons/core/regular/eye.svg?url"; | |
| 22 | +import fileTextUrl from "@phosphor-icons/core/regular/file-text.svg?url"; | |
| 23 | +import funnelUrl from "@phosphor-icons/core/regular/funnel.svg?url"; | |
| 24 | +import gearUrl from "@phosphor-icons/core/regular/gear.svg?url"; | |
| 25 | +import graduationCapUrl from "@phosphor-icons/core/regular/graduation-cap.svg?url"; | |
| 26 | +import houseUrl from "@phosphor-icons/core/regular/house.svg?url"; | |
| 27 | +import listUrl from "@phosphor-icons/core/regular/list.svg?url"; | |
| 28 | +import lockSimpleUrl from "@phosphor-icons/core/regular/lock-simple.svg?url"; | |
| 29 | +import magnifyingGlassUrl from "@phosphor-icons/core/regular/magnifying-glass.svg?url"; | |
| 30 | +import paperPlaneTiltUrl from "@phosphor-icons/core/regular/paper-plane-tilt.svg?url"; | |
| 31 | +import pencilSimpleUrl from "@phosphor-icons/core/regular/pencil-simple.svg?url"; | |
| 32 | +import plusUrl from "@phosphor-icons/core/regular/plus.svg?url"; | |
| 33 | +import questionUrl from "@phosphor-icons/core/regular/question.svg?url"; | |
| 34 | +import sidebarSimpleUrl from "@phosphor-icons/core/regular/sidebar-simple.svg?url"; | |
| 35 | +import signOutUrl from "@phosphor-icons/core/regular/sign-out.svg?url"; | |
| 36 | +import sparkleUrl from "@phosphor-icons/core/regular/sparkle.svg?url"; | |
| 37 | +import trashUrl from "@phosphor-icons/core/regular/trash.svg?url"; | |
| 38 | +import uploadSimpleUrl from "@phosphor-icons/core/regular/upload-simple.svg?url"; | |
| 39 | +import usersUrl from "@phosphor-icons/core/regular/users.svg?url"; | |
| 40 | +import warningUrl from "@phosphor-icons/core/regular/warning.svg?url"; | |
| 41 | +import xUrl from "@phosphor-icons/core/regular/x.svg?url"; | |
| 3 | 42 | |
| 4 | 43 | type IconProps = { |
| 5 | 44 | class?: string; |
| 6 | 45 | }; |
| 7 | 46 | |
| 47 | +/** Exact Phosphor Regular artwork used by the Figma icon library. A mask keeps | |
| 48 | + * the source SVG local while allowing the icon to inherit the current color. */ | |
| 49 | +function PhosphorIcon(props: IconProps & { src: string }) { | |
| 50 | + return ( | |
| 51 | + <span | |
| 52 | + aria-hidden="true" | |
| 53 | + class={cn("inline-block h-4 w-4 shrink-0 bg-current", props.class)} | |
| 54 | + style={{ | |
| 55 | + "mask-image": `url("${props.src}")`, | |
| 56 | + "mask-position": "center", | |
| 57 | + "mask-repeat": "no-repeat", | |
| 58 | + "mask-size": "contain", | |
| 59 | + "-webkit-mask-image": `url("${props.src}")`, | |
| 60 | + "-webkit-mask-position": "center", | |
| 61 | + "-webkit-mask-repeat": "no-repeat", | |
| 62 | + "-webkit-mask-size": "contain", | |
| 63 | + }} | |
| 64 | + /> | |
| 65 | + ); | |
| 66 | +} | |
| 67 | + | |
| 8 | 68 | /** Shared stroke system: 24 grid, 2px stroke, round caps/joins (Lucide geometry). */ |
| 9 | 69 | function Svg(props: IconProps & { children: JSX.Element }) { |
| 10 | 70 | return ( |
| @@ -24,34 +84,15 @@ function Svg(props: IconProps & { children: JSX.Element }) { | ||
| 24 | 84 | } |
| 25 | 85 | |
| 26 | 86 | export function IconLogout(props: IconProps) { |
| 27 | - return ( | |
| 28 | - <Svg {...props}> | |
| 29 | - <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /> | |
| 30 | - <polyline points="16 17 21 12 16 7" /> | |
| 31 | - <line x1="21" y1="12" x2="9" y2="12" /> | |
| 32 | - </Svg> | |
| 33 | - ); | |
| 87 | + return <PhosphorIcon {...props} src={signOutUrl} />; | |
| 34 | 88 | } |
| 35 | 89 | |
| 36 | 90 | export function IconTrash(props: IconProps) { |
| 37 | - return ( | |
| 38 | - <Svg {...props}> | |
| 39 | - <path d="M3 6h18" /> | |
| 40 | - <path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" /> | |
| 41 | - <path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" /> | |
| 42 | - <line x1="10" y1="11" x2="10" y2="17" /> | |
| 43 | - <line x1="14" y1="11" x2="14" y2="17" /> | |
| 44 | - </Svg> | |
| 45 | - ); | |
| 91 | + return <PhosphorIcon {...props} src={trashUrl} />; | |
| 46 | 92 | } |
| 47 | 93 | |
| 48 | 94 | export function IconLock(props: IconProps) { |
| 49 | - return ( | |
| 50 | - <Svg {...props}> | |
| 51 | - <rect x="4" y="10" width="16" height="11" rx="2" /> | |
| 52 | - <path d="M8 10V7a4 4 0 0 1 8 0v3" /> | |
| 53 | - </Svg> | |
| 54 | - ); | |
| 95 | + return <PhosphorIcon {...props} src={lockSimpleUrl} />; | |
| 55 | 96 | } |
| 56 | 97 | |
| 57 | 98 | /** Delete-whole-series: a calendar with an ✕ — distinct silhouette from the |
| @@ -80,20 +121,11 @@ export function IconArchive(props: IconProps) { | ||
| 80 | 121 | } |
| 81 | 122 | |
| 82 | 123 | export function IconSend(props: IconProps) { |
| 83 | - return ( | |
| 84 | - <Svg {...props}> | |
| 85 | - <path d="m22 2-7 20-4-9-9-4Z" /> | |
| 86 | - <path d="M22 2 11 13" /> | |
| 87 | - </Svg> | |
| 88 | - ); | |
| 124 | + return <PhosphorIcon {...props} src={paperPlaneTiltUrl} />; | |
| 89 | 125 | } |
| 90 | 126 | |
| 91 | 127 | export function IconMessage(props: IconProps) { |
| 92 | - return ( | |
| 93 | - <Svg {...props}> | |
| 94 | - <path d="M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z" /> | |
| 95 | - </Svg> | |
| 96 | - ); | |
| 128 | + return <PhosphorIcon {...props} src={chatCircleDotsUrl} />; | |
| 97 | 129 | } |
| 98 | 130 | |
| 99 | 131 | export function IconBotSquare(props: IconProps) { |
| @@ -108,39 +140,19 @@ export function IconBotSquare(props: IconProps) { | ||
| 108 | 140 | } |
| 109 | 141 | |
| 110 | 142 | export function IconCheck(props: IconProps) { |
| 111 | - return ( | |
| 112 | - <Svg {...props}> | |
| 113 | - <path d="M20 6 9 17l-5-5" /> | |
| 114 | - </Svg> | |
| 115 | - ); | |
| 143 | + return <PhosphorIcon {...props} src={checkUrl} />; | |
| 116 | 144 | } |
| 117 | 145 | |
| 118 | 146 | export function IconCopy(props: IconProps) { |
| 119 | - return ( | |
| 120 | - <Svg {...props}> | |
| 121 | - <rect x="9" y="9" width="13" height="13" rx="2" /> | |
| 122 | - <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" /> | |
| 123 | - </Svg> | |
| 124 | - ); | |
| 147 | + return <PhosphorIcon {...props} src={copyUrl} />; | |
| 125 | 148 | } |
| 126 | 149 | |
| 127 | 150 | export function IconX(props: IconProps) { |
| 128 | - return ( | |
| 129 | - <Svg {...props}> | |
| 130 | - <path d="M18 6 6 18" /> | |
| 131 | - <path d="m6 6 12 12" /> | |
| 132 | - </Svg> | |
| 133 | - ); | |
| 151 | + return <PhosphorIcon {...props} src={xUrl} />; | |
| 134 | 152 | } |
| 135 | 153 | |
| 136 | 154 | export function IconAlert(props: IconProps) { |
| 137 | - return ( | |
| 138 | - <Svg {...props}> | |
| 139 | - <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" /> | |
| 140 | - <path d="M12 9v4" /> | |
| 141 | - <path d="M12 17h.01" /> | |
| 142 | - </Svg> | |
| 143 | - ); | |
| 155 | + return <PhosphorIcon {...props} src={warningUrl} />; | |
| 144 | 156 | } |
| 145 | 157 | |
| 146 | 158 | export function IconSave(props: IconProps) { |
| @@ -154,12 +166,7 @@ export function IconSave(props: IconProps) { | ||
| 154 | 166 | } |
| 155 | 167 | |
| 156 | 168 | export function IconEdit(props: IconProps) { |
| 157 | - return ( | |
| 158 | - <Svg {...props}> | |
| 159 | - <path d="M12 20h9" /> | |
| 160 | - <path d="M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z" /> | |
| 161 | - </Svg> | |
| 162 | - ); | |
| 169 | + return <PhosphorIcon {...props} src={pencilSimpleUrl} />; | |
| 163 | 170 | } |
| 164 | 171 | |
| 165 | 172 | export function IconEraser(props: IconProps) { |
| @@ -227,22 +234,11 @@ export function IconUndo(props: IconProps) { | ||
| 227 | 234 | } |
| 228 | 235 | |
| 229 | 236 | export function IconPlus(props: IconProps) { |
| 230 | - return ( | |
| 231 | - <Svg {...props}> | |
| 232 | - <path d="M5 12h14" /> | |
| 233 | - <path d="M12 5v14" /> | |
| 234 | - </Svg> | |
| 235 | - ); | |
| 237 | + return <PhosphorIcon {...props} src={plusUrl} />; | |
| 236 | 238 | } |
| 237 | 239 | |
| 238 | 240 | export function IconDownload(props: IconProps) { |
| 239 | - return ( | |
| 240 | - <Svg {...props}> | |
| 241 | - <path d="M12 3v12" /> | |
| 242 | - <path d="m7 10 5 5 5-5" /> | |
| 243 | - <path d="M5 21h14" /> | |
| 244 | - </Svg> | |
| 245 | - ); | |
| 241 | + return <PhosphorIcon {...props} src={downloadSimpleUrl} />; | |
| 246 | 242 | } |
| 247 | 243 | |
| 248 | 244 | export function IconSun(props: IconProps) { |
| @@ -291,13 +287,7 @@ export function IconZoomOut(props: IconProps) { | ||
| 291 | 287 | } |
| 292 | 288 | |
| 293 | 289 | export function IconHelpCircle(props: IconProps) { |
| 294 | - return ( | |
| 295 | - <Svg {...props}> | |
| 296 | - <circle cx="12" cy="12" r="10" /> | |
| 297 | - <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /> | |
| 298 | - <path d="M12 17h.01" /> | |
| 299 | - </Svg> | |
| 300 | - ); | |
| 290 | + return <PhosphorIcon {...props} src={questionUrl} />; | |
| 301 | 291 | } |
| 302 | 292 | |
| 303 | 293 | export function IconMessagePlus(props: IconProps) { |
| @@ -331,27 +321,15 @@ export function IconGlobe(props: IconProps) { | ||
| 331 | 321 | } |
| 332 | 322 | |
| 333 | 323 | export function IconChevronLeft(props: IconProps) { |
| 334 | - return ( | |
| 335 | - <Svg {...props}> | |
| 336 | - <path d="m15 18-6-6 6-6" /> | |
| 337 | - </Svg> | |
| 338 | - ); | |
| 324 | + return <PhosphorIcon {...props} src={caretLeftUrl} />; | |
| 339 | 325 | } |
| 340 | 326 | |
| 341 | 327 | export function IconChevronRight(props: IconProps) { |
| 342 | - return ( | |
| 343 | - <Svg {...props}> | |
| 344 | - <path d="m9 18 6-6-6-6" /> | |
| 345 | - </Svg> | |
| 346 | - ); | |
| 328 | + return <PhosphorIcon {...props} src={caretRightUrl} />; | |
| 347 | 329 | } |
| 348 | 330 | |
| 349 | 331 | export function IconChevronDown(props: IconProps) { |
| 350 | - return ( | |
| 351 | - <Svg {...props}> | |
| 352 | - <path d="m6 9 6 6 6-6" /> | |
| 353 | - </Svg> | |
| 354 | - ); | |
| 332 | + return <PhosphorIcon {...props} src={caretDownUrl} />; | |
| 355 | 333 | } |
| 356 | 334 | |
| 357 | 335 | export function IconArrowUp(props: IconProps) { |
| @@ -373,21 +351,11 @@ export function IconArrowDown(props: IconProps) { | ||
| 373 | 351 | } |
| 374 | 352 | |
| 375 | 353 | export function IconChevronsUpDown(props: IconProps) { |
| 376 | - return ( | |
| 377 | - <Svg {...props}> | |
| 378 | - <path d="m7 15 5 5 5-5" /> | |
| 379 | - <path d="m7 9 5-5 5 5" /> | |
| 380 | - </Svg> | |
| 381 | - ); | |
| 354 | + return <PhosphorIcon {...props} src={caretUpDownUrl} />; | |
| 382 | 355 | } |
| 383 | 356 | |
| 384 | 357 | export function IconHome(props: IconProps) { |
| 385 | - return ( | |
| 386 | - <Svg {...props}> | |
| 387 | - <path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" /> | |
| 388 | - <path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /> | |
| 389 | - </Svg> | |
| 390 | - ); | |
| 358 | + return <PhosphorIcon {...props} src={houseUrl} />; | |
| 391 | 359 | } |
| 392 | 360 | |
| 393 | 361 | export function IconNote(props: IconProps) { |
| @@ -432,26 +400,11 @@ export function IconFileAudio(props: IconProps) { | ||
| 432 | 400 | } |
| 433 | 401 | |
| 434 | 402 | export function IconFileText(props: IconProps) { |
| 435 | - return ( | |
| 436 | - <Svg {...props}> | |
| 437 | - <path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" /> | |
| 438 | - <path d="M14 2v4a2 2 0 0 0 2 2h4" /> | |
| 439 | - <path d="M8 13h8" /> | |
| 440 | - <path d="M8 17h5" /> | |
| 441 | - </Svg> | |
| 442 | - ); | |
| 403 | + return <PhosphorIcon {...props} src={fileTextUrl} />; | |
| 443 | 404 | } |
| 444 | 405 | |
| 445 | 406 | export function IconHomework(props: IconProps) { |
| 446 | - return ( | |
| 447 | - <Svg {...props}> | |
| 448 | - <path d="M15 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6Z" /> | |
| 449 | - <path d="M14 2v4a2 2 0 0 0 2 2h3" /> | |
| 450 | - <path d="M8 13h5" /> | |
| 451 | - <path d="M8 17h3" /> | |
| 452 | - <path d="m15 16 4-4 2 2-4 4h-2z" /> | |
| 453 | - </Svg> | |
| 454 | - ); | |
| 407 | + return <PhosphorIcon {...props} src={clipboardTextUrl} />; | |
| 455 | 408 | } |
| 456 | 409 | |
| 457 | 410 | export function IconFileSpreadsheet(props: IconProps) { |
| @@ -467,53 +420,19 @@ export function IconFileSpreadsheet(props: IconProps) { | ||
| 467 | 420 | } |
| 468 | 421 | |
| 469 | 422 | export function IconCalendar(props: IconProps) { |
| 470 | - return ( | |
| 471 | - <Svg {...props}> | |
| 472 | - <path d="M8 2v4" /> | |
| 473 | - <path d="M16 2v4" /> | |
| 474 | - <rect width="18" height="18" x="3" y="4" rx="2" /> | |
| 475 | - <path d="M3 10h18" /> | |
| 476 | - </Svg> | |
| 477 | - ); | |
| 423 | + return <PhosphorIcon {...props} src={calendarDotsUrl} />; | |
| 478 | 424 | } |
| 479 | 425 | |
| 480 | 426 | export function IconCalendarDays(props: IconProps) { |
| 481 | - return ( | |
| 482 | - <Svg {...props}> | |
| 483 | - <path d="M8 2v4" /> | |
| 484 | - <path d="M16 2v4" /> | |
| 485 | - <rect width="18" height="18" x="3" y="4" rx="2" /> | |
| 486 | - <path d="M3 10h18" /> | |
| 487 | - <path d="M8 14h.01" /> | |
| 488 | - <path d="M12 14h.01" /> | |
| 489 | - <path d="M16 14h.01" /> | |
| 490 | - <path d="M8 18h.01" /> | |
| 491 | - <path d="M12 18h.01" /> | |
| 492 | - <path d="M16 18h.01" /> | |
| 493 | - </Svg> | |
| 494 | - ); | |
| 427 | + return <PhosphorIcon {...props} src={calendarDotsUrl} />; | |
| 495 | 428 | } |
| 496 | 429 | |
| 497 | 430 | export function IconClock(props: IconProps) { |
| 498 | - return ( | |
| 499 | - <Svg {...props}> | |
| 500 | - <circle cx="12" cy="12" r="10" /> | |
| 501 | - <path d="M12 6v6l4 2" /> | |
| 502 | - </Svg> | |
| 503 | - ); | |
| 431 | + return <PhosphorIcon {...props} src={clockUrl} />; | |
| 504 | 432 | } |
| 505 | 433 | |
| 506 | 434 | export function IconExam(props: IconProps) { |
| 507 | - return ( | |
| 508 | - <Svg {...props}> | |
| 509 | - <rect width="8" height="4" x="8" y="2" rx="1" ry="1" /> | |
| 510 | - <path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /> | |
| 511 | - <path d="M12 11h4" /> | |
| 512 | - <path d="M12 16h4" /> | |
| 513 | - <path d="M8 11h.01" /> | |
| 514 | - <path d="M8 16h.01" /> | |
| 515 | - </Svg> | |
| 516 | - ); | |
| 435 | + return <PhosphorIcon {...props} src={examUrl} />; | |
| 517 | 436 | } |
| 518 | 437 | |
| 519 | 438 | export function IconGuide(props: IconProps) { |
| @@ -527,24 +446,11 @@ export function IconGuide(props: IconProps) { | ||
| 527 | 446 | } |
| 528 | 447 | |
| 529 | 448 | export function IconUsers(props: IconProps) { |
| 530 | - return ( | |
| 531 | - <Svg {...props}> | |
| 532 | - <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" /> | |
| 533 | - <circle cx="9" cy="7" r="4" /> | |
| 534 | - <path d="M22 21v-2a4 4 0 0 0-3-3.87" /> | |
| 535 | - <path d="M16 3.13a4 4 0 0 1 0 7.75" /> | |
| 536 | - </Svg> | |
| 537 | - ); | |
| 449 | + return <PhosphorIcon {...props} src={usersUrl} />; | |
| 538 | 450 | } |
| 539 | 451 | |
| 540 | 452 | export function IconMenu(props: IconProps) { |
| 541 | - return ( | |
| 542 | - <Svg {...props}> | |
| 543 | - <path d="M4 5h16" /> | |
| 544 | - <path d="M4 12h16" /> | |
| 545 | - <path d="M4 19h16" /> | |
| 546 | - </Svg> | |
| 547 | - ); | |
| 453 | + return <PhosphorIcon {...props} src={listUrl} />; | |
| 548 | 454 | } |
| 549 | 455 | |
| 550 | 456 | export function IconDotsVertical(props: IconProps) { |
| @@ -558,29 +464,15 @@ export function IconDotsVertical(props: IconProps) { | ||
| 558 | 464 | } |
| 559 | 465 | |
| 560 | 466 | export function IconPanelLeft(props: IconProps) { |
| 561 | - return ( | |
| 562 | - <Svg {...props}> | |
| 563 | - <rect width="18" height="18" x="3" y="3" rx="2" /> | |
| 564 | - <path d="M9 3v18" /> | |
| 565 | - </Svg> | |
| 566 | - ); | |
| 467 | + return <PhosphorIcon {...props} src={sidebarSimpleUrl} />; | |
| 567 | 468 | } |
| 568 | 469 | |
| 569 | 470 | export function IconBook(props: IconProps) { |
| 570 | - return ( | |
| 571 | - <Svg {...props}> | |
| 572 | - <path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20" /> | |
| 573 | - </Svg> | |
| 574 | - ); | |
| 471 | + return <PhosphorIcon {...props} src={bookOpenUrl} />; | |
| 575 | 472 | } |
| 576 | 473 | |
| 577 | 474 | export function IconEye(props: IconProps) { |
| 578 | - return ( | |
| 579 | - <Svg {...props}> | |
| 580 | - <path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" /> | |
| 581 | - <circle cx="12" cy="12" r="3" /> | |
| 582 | - </Svg> | |
| 583 | - ); | |
| 475 | + return <PhosphorIcon {...props} src={eyeUrl} />; | |
| 584 | 476 | } |
| 585 | 477 | |
| 586 | 478 | export function IconEyeOff(props: IconProps) { |
| @@ -595,55 +487,23 @@ export function IconEyeOff(props: IconProps) { | ||
| 595 | 487 | } |
| 596 | 488 | |
| 597 | 489 | export function IconChart(props: IconProps) { |
| 598 | - return ( | |
| 599 | - <Svg {...props}> | |
| 600 | - <path d="M3 3v16a2 2 0 0 0 2 2h16" /> | |
| 601 | - <path d="M7 16v-5" /> | |
| 602 | - <path d="M12 16v-9" /> | |
| 603 | - <path d="M17 16V8" /> | |
| 604 | - </Svg> | |
| 605 | - ); | |
| 490 | + return <PhosphorIcon {...props} src={chartBarUrl} />; | |
| 606 | 491 | } |
| 607 | 492 | |
| 608 | 493 | export function IconSchool(props: IconProps) { |
| 609 | - return ( | |
| 610 | - <Svg {...props}> | |
| 611 | - <path d="M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z" /> | |
| 612 | - <path d="M22 10v6" /> | |
| 613 | - <path d="M6 12.5V16a6 3 0 0 0 12 0v-3.5" /> | |
| 614 | - </Svg> | |
| 615 | - ); | |
| 494 | + return <PhosphorIcon {...props} src={graduationCapUrl} />; | |
| 616 | 495 | } |
| 617 | 496 | |
| 618 | 497 | export function IconClipboardCheck(props: IconProps) { |
| 619 | - return ( | |
| 620 | - <Svg {...props}> | |
| 621 | - <rect width="8" height="4" x="8" y="2" rx="1" ry="1" /> | |
| 622 | - <path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /> | |
| 623 | - <path d="m9 14 2 2 4-4" /> | |
| 624 | - </Svg> | |
| 625 | - ); | |
| 498 | + return <PhosphorIcon {...props} src={checkCircleUrl} />; | |
| 626 | 499 | } |
| 627 | 500 | |
| 628 | 501 | export function IconReportAnalytics(props: IconProps) { |
| 629 | - return ( | |
| 630 | - <Svg {...props}> | |
| 631 | - <path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" /> | |
| 632 | - <path d="M14 2v4a2 2 0 0 0 2 2h4" /> | |
| 633 | - <path d="M8 18v-1" /> | |
| 634 | - <path d="M12 18v-6" /> | |
| 635 | - <path d="M16 18v-3" /> | |
| 636 | - </Svg> | |
| 637 | - ); | |
| 502 | + return <PhosphorIcon {...props} src={chartLineUpUrl} />; | |
| 638 | 503 | } |
| 639 | 504 | |
| 640 | 505 | export function IconSettings(props: IconProps) { |
| 641 | - return ( | |
| 642 | - <Svg {...props}> | |
| 643 | - <path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /> | |
| 644 | - <circle cx="12" cy="12" r="3" /> | |
| 645 | - </Svg> | |
| 646 | - ); | |
| 506 | + return <PhosphorIcon {...props} src={gearUrl} />; | |
| 647 | 507 | } |
| 648 | 508 | |
| 649 | 509 | export function IconUserCog(props: IconProps) { |
| @@ -686,40 +546,19 @@ export function IconUtensils(props: IconProps) { | ||
| 686 | 546 | } |
| 687 | 547 | |
| 688 | 548 | export function IconSearch(props: IconProps) { |
| 689 | - return ( | |
| 690 | - <Svg {...props}> | |
| 691 | - <circle cx="11" cy="11" r="8" /> | |
| 692 | - <path d="m21 21-4.3-4.3" /> | |
| 693 | - </Svg> | |
| 694 | - ); | |
| 549 | + return <PhosphorIcon {...props} src={magnifyingGlassUrl} />; | |
| 695 | 550 | } |
| 696 | 551 | |
| 697 | 552 | export function IconSparkles(props: IconProps) { |
| 698 | - return ( | |
| 699 | - <Svg {...props}> | |
| 700 | - <path d="M9.9 4.24 12 2l2.1 2.24L17 5l-2.9.76L12 8l-2.1-2.24L7 5z" /> | |
| 701 | - <path d="M18 12.5 19.5 11l1.5 1.5 2 .5-2 .5-1.5 1.5L18 13.5l-2-.5z" /> | |
| 702 | - <path d="M4 15.5 6.5 13 9 15.5l3 .75-3 .75-2.5 2.5L4 17l-3-.75z" /> | |
| 703 | - </Svg> | |
| 704 | - ); | |
| 553 | + return <PhosphorIcon {...props} src={sparkleUrl} />; | |
| 705 | 554 | } |
| 706 | 555 | |
| 707 | 556 | export function IconUploadCloud(props: IconProps) { |
| 708 | - return ( | |
| 709 | - <Svg {...props}> | |
| 710 | - <path d="M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" /> | |
| 711 | - <path d="M12 12v9" /> | |
| 712 | - <path d="m16 16-4-4-4 4" /> | |
| 713 | - </Svg> | |
| 714 | - ); | |
| 557 | + return <PhosphorIcon {...props} src={uploadSimpleUrl} />; | |
| 715 | 558 | } |
| 716 | 559 | |
| 717 | 560 | export function IconFilter(props: IconProps) { |
| 718 | - return ( | |
| 719 | - <Svg {...props}> | |
| 720 | - <polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" /> | |
| 721 | - </Svg> | |
| 722 | - ); | |
| 561 | + return <PhosphorIcon {...props} src={funnelUrl} />; | |
| 723 | 562 | } |
| 724 | 563 | |
| 725 | 564 | export function IconRotateCcw(props: IconProps) { |
| @@ -751,20 +590,9 @@ export function IconRefresh(props: IconProps) { | ||
| 751 | 590 | } |
| 752 | 591 | |
| 753 | 592 | export function IconExternalLink(props: IconProps) { |
| 754 | - return ( | |
| 755 | - <Svg {...props}> | |
| 756 | - <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /> | |
| 757 | - <polyline points="15 3 21 3 21 9" /> | |
| 758 | - <line x1="10" y1="14" x2="21" y2="3" /> | |
| 759 | - </Svg> | |
| 760 | - ); | |
| 593 | + return <PhosphorIcon {...props} src={arrowSquareOutUrl} />; | |
| 761 | 594 | } |
| 762 | 595 | |
| 763 | 596 | export function IconBell(props: IconProps) { |
| 764 | - return ( | |
| 765 | - <Svg {...props}> | |
| 766 | - <path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" /> | |
| 767 | - <path d="M10.3 21a1.94 1.94 0 0 0 3.4 0" /> | |
| 768 | - </Svg> | |
| 769 | - ); | |
| 597 | + return <PhosphorIcon {...props} src={bellUrl} />; | |
| 770 | 598 | } |
src/components/ui/input.tsxmodified+1 -1
| @@ -9,7 +9,7 @@ export function Input(props: InputProps) { | ||
| 9 | 9 | return ( |
| 10 | 10 | <input |
| 11 | 11 | class={cn( |
| 12 | - "flex h-9 w-full rounded-md border border-input bg-background/90 px-3 py-1 text-base shadow-sm transition-all file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground/80 hover:border-ring/45 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", | |
| 12 | + "flex h-9 w-full rounded-md border border-input bg-surface-base px-3 py-1 text-base shadow-sm transition-all file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-text-placeholder hover:border-ring/45 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-1 focus-visible:ring-offset-background aria-invalid:border-destructive aria-invalid:ring-destructive/25 disabled:cursor-not-allowed disabled:bg-surface-tint disabled:text-muted-foreground disabled:opacity-70 md:text-sm", | |
| 13 | 13 | local.class, |
| 14 | 14 | )} |
| 15 | 15 | {...rest} |
src/components/ui/side-panel.tsxmodified+3 -3
| @@ -41,10 +41,10 @@ export function SidePanel( | ||
| 41 | 41 | return ( |
| 42 | 42 | <DialogPrimitive open={props.open} onOpenChange={props.onOpenChange} modal={false} preventScroll> |
| 43 | 43 | <DialogPrimitive.Portal> |
| 44 | - <DialogPrimitive.Overlay class="fixed inset-0 z-50 bg-black/80 transition-opacity duration-200 data-closed:opacity-0 data-expanded:opacity-100" /> | |
| 44 | + <DialogPrimitive.Overlay class="fixed inset-0 z-50 bg-[rgba(13,15,23,0.55)] transition-opacity duration-200 data-closed:opacity-0 data-expanded:opacity-100" /> | |
| 45 | 45 | <DialogPrimitive.Content |
| 46 | 46 | class={cn( |
| 47 | - "fixed inset-y-0 right-0 z-50 flex h-full w-full flex-col border-l border-border bg-background text-foreground shadow-2xl shadow-black/20 outline-hidden", | |
| 47 | + "fixed inset-y-0 right-0 z-50 flex h-full w-full flex-col border-l border-border-line bg-surface-base text-foreground shadow-[0_16px_40px_rgba(0,0,0,0.16)] outline-hidden", | |
| 48 | 48 | // The panel spans the whole display, so it has to keep its own |
| 49 | 49 | // header out from under the status bar and its footer off the |
| 50 | 50 | // gesture bar. Both insets are 0 in a desktop browser. |
| @@ -54,7 +54,7 @@ export function SidePanel( | ||
| 54 | 54 | props.class, |
| 55 | 55 | )} |
| 56 | 56 | > |
| 57 | - <div class="flex shrink-0 items-start justify-between gap-4 border-b border-border px-5 py-4"> | |
| 57 | + <div class="flex shrink-0 items-start justify-between gap-4 border-b border-border-hairline px-5 py-4"> | |
| 58 | 58 | <div class="min-w-0 flex-1 space-y-1"> |
| 59 | 59 | <DialogPrimitive.Title class="truncate text-base font-semibold leading-6 tracking-tight"> |
| 60 | 60 | {props.title} |
src/components/ui/table.tsxmodified+3 -3
| @@ -16,7 +16,7 @@ export function Table(props: ParentProps<ComponentProps<"table">>) { | ||
| 16 | 16 | export function TableHeader(props: ParentProps<ComponentProps<"thead">>) { |
| 17 | 17 | const [local, rest] = splitProps(props, ["class", "children"]); |
| 18 | 18 | return ( |
| 19 | - <thead class={cn("bg-muted/55 [&_tr]:border-b", local.class)} {...rest}> | |
| 19 | + <thead class={cn("bg-surface-overlay [&_tr]:border-b", local.class)} {...rest}> | |
| 20 | 20 | {local.children} |
| 21 | 21 | </thead> |
| 22 | 22 | ); |
| @@ -35,7 +35,7 @@ export function TableRow(props: ParentProps<ComponentProps<"tr">>) { | ||
| 35 | 35 | const [local, rest] = splitProps(props, ["class", "children"]); |
| 36 | 36 | return ( |
| 37 | 37 | <tr |
| 38 | - class={cn("border-b border-border/70 transition-colors hover:bg-muted/65 data-[state=selected]:bg-muted", local.class)} | |
| 38 | + class={cn("border-b border-border-hairline transition-colors hover:bg-surface-overlay data-[state=selected]:bg-surface-tint", local.class)} | |
| 39 | 39 | {...rest} |
| 40 | 40 | > |
| 41 | 41 | {local.children} |
| @@ -48,7 +48,7 @@ export function TableHead(props: ParentProps<ComponentProps<"th">>) { | ||
| 48 | 48 | return ( |
| 49 | 49 | <th |
| 50 | 50 | class={cn( |
| 51 | - "sticky top-0 z-20 h-11 whitespace-nowrap px-3 text-left align-middle text-xs font-medium tracking-normal text-muted-foreground first:pl-4 last:pr-4 has-[[role=checkbox]]:pr-0", | |
| 51 | + "sticky top-0 z-20 h-11 whitespace-nowrap px-3 text-left align-middle text-xs font-medium tracking-normal text-text-subtle first:pl-4 last:pr-4 has-[[role=checkbox]]:pr-0", | |
| 52 | 52 | local.class, |
| 53 | 53 | )} |
| 54 | 54 | {...rest} |
src/components/ui/tabs.tsxmodified+1 -1
| @@ -30,7 +30,7 @@ export function TabsTrigger<T extends ValidComponent = "button">( | ||
| 30 | 30 | return ( |
| 31 | 31 | <TabsPrimitive.Trigger |
| 32 | 32 | class={cn( |
| 33 | - "group inline-flex h-9 shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 text-sm font-medium text-muted-foreground transition-[background-color,border-color,box-shadow,color] duration-200 hover:bg-muted/70 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-selected:border-border data-selected:bg-secondary data-selected:text-secondary-foreground data-selected:shadow-xs", | |
| 33 | + "group inline-flex h-8 shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 text-sm font-medium text-muted-foreground transition-[background-color,border-color,box-shadow,color] duration-200 hover:bg-muted/70 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-selected:border-border data-selected:bg-surface-base data-selected:text-foreground data-selected:shadow-xs", | |
| 34 | 34 | local.class, |
| 35 | 35 | )} |
| 36 | 36 | {...rest} |
src/components/ui/toast.tsxmodified+2 -2
| @@ -24,10 +24,10 @@ function dismissToast(id: number) { | ||
| 24 | 24 | export function Toaster() { |
| 25 | 25 | return ( |
| 26 | 26 | <Portal> |
| 27 | - <div class="pointer-events-none fixed inset-x-3 top-4 z-80 flex flex-col items-end gap-2 sm:inset-x-auto sm:right-5 sm:w-96"> | |
| 27 | + <div class="pointer-events-none fixed inset-x-3 top-4 z-80 flex flex-col items-end gap-2 sm:inset-x-auto sm:right-5 sm:w-[380px]"> | |
| 28 | 28 | <For each={toasts()}> |
| 29 | 29 | {(toast) => ( |
| 30 | - <div class="pointer-events-auto flex w-full items-center gap-3 rounded-lg border border-border bg-background px-3.5 py-2.5 text-foreground shadow-lg"> | |
| 30 | + <div class="pointer-events-auto flex min-h-[65px] w-full items-center gap-3 rounded-lg border border-border-line bg-surface-base px-4 py-3 text-foreground shadow-xl shadow-black/10"> | |
| 31 | 31 | <span class="flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-emerald-500/10 text-emerald-700 dark:text-emerald-300"> |
| 32 | 32 | <IconCheck class="h-3.5 w-3.5" /> |
| 33 | 33 | </span> |
src/components/users/user-table.tsxmodified+7 -4
| @@ -42,7 +42,7 @@ function UserRoleActions(props: { | ||
| 42 | 42 | ))} |
| 43 | 43 | </Select> |
| 44 | 44 | <Show when={!isSelf() && dirty()}> |
| 45 | - <Button type="button" size="sm" class="mt-2 h-10 rounded-md px-3" onClick={(e) => { e.stopPropagation(); setConfirmOpen(true); }}> | |
| 45 | + <Button type="button" size="sm" class="mt-2" onClick={(e) => { e.stopPropagation(); setConfirmOpen(true); }}> | |
| 46 | 46 | <IconCheck /> |
| 47 | 47 | {t("common.update")} |
| 48 | 48 | </Button> |
| @@ -116,10 +116,13 @@ export function UserTable(props: { | ||
| 116 | 116 | { |
| 117 | 117 | id: "actions", |
| 118 | 118 | header: t("common.actions"), |
| 119 | - size: 112, | |
| 120 | - minSize: 112, | |
| 119 | + size: 110, | |
| 120 | + minSize: 110, | |
| 121 | 121 | enableHiding: false, |
| 122 | - meta: { headerClass: "w-28 min-w-28 text-center whitespace-nowrap", cellClass: "w-28 text-center" }, | |
| 122 | + meta: { | |
| 123 | + headerClass: "w-[110px] min-w-[110px] max-w-[110px] text-center whitespace-nowrap", | |
| 124 | + cellClass: "w-[110px] min-w-[110px] max-w-[110px] text-center whitespace-nowrap", | |
| 125 | + }, | |
| 123 | 126 | cell: (cell) => ( |
| 124 | 127 | <TableRowActions |
| 125 | 128 | label={t("common.actions")} |
src/components/whiteboard/whiteboard-canvas.tsxmodified+104 -72
| @@ -16,7 +16,7 @@ const WIDTHS = [2, 6, 14]; | ||
| 16 | 16 | const ZOOM_MIN = 0.25; |
| 17 | 17 | const ZOOM_MAX = 4; |
| 18 | 18 | const ZOOM_STEP = 1.25; |
| 19 | -const OVERLAY_CARD = "absolute z-10 flex gap-1.5 rounded-lg border bg-card/90 p-1.5 shadow-xs backdrop-blur-xs"; | |
| 19 | +const OVERLAY_CARD = "absolute z-10 gap-1.5 rounded-lg border bg-card/90 p-1.5 shadow-xs backdrop-blur-xs"; | |
| 20 | 20 | |
| 21 | 21 | // Imperative handle the room uses to push server-confirmed marks onto the |
| 22 | 22 | // canvas without re-rendering the whole component per stroke. |
| @@ -229,6 +229,88 @@ export function WhiteboardCanvas(props: { | ||
| 229 | 229 | : "border-border bg-background text-muted-foreground hover:bg-accent hover:text-foreground", |
| 230 | 230 | ); |
| 231 | 231 | |
| 232 | + // Shared button groups rendered twice: once inside the mobile wrapping bar, | |
| 233 | + // once inside the three desktop corner islands. Each instance mounts its own | |
| 234 | + // reactive scope over the same signals above, so both stay in sync. | |
| 235 | + const ToolButtons = () => ( | |
| 236 | + <> | |
| 237 | + <button | |
| 238 | + type="button" | |
| 239 | + class={toolClass(activeTool() === "pen")} | |
| 240 | + title={t("draw.pen")} | |
| 241 | + onClick={() => { | |
| 242 | + setErasing(false); | |
| 243 | + setHand(false); | |
| 244 | + }} | |
| 245 | + > | |
| 246 | + <IconEdit class="h-5 w-5" /> | |
| 247 | + <span class="sr-only">{t("draw.pen")}</span> | |
| 248 | + </button> | |
| 249 | + <button | |
| 250 | + type="button" | |
| 251 | + class={toolClass(activeTool() === "erase")} | |
| 252 | + title={t("draw.eraser")} | |
| 253 | + onClick={() => { | |
| 254 | + setErasing(true); | |
| 255 | + setHand(false); | |
| 256 | + }} | |
| 257 | + > | |
| 258 | + <IconEraser class="h-5 w-5" /> | |
| 259 | + <span class="sr-only">{t("draw.eraser")}</span> | |
| 260 | + </button> | |
| 261 | + <button | |
| 262 | + type="button" | |
| 263 | + class={toolClass(activeTool() === "pan")} | |
| 264 | + title={t("draw.pan")} | |
| 265 | + onClick={() => setHand(true)} | |
| 266 | + > | |
| 267 | + <IconMove class="h-5 w-5" /> | |
| 268 | + <span class="sr-only">{t("draw.pan")}</span> | |
| 269 | + </button> | |
| 270 | + </> | |
| 271 | + ); | |
| 272 | + | |
| 273 | + const ColorSwatches = () => ( | |
| 274 | + <For each={COLORS}> | |
| 275 | + {(swatch) => ( | |
| 276 | + <button | |
| 277 | + type="button" | |
| 278 | + title={t("draw.color")} | |
| 279 | + class={cn( | |
| 280 | + "h-9 w-9 sm:h-11 sm:w-11 rounded-lg border-2 transition-transform", | |
| 281 | + color() === swatch && activeTool() === "pen" | |
| 282 | + ? "border-foreground scale-105" | |
| 283 | + : "border-border/60 hover:scale-105", | |
| 284 | + )} | |
| 285 | + style={{ "background-color": swatch }} | |
| 286 | + onClick={() => { | |
| 287 | + setColor(swatch); | |
| 288 | + setErasing(false); | |
| 289 | + setHand(false); | |
| 290 | + }} | |
| 291 | + > | |
| 292 | + <span class="sr-only">{swatch}</span> | |
| 293 | + </button> | |
| 294 | + )} | |
| 295 | + </For> | |
| 296 | + ); | |
| 297 | + | |
| 298 | + const WidthButtons = () => ( | |
| 299 | + <For each={WIDTHS}> | |
| 300 | + {(size) => ( | |
| 301 | + <button | |
| 302 | + type="button" | |
| 303 | + title={t("draw.width")} | |
| 304 | + class={toolClass(width() === size)} | |
| 305 | + onClick={() => setWidth(size)} | |
| 306 | + > | |
| 307 | + <span class="rounded-full bg-current" style={{ width: `${size + 2}px`, height: `${size + 2}px` }} /> | |
| 308 | + <span class="sr-only">{size}</span> | |
| 309 | + </button> | |
| 310 | + )} | |
| 311 | + </For> | |
| 312 | + ); | |
| 313 | + | |
| 232 | 314 | const paperStyle = () => { |
| 233 | 315 | const cell = PAPER_CELL * zoom(); |
| 234 | 316 | const p = pan(); |
| @@ -269,88 +351,38 @@ export function WhiteboardCanvas(props: { | ||
| 269 | 351 | </p> |
| 270 | 352 | </Show> |
| 271 | 353 | |
| 354 | + {/* Mobile: the three corner islands below overlap each other under ~640px | |
| 355 | + (they need ~520px combined), so under sm they collapse into one | |
| 356 | + wrapping bar instead; desktop keeps the original three corners. */} | |
| 357 | + <div class="absolute inset-x-2 top-2 z-10 flex flex-wrap items-center justify-center gap-1.5 rounded-lg border bg-card/90 p-1.5 shadow-xs backdrop-blur-xs sm:hidden"> | |
| 358 | + <div class="flex gap-1.5"> | |
| 359 | + <ToolButtons /> | |
| 360 | + </div> | |
| 361 | + <div class="flex flex-wrap items-center justify-center gap-1.5" role="group" aria-label={t("draw.color")}> | |
| 362 | + <ColorSwatches /> | |
| 363 | + </div> | |
| 364 | + <div class="flex gap-1.5" role="group" aria-label={t("draw.width")}> | |
| 365 | + <WidthButtons /> | |
| 366 | + </div> | |
| 367 | + </div> | |
| 368 | + | |
| 272 | 369 | {/* Top-left island — tools */} |
| 273 | - <div class={cn(OVERLAY_CARD, "left-2 top-2")}> | |
| 274 | - <button | |
| 275 | - type="button" | |
| 276 | - class={toolClass(activeTool() === "pen")} | |
| 277 | - title={t("draw.pen")} | |
| 278 | - onClick={() => { | |
| 279 | - setErasing(false); | |
| 280 | - setHand(false); | |
| 281 | - }} | |
| 282 | - > | |
| 283 | - <IconEdit class="h-5 w-5" /> | |
| 284 | - <span class="sr-only">{t("draw.pen")}</span> | |
| 285 | - </button> | |
| 286 | - <button | |
| 287 | - type="button" | |
| 288 | - class={toolClass(activeTool() === "erase")} | |
| 289 | - title={t("draw.eraser")} | |
| 290 | - onClick={() => { | |
| 291 | - setErasing(true); | |
| 292 | - setHand(false); | |
| 293 | - }} | |
| 294 | - > | |
| 295 | - <IconEraser class="h-5 w-5" /> | |
| 296 | - <span class="sr-only">{t("draw.eraser")}</span> | |
| 297 | - </button> | |
| 298 | - <button | |
| 299 | - type="button" | |
| 300 | - class={toolClass(activeTool() === "pan")} | |
| 301 | - title={t("draw.pan")} | |
| 302 | - onClick={() => setHand(true)} | |
| 303 | - > | |
| 304 | - <IconMove class="h-5 w-5" /> | |
| 305 | - <span class="sr-only">{t("draw.pan")}</span> | |
| 306 | - </button> | |
| 370 | + <div class={cn(OVERLAY_CARD, "left-2 top-2 hidden sm:flex")}> | |
| 371 | + <ToolButtons /> | |
| 307 | 372 | </div> |
| 308 | 373 | |
| 309 | 374 | {/* Top-middle island — colours */} |
| 310 | 375 | <div |
| 311 | - class={cn(OVERLAY_CARD, "left-1/2 top-2 -translate-x-1/2 flex-wrap items-center")} | |
| 376 | + class={cn(OVERLAY_CARD, "left-1/2 top-2 hidden -translate-x-1/2 flex-wrap items-center sm:flex")} | |
| 312 | 377 | role="group" |
| 313 | 378 | aria-label={t("draw.color")} |
| 314 | 379 | > |
| 315 | - <For each={COLORS}> | |
| 316 | - {(swatch) => ( | |
| 317 | - <button | |
| 318 | - type="button" | |
| 319 | - title={t("draw.color")} | |
| 320 | - class={cn( | |
| 321 | - "h-9 w-9 sm:h-11 sm:w-11 rounded-lg border-2 transition-transform", | |
| 322 | - color() === swatch && activeTool() === "pen" | |
| 323 | - ? "border-foreground scale-105" | |
| 324 | - : "border-border/60 hover:scale-105", | |
| 325 | - )} | |
| 326 | - style={{ "background-color": swatch }} | |
| 327 | - onClick={() => { | |
| 328 | - setColor(swatch); | |
| 329 | - setErasing(false); | |
| 330 | - setHand(false); | |
| 331 | - }} | |
| 332 | - > | |
| 333 | - <span class="sr-only">{swatch}</span> | |
| 334 | - </button> | |
| 335 | - )} | |
| 336 | - </For> | |
| 380 | + <ColorSwatches /> | |
| 337 | 381 | </div> |
| 338 | 382 | |
| 339 | 383 | {/* Top-right island — width */} |
| 340 | - <div class={cn(OVERLAY_CARD, "right-2 top-2")} role="group" aria-label={t("draw.width")}> | |
| 341 | - <For each={WIDTHS}> | |
| 342 | - {(size) => ( | |
| 343 | - <button | |
| 344 | - type="button" | |
| 345 | - title={t("draw.width")} | |
| 346 | - class={toolClass(width() === size)} | |
| 347 | - onClick={() => setWidth(size)} | |
| 348 | - > | |
| 349 | - <span class="rounded-full bg-current" style={{ width: `${size + 2}px`, height: `${size + 2}px` }} /> | |
| 350 | - <span class="sr-only">{size}</span> | |
| 351 | - </button> | |
| 352 | - )} | |
| 353 | - </For> | |
| 384 | + <div class={cn(OVERLAY_CARD, "right-2 top-2 hidden sm:flex")} role="group" aria-label={t("draw.width")}> | |
| 385 | + <WidthButtons /> | |
| 354 | 386 | </div> |
| 355 | 387 | |
| 356 | 388 | {/* Bottom-right zoom */} |
src/i18n/messages.tsmodified+10 -4
| @@ -357,6 +357,8 @@ export type MessageKey = | ||
| 357 | 357 | | "auth.login" |
| 358 | 358 | | "auth.register" |
| 359 | 359 | | "auth.username" |
| 360 | + | "auth.school" | |
| 361 | + | "auth.schoolHint" | |
| 360 | 362 | | "auth.password" |
| 361 | 363 | | "auth.noAccount" |
| 362 | 364 | | "auth.hasAccount" |
| @@ -1906,13 +1908,15 @@ const en: Dict = { | ||
| 1906 | 1908 | "auth.login": "Log in", |
| 1907 | 1909 | "auth.register": "Create account", |
| 1908 | 1910 | "auth.username": "Username", |
| 1911 | + "auth.school": "School", | |
| 1912 | + "auth.schoolHint": "2–32 characters", | |
| 1909 | 1913 | "auth.password": "Password", |
| 1910 | 1914 | "auth.noAccount": "New here?", |
| 1911 | 1915 | "auth.hasAccount": "Already registered?", |
| 1912 | 1916 | "auth.confirmPassword": "Confirm password", |
| 1913 | 1917 | "auth.passwordMismatch": "Passwords do not match", |
| 1914 | - "auth.loginTitle": "Welcome back", | |
| 1915 | - "auth.loginSubtitle": "Sign in to continue to your workspace.", | |
| 1918 | + "auth.loginTitle": "Sign in to your account", | |
| 1919 | + "auth.loginSubtitle": "Sign in to continue with your school workspace.", | |
| 1916 | 1920 | "auth.registerTitle": "Join Hezarfen", |
| 1917 | 1921 | "auth.registerSubtitle": "New accounts start as student. Teachers and admins are assigned later.", |
| 1918 | 1922 | "auth.usernameHint": "3–32 characters", |
| @@ -3461,13 +3465,15 @@ const tr: Dict = { | ||
| 3461 | 3465 | "auth.login": "Giriş yap", |
| 3462 | 3466 | "auth.register": "Hesap oluştur", |
| 3463 | 3467 | "auth.username": "Kullanıcı adı", |
| 3468 | + "auth.school": "Okul", | |
| 3469 | + "auth.schoolHint": "2–32 karakter", | |
| 3464 | 3470 | "auth.password": "Şifre", |
| 3465 | 3471 | "auth.noAccount": "Yeni misin?", |
| 3466 | 3472 | "auth.hasAccount": "Zaten kayıtlı mısın?", |
| 3467 | 3473 | "auth.confirmPassword": "Şifreyi onayla", |
| 3468 | 3474 | "auth.passwordMismatch": "Şifreler eşleşmiyor", |
| 3469 | - "auth.loginTitle": "Tekrar hoş geldin", | |
| 3470 | - "auth.loginSubtitle": "Çalışma alanına devam etmek için giriş yap.", | |
| 3475 | + "auth.loginTitle": "Hesabına giriş yap", | |
| 3476 | + "auth.loginSubtitle": "Okul çalışma alanına devam etmek için giriş yap.", | |
| 3471 | 3477 | "auth.registerTitle": "Hezarfen’e katıl", |
| 3472 | 3478 | "auth.registerSubtitle": "Yeni hesaplar öğrenci olarak başlar. Öğretmen ve admin rolleri sonradan verilir.", |
| 3473 | 3479 | "auth.usernameHint": "3–32 karakter", |
src/index.cssmodified+79 -37
| @@ -54,6 +54,24 @@ | ||
| 54 | 54 | --color-sidebar: hsl(var(--sidebar)); |
| 55 | 55 | --color-sidebar-foreground: hsl(var(--sidebar-foreground)); |
| 56 | 56 | |
| 57 | + /* Hezarfen Figma semantic aliases. Keep page code semantic while matching | |
| 58 | + the shared design vocabulary across light and dark modes. */ | |
| 59 | + --color-brand: hsl(var(--brand)); | |
| 60 | + --color-brand-accent: hsl(var(--brand-accent)); | |
| 61 | + --color-brand-hover: hsl(var(--brand-hover)); | |
| 62 | + --color-brand-ink: hsl(var(--brand-ink)); | |
| 63 | + --color-brand-wash: hsl(var(--brand-wash)); | |
| 64 | + --color-surface-base: hsl(var(--surface-base)); | |
| 65 | + --color-surface-overlay: hsl(var(--surface-overlay)); | |
| 66 | + --color-surface-tint: hsl(var(--surface-tint)); | |
| 67 | + --color-surface-fill: hsl(var(--surface-fill)); | |
| 68 | + --color-text-strong: hsl(var(--text-strong)); | |
| 69 | + --color-text-default: hsl(var(--text-default)); | |
| 70 | + --color-text-subtle: hsl(var(--text-subtle)); | |
| 71 | + --color-text-placeholder: hsl(var(--text-placeholder)); | |
| 72 | + --color-border-line: hsl(var(--border-line)); | |
| 73 | + --color-border-hairline: hsl(var(--border-hairline)); | |
| 74 | + | |
| 57 | 75 | /* bdash radius scale: base 0.5rem, sm=r-4px, md=r-2px, lg=r, xl=r+4px */ |
| 58 | 76 | --radius-3xl: calc(var(--radius) + 12px); |
| 59 | 77 | --radius-2xl: calc(var(--radius) + 8px); |
| @@ -125,25 +143,24 @@ | ||
| 125 | 143 | @apply border border-border/70 bg-transparent text-muted-foreground transition-colors hover:border-border hover:bg-muted/60 hover:text-foreground; |
| 126 | 144 | } |
| 127 | 145 | |
| 128 | -/* AI action button: matches the app logo's orange instead of the theme's | |
| 129 | - primary color, so it reads as a distinct brand accent in the top bar. */ | |
| 146 | +/* AI action button uses the landing-page brand blue. */ | |
| 130 | 147 | @utility topbar-ai-control { |
| 131 | - @apply border border-orange-500/20 bg-orange-500/10 text-orange-500 transition-colors hover:bg-orange-500/16 hover:text-orange-500; | |
| 148 | + @apply border border-brand/20 bg-brand/10 text-brand transition-colors hover:bg-brand/16 hover:text-brand; | |
| 132 | 149 | } |
| 133 | 150 | |
| 134 | 151 | @utility data-shell { |
| 135 | - @apply rounded-lg border border-border bg-card shadow-sm; | |
| 152 | + @apply rounded-xl border border-border-line bg-surface-base; | |
| 136 | 153 | } |
| 137 | 154 | |
| 138 | 155 | @utility data-table-wrap { |
| 139 | - @apply isolate max-h-[65vh] overflow-auto rounded-lg border border-border bg-card; | |
| 156 | + @apply isolate max-h-[65vh] overflow-auto rounded-xl border border-border-line bg-surface-base; | |
| 140 | 157 | } |
| 141 | 158 | |
| 142 | 159 | @utility data-table { |
| 143 | 160 | @apply w-full caption-bottom text-sm; |
| 144 | 161 | |
| 145 | 162 | & thead { |
| 146 | - @apply sticky top-0 z-20 border-b border-border/80 text-muted-foreground; | |
| 163 | + @apply sticky top-0 z-20 border-b border-border-hairline text-text-subtle; | |
| 147 | 164 | background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card))); |
| 148 | 165 | } |
| 149 | 166 | |
| @@ -152,7 +169,7 @@ | ||
| 152 | 169 | * text-right/center utility on TableHead and force every header left. The |
| 153 | 170 | * TableHead base class provides the left default; alignment stays utility-driven. |
| 154 | 171 | * Title Case (no uppercase transform), light weight, muted. */ |
| 155 | - @apply h-11 overflow-hidden text-ellipsis whitespace-nowrap px-3 text-xs font-medium tracking-normal text-muted-foreground first:pl-4 last:pr-4; | |
| 172 | + @apply h-11 overflow-hidden text-ellipsis whitespace-nowrap px-3 text-xs font-medium tracking-normal text-text-subtle first:pl-4 last:pr-4; | |
| 156 | 173 | background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card))); |
| 157 | 174 | } |
| 158 | 175 | |
| @@ -162,7 +179,7 @@ | ||
| 162 | 179 | } |
| 163 | 180 | |
| 164 | 181 | & tbody tr { |
| 165 | - @apply border-b border-border/60 transition-colors data-[state=selected]:bg-muted; | |
| 182 | + @apply border-b border-border-hairline transition-colors data-[state=selected]:bg-muted; | |
| 166 | 183 | background-color: hsl(var(--card)); |
| 167 | 184 | } |
| 168 | 185 | |
| @@ -341,28 +358,43 @@ | ||
| 341 | 358 | color-scheme: light; |
| 342 | 359 | |
| 343 | 360 | /* --accent-light / --accent-light-fg are set inline by preferences-context |
| 344 | - when the user picks an accent color; the fallback here is the neutral | |
| 345 | - default for everyone else. */ | |
| 346 | - --ui-accent: var(--accent-light, 0 0% 13%); | |
| 347 | - --background: 0 0% 98%; | |
| 348 | - --foreground: 0 0% 8%; | |
| 361 | + when the user picks an accent color. Figma brand blue is only the | |
| 362 | + default; a saved user palette continues to win. */ | |
| 363 | + --brand: 191.94 100% 42.35%; | |
| 364 | + --brand-accent: 191.94 100% 42.35%; | |
| 365 | + --brand-hover: 192.06 100% 37.06%; | |
| 366 | + --brand-ink: 192.46 94.2% 27.06%; | |
| 367 | + --brand-wash: 193.33 75% 95.29%; | |
| 368 | + --surface-base: 0 0% 100%; | |
| 369 | + --surface-overlay: 0 0% 97%; | |
| 370 | + --surface-tint: 0 0% 96%; | |
| 371 | + --surface-fill: 0 0% 90%; | |
| 372 | + --text-strong: 0 0% 4%; | |
| 373 | + --text-default: 240 6% 10%; | |
| 374 | + --text-subtle: 0 0% 45%; | |
| 375 | + --text-placeholder: 0 0% 63%; | |
| 376 | + --border-line: 0 0% 4% / 0.1; | |
| 377 | + --border-hairline: 0 0% 91%; | |
| 378 | + --ui-accent: var(--accent-light, var(--brand)); | |
| 379 | + --background: var(--surface-overlay); | |
| 380 | + --foreground: var(--text-default); | |
| 349 | 381 | --card: 0 0% 100%; |
| 350 | 382 | --card-foreground: 0 0% 8%; |
| 351 | 383 | --popover: 0 0% 100%; |
| 352 | 384 | --popover-foreground: 0 0% 8%; |
| 353 | 385 | --primary: var(--ui-accent); |
| 354 | 386 | --primary-foreground: var(--accent-light-fg, 0 0% 98%); |
| 355 | - --secondary: 0 0% 94%; | |
| 387 | + --secondary: var(--surface-fill); | |
| 356 | 388 | --secondary-foreground: 0 0% 16%; |
| 357 | - --muted: 0 0% 96%; | |
| 358 | - --muted-foreground: 0 0% 40%; | |
| 359 | - --accent: 0 0% 92%; | |
| 389 | + --muted: var(--surface-tint); | |
| 390 | + --muted-foreground: var(--text-subtle); | |
| 391 | + --accent: var(--surface-fill); | |
| 360 | 392 | --accent-foreground: 0 0% 13%; |
| 361 | 393 | --destructive: 356 82% 51%; |
| 362 | 394 | --destructive-foreground: 0 0% 100%; |
| 363 | - --border: 0 0% 89%; | |
| 364 | - --input: 0 0% 82%; | |
| 365 | - --ring: var(--accent-light, 0 0% 45%); | |
| 395 | + --border: var(--border-hairline); | |
| 396 | + --input: var(--border-line); | |
| 397 | + --ring: var(--accent-light, var(--brand)); | |
| 366 | 398 | --radius: 0.5rem; |
| 367 | 399 | --success: 137 63% 39%; |
| 368 | 400 | --warning: 38 92% 50%; |
| @@ -377,31 +409,41 @@ | ||
| 377 | 409 | a separate, lighter-lightness variant of the same picked hue so it stays |
| 378 | 410 | legible against this theme's near-black background. */ |
| 379 | 411 | color-scheme: dark; |
| 380 | - --ui-accent: var(--accent-dark, 0 0% 92%); | |
| 381 | - --background: 0 0% 4%; | |
| 382 | - --foreground: 0 0% 98%; | |
| 383 | - --card: 0 0% 8%; | |
| 384 | - --card-foreground: 0 0% 98%; | |
| 385 | - --popover: 0 0% 8%; | |
| 386 | - --popover-foreground: 0 0% 98%; | |
| 412 | + --surface-base: 0 0% 6%; | |
| 413 | + --surface-overlay: 0 0% 6%; | |
| 414 | + --surface-tint: 0 0% 15%; | |
| 415 | + --surface-fill: 0 0% 15%; | |
| 416 | + --text-strong: 0 0% 98%; | |
| 417 | + --text-default: 0 0% 96%; | |
| 418 | + --text-subtle: 0 0% 63%; | |
| 419 | + --text-placeholder: 0 0% 63%; | |
| 420 | + --border-line: 0 0% 20%; | |
| 421 | + --border-hairline: 0 0% 20%; | |
| 422 | + --ui-accent: var(--accent-dark, var(--brand)); | |
| 423 | + --background: var(--surface-overlay); | |
| 424 | + --foreground: var(--text-strong); | |
| 425 | + --card: var(--surface-base); | |
| 426 | + --card-foreground: var(--text-strong); | |
| 427 | + --popover: var(--surface-base); | |
| 428 | + --popover-foreground: var(--text-strong); | |
| 387 | 429 | --primary: var(--ui-accent); |
| 388 | - --primary-foreground: var(--accent-dark-fg, 0 0% 6%); | |
| 389 | - --secondary: 0 0% 16%; | |
| 430 | + --primary-foreground: var(--accent-dark-fg, 0 0% 100%); | |
| 431 | + --secondary: var(--surface-fill); | |
| 390 | 432 | --secondary-foreground: 0 0% 98%; |
| 391 | - --muted: 0 0% 13%; | |
| 392 | - --muted-foreground: 0 0% 62%; | |
| 393 | - --accent: 0 0% 18%; | |
| 433 | + --muted: var(--surface-tint); | |
| 434 | + --muted-foreground: var(--text-subtle); | |
| 435 | + --accent: var(--surface-fill); | |
| 394 | 436 | --accent-foreground: 0 0% 98%; |
| 395 | 437 | --destructive: 357 94% 64%; |
| 396 | 438 | --destructive-foreground: 0 0% 100%; |
| 397 | - --border: 0 0% 17%; | |
| 398 | - --input: 0 0% 24%; | |
| 399 | - --ring: var(--accent-dark, 0 0% 45%); | |
| 439 | + --border: var(--border-hairline); | |
| 440 | + --input: var(--border-line); | |
| 441 | + --ring: var(--accent-dark, var(--brand)); | |
| 400 | 442 | --success: 137 58% 58%; |
| 401 | 443 | --warning: 38 92% 54%; |
| 402 | 444 | --info: 219 98% 60%; |
| 403 | - --surface-elevated: 0 0% 10%; | |
| 404 | - --sidebar: 0 0% 4%; | |
| 445 | + --surface-elevated: var(--surface-fill); | |
| 446 | + --sidebar: var(--surface-base); | |
| 405 | 447 | --sidebar-foreground: 0 0% 98%; |
| 406 | 448 | } |
| 407 | 449 |
src/lib/payments.tsmodified+3 -3
| @@ -13,9 +13,9 @@ export type StatementStatus = { | ||
| 13 | 13 | // receivables-aging colors: green current/paid, amber partial, red overdue. |
| 14 | 14 | export function statementStatus(entry: StatementEntry): StatementStatus { |
| 15 | 15 | if (entry.reversed) return { key: "payments.statusCancelled", class: "border-border bg-muted/40 text-muted-foreground", dot: "bg-muted-foreground/50" }; |
| 16 | - if (entry.outstanding_minor <= 0) return { key: "payments.paid", class: "border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300", dot: "bg-emerald-500" }; | |
| 17 | - if (entry.overdue) return { key: "payments.overdue", class: "border-red-500/40 bg-red-500/10 text-red-700 dark:text-red-300", dot: "bg-red-500" }; | |
| 18 | - if (entry.credited_minor > 0) return { key: "payments.statusPartial", class: "border-amber-500/40 bg-amber-500/10 text-amber-800 dark:text-amber-200", dot: "bg-amber-500" }; | |
| 16 | + if (entry.outstanding_minor <= 0) return { key: "payments.paid", class: "border-success/50 bg-success/10 text-success", dot: "bg-success" }; | |
| 17 | + if (entry.overdue) return { key: "payments.overdue", class: "border-destructive/50 bg-destructive/10 text-destructive", dot: "bg-destructive" }; | |
| 18 | + if (entry.credited_minor > 0) return { key: "payments.statusPartial", class: "border-warning/50 bg-warning/10 text-warning", dot: "bg-warning" }; | |
| 19 | 19 | return { key: "payments.statusPending", class: "border-border bg-background/50 text-muted-foreground", dot: "bg-muted-foreground/40" }; |
| 20 | 20 | } |
| 21 | 21 |
src/pages/admin-user-detail-page.tsxmodified+1 -1
| @@ -102,7 +102,7 @@ function AdminUserDetailContent() { | ||
| 102 | 102 | <DetailField label={t("profile.birthDate")} value={current().birth_date || "—"} /> |
| 103 | 103 | <DetailField label={t("admin.id")} value={current().id} mono /> |
| 104 | 104 | <div class="space-y-1.5"> |
| 105 | - <p class="text-xs font-medium text-muted-foreground">{t("admin.role")}</p> | |
| 105 | + <p class="text-xs font-medium text-text-subtle">{t("admin.role")}</p> | |
| 106 | 106 | <div class="flex gap-2"> |
| 107 | 107 | <Select |
| 108 | 108 | class="h-9" |
src/pages/admin-users-page.tsxmodified+3 -5
| @@ -50,9 +50,7 @@ function AdminUsersContent() { | ||
| 50 | 50 | |
| 51 | 51 | return ( |
| 52 | 52 | <div class="space-y-6"> |
| 53 | - <div class="space-y-2"> | |
| 54 | - <PageHeader eyebrow={t("nav.users")} title={t("admin.title")} description={t("admin.subtitle")} /> | |
| 55 | - </div> | |
| 53 | + <PageHeader eyebrow={t("nav.users")} title={t("admin.title")} description={t("admin.subtitle")} /> | |
| 56 | 54 | |
| 57 | 55 | <Show when={flash()}> |
| 58 | 56 | <Alert variant="success">{flash()}</Alert> |
| @@ -63,7 +61,7 @@ function AdminUsersContent() { | ||
| 63 | 61 | <For each={ROLES}>{(role) => <Metric role={role} label={t(`role.${role}` as MessageKey)} value={roleCount(role)} />}</For> |
| 64 | 62 | </section> |
| 65 | 63 | |
| 66 | - <div class="data-shell space-y-4 border-sky-500/15 bg-sky-500/2.5 p-4"> | |
| 64 | + <div class="data-shell space-y-4 p-4"> | |
| 67 | 65 | <Suspense fallback={<DataTableSkeleton columns={6} rows={8} />}> |
| 68 | 66 | <Show when={list()}> |
| 69 | 67 | <UserTable |
| @@ -92,7 +90,7 @@ function AdminUsersContent() { | ||
| 92 | 90 | function Metric(props: { role: Role; label: string; value: number }) { |
| 93 | 91 | return ( |
| 94 | 92 | <article class="data-shell p-4"> |
| 95 | - <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{props.label}</p> | |
| 93 | + <p class="text-xs font-medium text-text-subtle">{props.label}</p> | |
| 96 | 94 | <p class="mono mt-2 text-2xl font-semibold tabular-nums">{props.value}</p> |
| 97 | 95 | </article> |
| 98 | 96 | ); |
src/pages/bank-question-detail-page.tsxmodified+6 -6
| @@ -88,7 +88,7 @@ function BankQuestionDetailContent() { | ||
| 88 | 88 | } |
| 89 | 89 | > |
| 90 | 90 | {(current) => ( |
| 91 | - <div class="space-y-5"> | |
| 91 | + <div class="mx-auto w-full max-w-[1100px] space-y-6"> | |
| 92 | 92 | <Show when={error()}> |
| 93 | 93 | <Alert variant="destructive">{error()}</Alert> |
| 94 | 94 | </Show> |
| @@ -105,11 +105,11 @@ function BankQuestionDetailContent() { | ||
| 105 | 105 | </Button> |
| 106 | 106 | </Link> |
| 107 | 107 | <Show when={canEdit()}> |
| 108 | - <Button variant="outline" size="sm" onClick={() => setEditing(true)}> | |
| 108 | + <Button variant="outline" size="sm" class="rounded-lg" onClick={() => setEditing(true)}> | |
| 109 | 109 | <IconEdit class="h-4 w-4" /> |
| 110 | 110 | {t("common.edit")} |
| 111 | 111 | </Button> |
| 112 | - <Button variant="destructive" size="sm" onClick={() => setDeleteOpen(true)}> | |
| 112 | + <Button variant="destructive" size="sm" class="rounded-lg" onClick={() => setDeleteOpen(true)}> | |
| 113 | 113 | <IconTrash class="h-4 w-4" /> |
| 114 | 114 | {t("common.delete")} |
| 115 | 115 | </Button> |
| @@ -135,7 +135,7 @@ function BankQuestionDetailContent() { | ||
| 135 | 135 | <img |
| 136 | 136 | src={`/api/bank-questions/${current().id}/image`} |
| 137 | 137 | alt={t("questions.image")} |
| 138 | - class="max-h-80 rounded-lg border object-contain" | |
| 138 | + class="max-h-80 rounded-lg border border-border-line bg-surface-overlay object-contain" | |
| 139 | 139 | /> |
| 140 | 140 | <Show when={canEdit()}> |
| 141 | 141 | <Button |
| @@ -154,10 +154,10 @@ function BankQuestionDetailContent() { | ||
| 154 | 154 | |
| 155 | 155 | <Show when={current().choices?.length}> |
| 156 | 156 | <div class="space-y-2"> |
| 157 | - <p class="text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground">{t("questions.correct")}</p> | |
| 157 | + <p class="text-xs font-medium text-text-subtle">{t("questions.correct")}</p> | |
| 158 | 158 | <For each={current().choices ?? []}> |
| 159 | 159 | {(choice, index) => ( |
| 160 | - <div class="flex items-center gap-3 rounded-lg border bg-card px-3 py-2.5"> | |
| 160 | + <div class="flex items-center gap-3 rounded-md border border-border-line bg-surface-overlay px-3 py-2.5"> | |
| 161 | 161 | <Badge variant={choice.id === current().correct ? "default" : "outline"}>{index() + 1}</Badge> |
| 162 | 162 | <span class="min-w-0 flex-1">{choice.text}</span> |
| 163 | 163 | <Show when={current().choice_images?.[index()]}> |
src/pages/classes-page.tsxmodified+5 -2
| @@ -75,7 +75,10 @@ function ClassesContent() { | ||
| 75 | 75 | { |
| 76 | 76 | id: "actions", |
| 77 | 77 | header: t("common.actions"), |
| 78 | - meta: { headerClass: "w-14 text-center", cellClass: "px-1 text-center" }, | |
| 78 | + meta: { | |
| 79 | + headerClass: "w-[110px] min-w-[110px] max-w-[110px] text-center whitespace-nowrap", | |
| 80 | + cellClass: "w-[110px] min-w-[110px] max-w-[110px] px-2 text-center whitespace-nowrap", | |
| 81 | + }, | |
| 79 | 82 | cell: (cell) => ( |
| 80 | 83 | <Show when={canManage()}> |
| 81 | 84 | <TableRowActions |
| @@ -131,7 +134,7 @@ function ClassesContent() { | ||
| 131 | 134 | <UserSearchSelect id="class-teacher" label={t("classGroups.homeroomTeacher")} value={teacherId()} onChange={setTeacherId} placeholder={t("classGroups.selectTeacher")} role="teacher" /> |
| 132 | 135 | </div> |
| 133 | 136 | <Show when={error()}><Alert variant="destructive">{error()}</Alert></Show> |
| 134 | - <div class="flex gap-2 border-t pt-4"><Button type="submit" disabled={pending()}>{t("common.create")}</Button><Button type="button" variant="outline" onClick={() => setShowForm(false)}>{t("common.cancel")}</Button></div> | |
| 137 | + <div class="flex gap-2 border-t border-border-hairline pt-4"><Button type="submit" disabled={pending()}>{t("common.create")}</Button><Button type="button" variant="outline" onClick={() => setShowForm(false)}>{t("common.cancel")}</Button></div> | |
| 135 | 138 | </form> |
| 136 | 139 | </SidePanel> |
| 137 | 140 |
src/pages/course-detail-page.tsxmodified+31 -31
| @@ -231,7 +231,7 @@ function CourseDetailContent() { | ||
| 231 | 231 | <Badge variant="outline" class="rounded-full capitalize"> |
| 232 | 232 | {examKindLabel(String(cell.row.original.kind), t)} |
| 233 | 233 | <Show when={examWeight(cell.row.original, settings()?.exam_kinds)}> |
| 234 | - {(weight) => <span class="ml-1 text-muted-foreground">({t("courses.weight")}: {weight()})</span>} | |
| 234 | + {(weight) => <span class="ml-1 text-text-subtle">({t("courses.weight")}: {weight()})</span>} | |
| 235 | 235 | </Show> |
| 236 | 236 | </Badge> |
| 237 | 237 | ), |
| @@ -302,7 +302,7 @@ function CourseDetailContent() { | ||
| 302 | 302 | <PageHeader |
| 303 | 303 | title={c().title} |
| 304 | 304 | description={c().description || "—"} |
| 305 | - class="border-border/70" | |
| 305 | + class="border-border-line" | |
| 306 | 306 | actions={ |
| 307 | 307 | <Show when={canManage()}> |
| 308 | 308 | <TableRowActions |
| @@ -327,41 +327,41 @@ function CourseDetailContent() { | ||
| 327 | 327 | } |
| 328 | 328 | /> |
| 329 | 329 | <div class="grid gap-2 sm:grid-cols-2 xl:grid-cols-4"> |
| 330 | - <div class="flex min-w-0 items-center gap-3 rounded-lg border border-border/70 bg-card p-3"> | |
| 331 | - <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-muted text-muted-foreground"> | |
| 330 | + <div class="flex min-w-0 items-center gap-3 rounded-xl border border-border-line bg-surface-base p-3"> | |
| 331 | + <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-surface-tint text-text-subtle"> | |
| 332 | 332 | <IconBook class="h-4 w-4" /> |
| 333 | 333 | </span> |
| 334 | 334 | <div class="min-w-0"> |
| 335 | - <p class="text-xs font-medium text-muted-foreground">{t("courses.kind")}</p> | |
| 336 | - <p class="truncate text-sm font-semibold">{courseKindLabel(c().kind)}</p> | |
| 335 | + <p class="text-xs font-medium text-text-subtle">{t("courses.kind")}</p> | |
| 336 | + <p class="truncate text-sm font-semibold text-text-default">{courseKindLabel(c().kind)}</p> | |
| 337 | 337 | </div> |
| 338 | 338 | </div> |
| 339 | - <div class="flex min-w-0 items-center gap-3 rounded-lg border border-border/70 bg-card p-3"> | |
| 340 | - <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-muted text-muted-foreground"> | |
| 339 | + <div class="flex min-w-0 items-center gap-3 rounded-xl border border-border-line bg-surface-base p-3"> | |
| 340 | + <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-surface-tint text-text-subtle"> | |
| 341 | 341 | <IconCalendarDays class="h-4 w-4" /> |
| 342 | 342 | </span> |
| 343 | 343 | <div class="min-w-0"> |
| 344 | - <p class="text-xs font-medium text-muted-foreground">{t("terms.term")}</p> | |
| 345 | - <p class="truncate text-sm font-semibold">{terms()?.find((term) => term.id === c().term)?.name ?? t("terms.unassigned")}</p> | |
| 344 | + <p class="text-xs font-medium text-text-subtle">{t("terms.term")}</p> | |
| 345 | + <p class="truncate text-sm font-semibold text-text-default">{terms()?.find((term) => term.id === c().term)?.name ?? t("terms.unassigned")}</p> | |
| 346 | 346 | </div> |
| 347 | 347 | </div> |
| 348 | - <div class="flex min-w-0 items-center gap-3 rounded-lg border border-border/70 bg-card p-3"> | |
| 349 | - <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-muted text-muted-foreground"> | |
| 348 | + <div class="flex min-w-0 items-center gap-3 rounded-xl border border-border-line bg-surface-base p-3"> | |
| 349 | + <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-surface-tint text-text-subtle"> | |
| 350 | 350 | <IconUsers class="h-4 w-4" /> |
| 351 | 351 | </span> |
| 352 | 352 | <div class="min-w-0"> |
| 353 | - <p class="text-xs font-medium text-muted-foreground">{t("courses.capacity")}</p> | |
| 354 | - <p class="mono truncate text-sm font-semibold">{c().capacity == null ? "—" : hasCourseManagementRights() ? `${rosterCount()} / ${c().capacity}` : c().capacity}</p> | |
| 353 | + <p class="text-xs font-medium text-text-subtle">{t("courses.capacity")}</p> | |
| 354 | + <p class="mono truncate text-sm font-semibold text-text-default">{c().capacity == null ? "—" : hasCourseManagementRights() ? `${rosterCount()} / ${c().capacity}` : c().capacity}</p> | |
| 355 | 355 | </div> |
| 356 | 356 | </div> |
| 357 | - <div class="flex min-w-0 items-center gap-3 rounded-lg border border-border/70 bg-card p-3"> | |
| 358 | - <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-muted text-muted-foreground"> | |
| 357 | + <div class="flex min-w-0 items-center gap-3 rounded-xl border border-border-line bg-surface-base p-3"> | |
| 358 | + <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-surface-tint text-text-subtle"> | |
| 359 | 359 | <IconExam class="h-4 w-4" /> |
| 360 | 360 | </span> |
| 361 | 361 | <div class="min-w-0"> |
| 362 | - <p class="text-xs font-medium text-muted-foreground">{t("courses.nextExam")}</p> | |
| 363 | - <Show when={nextExam()} fallback={<p class="truncate text-sm font-semibold">{t("courses.noUpcoming")}</p>}> | |
| 364 | - {(exam) => <ExamLink examId={exam().id} class="block truncate text-sm font-semibold hover:text-primary hover:underline">{exam().title}</ExamLink>} | |
| 362 | + <p class="text-xs font-medium text-text-subtle">{t("courses.nextExam")}</p> | |
| 363 | + <Show when={nextExam()} fallback={<p class="truncate text-sm font-semibold text-text-default">{t("courses.noUpcoming")}</p>}> | |
| 364 | + {(exam) => <ExamLink examId={exam().id} class="block truncate text-sm font-semibold text-text-default hover:text-primary hover:underline">{exam().title}</ExamLink>} | |
| 365 | 365 | </Show> |
| 366 | 366 | </div> |
| 367 | 367 | </div> |
| @@ -422,7 +422,7 @@ function CourseDetailContent() { | ||
| 422 | 422 | }, t("common.saved")); |
| 423 | 423 | }} |
| 424 | 424 | > |
| 425 | - <div class="space-y-3 rounded-lg border border-border/60 bg-muted/20 p-4"> | |
| 425 | + <div class="space-y-3 rounded-xl border border-border-line bg-surface-tint p-4"> | |
| 426 | 426 | <div class="space-y-1.5"> |
| 427 | 427 | <Label for="edit-course-title">{t("form.title")}</Label> |
| 428 | 428 | <Input |
| @@ -444,7 +444,7 @@ function CourseDetailContent() { | ||
| 444 | 444 | /> |
| 445 | 445 | </div> |
| 446 | 446 | </div> |
| 447 | - <div class="space-y-3 rounded-lg border border-border/60 bg-muted/20 p-4"> | |
| 447 | + <div class="space-y-3 rounded-xl border border-border-line bg-surface-tint p-4"> | |
| 448 | 448 | <div class="space-y-1.5"> |
| 449 | 449 | <Label for="edit-course-kind">{t("courses.kind")}</Label> |
| 450 | 450 | <Select id="edit-course-kind" value={kind()} onChange={(e) => setKind(e.currentTarget.value as CourseKind)}> |
| @@ -463,7 +463,7 @@ function CourseDetailContent() { | ||
| 463 | 463 | <Input id="edit-course-capacity" type="number" min={1} value={capacity()} placeholder={t("courses.capacityOptional")} onInput={(e) => setCapacity(e.currentTarget.value)} /> |
| 464 | 464 | </div> |
| 465 | 465 | </div> |
| 466 | - <div class="sticky bottom-0 -mx-5 flex flex-wrap gap-2 border-t border-border bg-background px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6"> | |
| 466 | + <div class="sticky bottom-0 -mx-5 flex flex-wrap gap-2 border-t border-border-line bg-surface-base px-5 pb-6 pt-4 sm:-mx-6 sm:px-6 sm:pb-6"> | |
| 467 | 467 | <Button type="submit" class="flex-1 rounded-xl sm:flex-none" disabled={pending()}> |
| 468 | 468 | {t("common.update")} |
| 469 | 469 | </Button> |
| @@ -487,14 +487,14 @@ function CourseDetailContent() { | ||
| 487 | 487 | description={createdCourseExam() ? t("exams.step2Questions") : c().title} |
| 488 | 488 | size={examCreateStep() === "questions" ? "wide" : "default"} |
| 489 | 489 | > |
| 490 | - <div class="mb-4 flex rounded-lg border border-border/60 bg-muted/30 p-1"> | |
| 490 | + <div class="mb-4 flex rounded-xl border border-border-line bg-surface-tint p-1"> | |
| 491 | 491 | <button |
| 492 | 492 | type="button" |
| 493 | 493 | class={cn( |
| 494 | - "rounded-xl px-3 py-2 text-xs font-semibold transition-colors", | |
| 494 | + "rounded-lg px-3 py-2 text-xs font-semibold transition-colors", | |
| 495 | 495 | examCreateStep() === "details" |
| 496 | 496 | ? "bg-primary text-primary-foreground shadow-2xs" |
| 497 | - : "text-muted-foreground hover:bg-muted/50", | |
| 497 | + : "text-text-subtle hover:bg-surface-fill", | |
| 498 | 498 | )} |
| 499 | 499 | onClick={() => setExamCreateStep("details")} |
| 500 | 500 | > |
| @@ -504,12 +504,12 @@ function CourseDetailContent() { | ||
| 504 | 504 | type="button" |
| 505 | 505 | disabled={!createdCourseExam()} |
| 506 | 506 | class={cn( |
| 507 | - "rounded-xl px-3 py-2 text-xs font-semibold transition-colors", | |
| 507 | + "rounded-lg px-3 py-2 text-xs font-semibold transition-colors", | |
| 508 | 508 | examCreateStep() === "questions" |
| 509 | 509 | ? "bg-primary text-primary-foreground shadow-2xs" |
| 510 | 510 | : createdCourseExam() |
| 511 | - ? "text-muted-foreground hover:bg-muted/50" | |
| 512 | - : "opacity-40 cursor-not-allowed text-muted-foreground", | |
| 511 | + ? "text-text-subtle hover:bg-surface-fill" | |
| 512 | + : "opacity-40 cursor-not-allowed text-text-subtle", | |
| 513 | 513 | )} |
| 514 | 514 | onClick={() => createdCourseExam() && setExamCreateStep("questions")} |
| 515 | 515 | > |
| @@ -598,11 +598,11 @@ function CourseDetailContent() { | ||
| 598 | 598 | <Alert variant="success">{flash()}</Alert> |
| 599 | 599 | </Show> |
| 600 | 600 | {error() && ( |
| 601 | - <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p> | |
| 601 | + <p class="rounded-xl bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p> | |
| 602 | 602 | )} |
| 603 | 603 | |
| 604 | 604 | <Tabs value={courseTab()} onChange={setCourseTab} class="space-y-4"> |
| 605 | - <TabsList class="grid w-full grid-cols-2 sm:grid-cols-3 xl:grid-cols-7" aria-label={c().title}> | |
| 605 | + <TabsList class="flex w-full justify-start overflow-x-auto sm:grid sm:grid-cols-3 xl:grid-cols-7" aria-label={c().title}> | |
| 606 | 606 | <TabsTrigger value="subjects" class="min-w-0"><IconBook class="h-4 w-4" />{t("subjects.title")}<Badge variant="secondary" class="h-5 min-w-5 justify-center rounded-full px-1.5 py-0 text-[10px] group-data-selected:bg-background group-data-selected:text-foreground">{subjectCount()}</Badge></TabsTrigger> |
| 607 | 607 | <TabsTrigger value="exams" class="min-w-0"><IconExam class="h-4 w-4" />{t("courses.exams")}<Badge variant="secondary" class="h-5 min-w-5 justify-center rounded-full px-1.5 py-0 text-[10px] group-data-selected:bg-background group-data-selected:text-foreground">{examCount()}</Badge></TabsTrigger> |
| 608 | 608 | <TabsTrigger value="homework" class="min-w-0"><IconHomework class="h-4 w-4" />{t("homework.title")}<Badge variant="secondary" class="h-5 min-w-5 justify-center rounded-full px-1.5 py-0 text-[10px] group-data-selected:bg-background group-data-selected:text-foreground">{homeworkCount()}</Badge></TabsTrigger> |
| @@ -662,7 +662,7 @@ function CourseDetailContent() { | ||
| 662 | 662 | <TabsContent value="teachers" class="space-y-3"> |
| 663 | 663 | <div class="flex flex-wrap items-center gap-2 text-sm"> |
| 664 | 664 | <Badge variant="secondary" class="rounded-full">{countDescription(assignedTeacherCount(), t("courses.teachers"))}</Badge> |
| 665 | - <span class="inline-flex min-w-0 items-center gap-1.5 text-muted-foreground"> | |
| 665 | + <span class="inline-flex min-w-0 items-center gap-1.5 text-text-subtle"> | |
| 666 | 666 | <IconSchool class="h-4 w-4 shrink-0" /> |
| 667 | 667 | <span>{t("common.creator")}:</span> |
| 668 | 668 | <span class="truncate font-medium text-foreground">{c().creator.display_name || c().creator.username}</span> |
src/pages/courses-page.tsxmodified+8 -8
| @@ -123,13 +123,13 @@ function CoursesContent() { | ||
| 123 | 123 | }; |
| 124 | 124 | |
| 125 | 125 | return ( |
| 126 | - <div class="space-y-5"> | |
| 126 | + <div class="space-y-6"> | |
| 127 | 127 | <SidePanel open={canCreate() && showForm()} onOpenChange={setShowForm} title={t("common.createItem", { item: kindInSentence() })} description={t("courses.subtitle", { item: kindLabel() })}> |
| 128 | 128 | <form class="space-y-4" onSubmit={createCourse}> |
| 129 | 129 | <Show when={limits.error}><ErrorAlert message={formatApiError(limits.error)} onRetry={() => void refetchLimits()} /></Show> |
| 130 | - <div class="flex items-center justify-between rounded-md border border-border/70 bg-muted/30 px-3 py-2 text-xs text-muted-foreground"> | |
| 130 | + <div class="flex items-center justify-between rounded-xl border border-border-line bg-surface-tint px-3 py-2 text-xs text-text-subtle"> | |
| 131 | 131 | <span>{t("exams.kind")}</span> |
| 132 | - <span class="font-medium text-foreground">{kindLabelSingular()}</span> | |
| 132 | + <span class="font-medium text-text-default">{kindLabelSingular()}</span> | |
| 133 | 133 | </div> |
| 134 | 134 | <div class="space-y-3"> |
| 135 | 135 | <div class="space-y-1.5"><Label for="course-title">{t("form.title")}<span class="ml-0.5 text-destructive">*</span></Label><Input id="course-title" required maxlength={limits.latest?.course.max_title_len} value={title()} onInput={(e) => setTitle(e.currentTarget.value)} /></div> |
| @@ -143,10 +143,10 @@ function CoursesContent() { | ||
| 143 | 143 | </form> |
| 144 | 144 | </SidePanel> |
| 145 | 145 | |
| 146 | - <header class="flex flex-wrap items-end justify-between gap-4 border-b border-border pb-5"> | |
| 146 | + <header class="flex flex-wrap items-end justify-between gap-4 border-b border-border-hairline pb-5"> | |
| 147 | 147 | <div class="space-y-1"> |
| 148 | - <h1 class="text-2xl font-semibold tracking-tight">{pageLabel()}</h1> | |
| 149 | - <p class="text-sm text-muted-foreground">{t("courses.pageSubtitle")}</p> | |
| 148 | + <h1 class="text-2xl font-semibold tracking-tight text-text-strong">{pageLabel()}</h1> | |
| 149 | + <p class="text-sm text-text-subtle">{t("courses.pageSubtitle")}</p> | |
| 150 | 150 | </div> |
| 151 | 151 | <Show when={canCreate()}> |
| 152 | 152 | <Button size="sm" class="min-w-30 rounded-lg" onClick={() => setShowForm(true)}> |
| @@ -178,14 +178,14 @@ function CoursesContent() { | ||
| 178 | 178 | </TabsList> |
| 179 | 179 | |
| 180 | 180 | <TabsContent value={pageKind() ?? "all"} class="mt-4 space-y-4 border-0 bg-transparent p-0 shadow-none"> |
| 181 | - <section class="rounded-lg border border-border bg-card p-3 shadow-xs" aria-label={t("common.search")}> | |
| 181 | + <section class="rounded-xl border border-border-line bg-surface-base p-3" aria-label={t("common.search")}> | |
| 182 | 182 | <DataToolbar |
| 183 | 183 | inline |
| 184 | 184 | searchValue={search()} |
| 185 | 185 | searchPlaceholder={t("common.searchPlaceholder")} |
| 186 | 186 | onSearchInput={setSearch} |
| 187 | 187 | filters={ |
| 188 | - <Select wrapperClass="w-40 shrink-0 sm:w-52" class="h-9 rounded-md" aria-label={t("terms.term")} value={termFilter()} onChange={(e) => setTermFilter(e.currentTarget.value)}> | |
| 188 | + <Select wrapperClass="w-40 shrink-0 sm:w-52" class="h-8 rounded-lg" aria-label={t("terms.term")} value={termFilter()} onChange={(e) => setTermFilter(e.currentTarget.value)}> | |
| 189 | 189 | <option value="all">{t("common.all")}</option> |
| 190 | 190 | <option value="unassigned">{t("terms.unassigned")}</option> |
| 191 | 191 | <For each={terms.latest ?? []}>{(term) => <option value={term.id}>{term.name}</option>}</For> |
src/pages/dashboard-page.tsxmodified+13 -13
| @@ -437,18 +437,18 @@ function DashboardContent() { | ||
| 437 | 437 | }); |
| 438 | 438 | |
| 439 | 439 | return ( |
| 440 | - <div class="space-y-5"> | |
| 441 | - <header class="flex flex-wrap items-end justify-between gap-3"> | |
| 440 | + <div class="space-y-6"> | |
| 441 | + <header class="flex min-h-[66px] flex-wrap items-center justify-between gap-3 border-b border-border-hairline pb-4"> | |
| 442 | 442 | <div class="space-y-1"> |
| 443 | - <h1 class="text-2xl font-semibold tracking-tight">{t("dashboard.welcomeBack", { name: fullName() })}</h1> | |
| 444 | - <p class="text-sm text-muted-foreground">{t("dashboard.welcomeHint")}</p> | |
| 443 | + <h1 class="text-[28px] font-semibold leading-9 tracking-[-0.02em] text-text-strong">{t("dashboard.welcomeBack", { name: fullName() })}</h1> | |
| 444 | + <p class="text-sm text-text-subtle">{t("dashboard.welcomeHint")}</p> | |
| 445 | 445 | </div> |
| 446 | 446 | <div class="flex items-center gap-2"> |
| 447 | - <Badge variant="outline" class="rounded-full bg-muted/40">{t(roleKeys[role()])}</Badge> | |
| 447 | + <Badge variant="outline" class="bg-surface-overlay">{t(roleKeys[role()])}</Badge> | |
| 448 | 448 | <Show when={myClass()}> |
| 449 | - {(cls) => <Badge variant="outline" class="rounded-full bg-muted/40">{cls().name}</Badge>} | |
| 449 | + {(cls) => <Badge variant="outline" class="bg-surface-overlay">{cls().name}</Badge>} | |
| 450 | 450 | </Show> |
| 451 | - <time class="text-sm tabular-nums text-muted-foreground"> | |
| 451 | + <time class="text-sm tabular-nums text-text-subtle"> | |
| 452 | 452 | {new Intl.DateTimeFormat(locale() === "tr" ? "tr-TR" : "en-GB", { dateStyle: "medium" }).format(now())} |
| 453 | 453 | </time> |
| 454 | 454 | </div> |
| @@ -460,19 +460,19 @@ function DashboardContent() { | ||
| 460 | 460 | </Show> |
| 461 | 461 | |
| 462 | 462 | <section class="space-y-3" aria-labelledby="highlights-heading"> |
| 463 | - <h2 id="highlights-heading" class="text-sm font-semibold">{t("dashboard.highlights")}</h2> | |
| 463 | + <h2 id="highlights-heading" class="text-sm font-semibold text-text-strong">{t("dashboard.highlights")}</h2> | |
| 464 | 464 | <div class="grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4"> |
| 465 | 465 | <For each={stats()}> |
| 466 | 466 | {(stat) => ( |
| 467 | - <div class="rounded-lg border border-border bg-card px-4 py-3.5 shadow-xs"> | |
| 467 | + <div class="rounded-xl border border-border-line bg-surface-base px-4 py-4"> | |
| 468 | 468 | <div class="flex items-center gap-2"> |
| 469 | - <span class="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border bg-muted/30 text-muted-foreground"> | |
| 469 | + <span class="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-surface-tint text-text-subtle"> | |
| 470 | 470 | <stat.Icon class="h-4 w-4" /> |
| 471 | 471 | </span> |
| 472 | - <p class="min-w-0 flex-1 truncate text-xs font-medium text-muted-foreground">{t(stat.labelKey)}</p> | |
| 472 | + <p class="min-w-0 flex-1 truncate text-xs font-medium text-text-subtle">{t(stat.labelKey)}</p> | |
| 473 | 473 | </div> |
| 474 | 474 | <div class="mt-3"> |
| 475 | - <p class="mono tabular-nums text-2xl font-bold tracking-tight">{stat.value}</p> | |
| 475 | + <p class="mono tabular-nums text-2xl font-semibold tracking-[-0.02em] text-text-strong">{stat.value}</p> | |
| 476 | 476 | </div> |
| 477 | 477 | </div> |
| 478 | 478 | )} |
| @@ -522,7 +522,7 @@ function DashboardContent() { | ||
| 522 | 522 | </div> |
| 523 | 523 | </Show> |
| 524 | 524 | |
| 525 | - <section class="flex flex-col gap-4 rounded-lg border border-border bg-card p-4 shadow-xs" aria-labelledby="deadlines-heading"> | |
| 525 | + <section class="flex flex-col gap-4 rounded-xl border border-border-line bg-surface-base p-4" aria-labelledby="deadlines-heading"> | |
| 526 | 526 | <h2 id="deadlines-heading" class="text-base font-semibold tracking-tight">{t("dashboard.deadlines")}</h2> |
| 527 | 527 | <DataTable |
| 528 | 528 | columns={deadlineColumns()} |
src/pages/exam-detail-page.tsxmodified+39 -37
| @@ -328,7 +328,10 @@ function ExamDetailContent() { | ||
| 328 | 328 | { |
| 329 | 329 | id: "actions", |
| 330 | 330 | header: t("common.actions"), |
| 331 | - meta: { headerClass: "w-14 text-center", cellClass: "px-1 text-center" }, | |
| 331 | + meta: { | |
| 332 | + headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 333 | + cellClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 334 | + }, | |
| 332 | 335 | cell: (cell) => ( |
| 333 | 336 | <TableRowActions |
| 334 | 337 | label={t("common.actions")} |
| @@ -384,8 +387,8 @@ function ExamDetailContent() { | ||
| 384 | 387 | {(ex) => ( |
| 385 | 388 | <Show when={accessReady()} fallback={<PageSpinner />}> |
| 386 | 389 | <Show when={canViewExam()} fallback={<Alert variant="destructive">{t("common.accessDenied")}</Alert>}> |
| 387 | - <div class="mx-auto w-full max-w-[1440px] space-y-6"> | |
| 388 | - <div class="sticky top-14 z-10 -mx-4 space-y-2 bg-background px-4 pb-1 sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8"> | |
| 390 | + <div class="mx-auto w-full max-w-[1100px] space-y-6"> | |
| 391 | + <div class="sticky top-14 z-10 -mx-4 space-y-2 bg-surface-overlay px-4 pb-1 sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8"> | |
| 389 | 392 | <nav class="detail-breadcrumb"> |
| 390 | 393 | <Link to="/exams">{t("exams.title")}</Link> |
| 391 | 394 | <span aria-hidden>›</span> |
| @@ -394,7 +397,6 @@ function ExamDetailContent() { | ||
| 394 | 397 | <PageHeader |
| 395 | 398 | title={ex().title} |
| 396 | 399 | description={ex().description || "—"} |
| 397 | - class="border-border/70" | |
| 398 | 400 | actions={ |
| 399 | 401 | <div class="flex flex-wrap items-center gap-2"> |
| 400 | 402 | <Show when={isStudent() && !isDraft() && isSittable()}> |
| @@ -402,14 +404,14 @@ function ExamDetailContent() { | ||
| 402 | 404 | <Show when={noAttemptsLeft()} |
| 403 | 405 | fallback={ |
| 404 | 406 | <Link to="/exam-room/$id" params={{ id: id() }}> |
| 405 | - <Button size="sm" class="flex-1 rounded-xl sm:flex-none"> | |
| 407 | + <Button size="sm" class="flex-1 rounded-lg sm:flex-none"> | |
| 406 | 408 | <IconExam class="h-4 w-4" /> |
| 407 | 409 | {ownAttempt()?.status === "in_progress" && !ownAttemptClosedByExit() ? t("attempt.resume") : t("attempt.openRoom")} |
| 408 | 410 | </Button> |
| 409 | 411 | </Link> |
| 410 | 412 | } |
| 411 | 413 | > |
| 412 | - <Badge variant="secondary" class="flex-1 rounded-xl px-3 py-2 text-center sm:flex-none"> | |
| 414 | + <Badge variant="secondary" class="flex-1 px-3 py-2 text-center sm:flex-none"> | |
| 413 | 415 | {ownAttempt()?.status === "submitted" ? t("attempt.submitted") : ownAttempt()?.status === "expired" ? t("attempt.expired") : t("attempt.noAttemptsLeft")} |
| 414 | 416 | </Badge> |
| 415 | 417 | </Show> |
| @@ -417,7 +419,7 @@ function ExamDetailContent() { | ||
| 417 | 419 | </Show> |
| 418 | 420 | <Show when={hasCourseManagementRights() && !isDraft() && !isUpcoming() && isSittable()}> |
| 419 | 421 | <Link to="/exams/$id/live" params={{ id: id() }}> |
| 420 | - <Button size="sm" class="flex-1 rounded-xl sm:flex-none"> | |
| 422 | + <Button size="sm" class="flex-1 rounded-lg sm:flex-none"> | |
| 421 | 423 | <IconEye class="h-4 w-4" /> |
| 422 | 424 | {isFinished() ? t("exams.finalState") : t("exams.liveMonitor")} |
| 423 | 425 | </Button> |
| @@ -448,20 +450,20 @@ function ExamDetailContent() { | ||
| 448 | 450 | <div class="mt-3 flex flex-wrap items-center gap-2"> |
| 449 | 451 | <Badge |
| 450 | 452 | variant="outline" |
| 451 | - class={cn("w-fit rounded-full capitalize !bg-transparent !text-foreground", scheduleStatusClass(examStatusTone(detailStatus())))} | |
| 453 | + class={cn("w-fit capitalize !bg-transparent !text-foreground", scheduleStatusClass(examStatusTone(detailStatus())))} | |
| 452 | 454 | > |
| 453 | 455 | <span class="mr-1.5 inline-block h-1.5 w-1.5 rounded-full bg-muted-foreground" /> |
| 454 | 456 | {detailStatusLabel()} |
| 455 | 457 | </Badge> |
| 456 | - <Badge variant="outline" class="rounded-full"> | |
| 458 | + <Badge variant="outline"> | |
| 457 | 459 | {examKindLabel(String(ex().kind), t)} |
| 458 | 460 | </Badge> |
| 459 | 461 | </div> |
| 460 | 462 | </PageHeader> |
| 461 | 463 | </div> |
| 462 | 464 | <div class="grid gap-2 sm:grid-cols-2 xl:grid-cols-4"> |
| 463 | - <div class="flex min-w-0 items-center gap-3 rounded-lg border border-border/70 bg-card p-3.5"> | |
| 464 | - <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-muted text-muted-foreground"> | |
| 465 | + <div class="flex min-w-0 items-center gap-3 rounded-xl border border-border-line bg-surface-base p-3.5"> | |
| 466 | + <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-surface-tint text-text-subtle"> | |
| 465 | 467 | <IconExam class="h-4 w-4" /> |
| 466 | 468 | </span> |
| 467 | 469 | <div class="min-w-0"> |
| @@ -469,8 +471,8 @@ function ExamDetailContent() { | ||
| 469 | 471 | <p class="truncate text-sm font-semibold">{examModeLabel(ex().mode)}</p> |
| 470 | 472 | </div> |
| 471 | 473 | </div> |
| 472 | - <div class="flex min-w-0 items-center gap-3 rounded-lg border border-border/70 bg-card p-3.5"> | |
| 473 | - <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-muted text-muted-foreground"> | |
| 474 | + <div class="flex min-w-0 items-center gap-3 rounded-xl border border-border-line bg-surface-base p-3.5"> | |
| 475 | + <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-surface-tint text-text-subtle"> | |
| 474 | 476 | <IconRefresh class="h-4 w-4" /> |
| 475 | 477 | </span> |
| 476 | 478 | <div class="min-w-0"> |
| @@ -485,8 +487,8 @@ function ExamDetailContent() { | ||
| 485 | 487 | </Show> |
| 486 | 488 | </div> |
| 487 | 489 | </div> |
| 488 | - <div class="flex min-w-0 items-center gap-3 rounded-lg border border-border/70 bg-card p-3.5"> | |
| 489 | - <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-muted text-muted-foreground"> | |
| 490 | + <div class="flex min-w-0 items-center gap-3 rounded-xl border border-border-line bg-surface-base p-3.5"> | |
| 491 | + <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-surface-tint text-text-subtle"> | |
| 490 | 492 | <IconCalendarDays class="h-4 w-4" /> |
| 491 | 493 | </span> |
| 492 | 494 | <div class="min-w-0"> |
| @@ -499,8 +501,8 @@ function ExamDetailContent() { | ||
| 499 | 501 | </Show> |
| 500 | 502 | </div> |
| 501 | 503 | </div> |
| 502 | - <div class="flex min-w-0 items-center gap-3 rounded-lg border border-border/70 bg-card p-3.5"> | |
| 503 | - <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-muted text-muted-foreground"> | |
| 504 | + <div class="flex min-w-0 items-center gap-3 rounded-xl border border-border-line bg-surface-base p-3.5"> | |
| 505 | + <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-surface-tint text-text-subtle"> | |
| 504 | 506 | <IconClock class="h-4 w-4" /> |
| 505 | 507 | </span> |
| 506 | 508 | <div class="min-w-0"> |
| @@ -532,7 +534,7 @@ function ExamDetailContent() { | ||
| 532 | 534 | <button |
| 533 | 535 | type="button" |
| 534 | 536 | onClick={() => setMarkOpen((v) => !v)} |
| 535 | - class="flex w-full items-center justify-between gap-3 rounded-lg border border-border bg-card px-4 py-3 text-left text-sm shadow-xs transition-colors hover:bg-muted/40" | |
| 537 | + class="flex w-full items-center justify-between gap-3 rounded-md border border-border-line bg-surface-base px-4 py-3 text-left text-sm transition-colors hover:bg-surface-overlay" | |
| 536 | 538 | > |
| 537 | 539 | <span class="inline-flex items-center gap-2 font-medium"> |
| 538 | 540 | <IconEdit class="h-4 w-4" /> |
| @@ -550,7 +552,7 @@ function ExamDetailContent() { | ||
| 550 | 552 | <div class="flex items-end gap-2"> |
| 551 | 553 | <Input |
| 552 | 554 | id="answer-sheet-mark" |
| 553 | - class="h-10 flex-1 rounded-lg" | |
| 555 | + class="h-9 flex-1 rounded-lg" | |
| 554 | 556 | type="number" |
| 555 | 557 | min={0} |
| 556 | 558 | max={100} |
| @@ -559,7 +561,7 @@ function ExamDetailContent() { | ||
| 559 | 561 | onInput={(event) => setClampedAnswerMark(event.currentTarget.value)} |
| 560 | 562 | /> |
| 561 | 563 | <span class="pb-2 text-sm text-muted-foreground">/ 100</span> |
| 562 | - <Button type="submit" class="h-10 rounded-lg shrink-0" disabled={answerPending() || answerResult.loading}> | |
| 564 | + <Button type="submit" size="sm" class="rounded-lg shrink-0" disabled={answerPending() || answerResult.loading}> | |
| 563 | 565 | {t("common.save")} |
| 564 | 566 | </Button> |
| 565 | 567 | </div> |
| @@ -569,7 +571,7 @@ function ExamDetailContent() { | ||
| 569 | 571 | </form> |
| 570 | 572 | </Show> |
| 571 | 573 | <Show when={(markHistory()?.length ?? 0) > 1}> |
| 572 | - <div class="rounded-lg border border-border bg-card px-4 py-3"> | |
| 574 | + <div class="rounded-md border border-border-line bg-surface-overlay px-4 py-3"> | |
| 573 | 575 | <p class="text-xs font-medium text-muted-foreground">{t("exams.markHistory")}</p> |
| 574 | 576 | <ul class="mt-2 space-y-1"> |
| 575 | 577 | <For each={markHistory()}> |
| @@ -640,9 +642,9 @@ function ExamDetailContent() { | ||
| 640 | 642 | |
| 641 | 643 | <Show when={isStudent() && ownResult()}> |
| 642 | 644 | {(result) => ( |
| 643 | - <section class="space-y-4 rounded-lg border border-border/70 bg-card p-4" aria-labelledby="own-exam-result"> | |
| 645 | + <section class="data-shell space-y-4 p-4" aria-labelledby="own-exam-result"> | |
| 644 | 646 | <div class="flex flex-wrap items-center gap-3"> |
| 645 | - <span class="flex h-9 w-9 items-center justify-center rounded-xl bg-muted text-muted-foreground"> | |
| 647 | + <span class="flex h-9 w-9 items-center justify-center rounded-md bg-surface-tint text-text-subtle"> | |
| 646 | 648 | <IconClipboardCheck class="h-4 w-4" /> |
| 647 | 649 | </span> |
| 648 | 650 | <h2 id="own-exam-result" class="text-base font-semibold">{t("exams.yourResult")}</h2> |
| @@ -657,31 +659,31 @@ function ExamDetailContent() { | ||
| 657 | 659 | |
| 658 | 660 | <Show when={hasCourseManagementRights()}> |
| 659 | 661 | <Tabs value={examTab()} onChange={setExamTab} class="space-y-3"> |
| 660 | - <TabsList class="border-primary/10 bg-card/80 shadow-sm"> | |
| 662 | + <TabsList> | |
| 661 | 663 | <TabsTrigger value="statistics"><IconChart class="h-4 w-4" />{t("exams.statistics")}</TabsTrigger> |
| 662 | 664 | <TabsTrigger value="questions"><IconExam class="h-4 w-4" />{t("questions.title")}</TabsTrigger> |
| 663 | 665 | <TabsTrigger value="results"><IconClipboardCheck class="h-4 w-4" />{t("exams.results")}</TabsTrigger> |
| 664 | 666 | </TabsList> |
| 665 | 667 | |
| 666 | - <TabsContent value="statistics" forceMount class="border-border/60 bg-card/80 shadow-sm"> | |
| 668 | + <TabsContent value="statistics" forceMount class="data-shell p-4"> | |
| 667 | 669 | <Suspense fallback={<DataTableSkeleton columns={4} />}> |
| 668 | 670 | <Show when={stats()}> |
| 669 | 671 | {(s) => ( |
| 670 | 672 | <div class="grid gap-2 text-sm sm:grid-cols-2 lg:grid-cols-4"> |
| 671 | - <div class="rounded-xl border border-border/70 bg-card p-4"> | |
| 672 | - <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("exams.graded")}</p> | |
| 673 | + <div class="rounded-xl border border-border-line bg-surface-overlay p-4"> | |
| 674 | + <p class="text-xs font-medium text-text-subtle">{t("exams.graded")}</p> | |
| 673 | 675 | <p class="mono mt-1 text-2xl font-semibold tabular-nums">{s().graded}</p> |
| 674 | 676 | </div> |
| 675 | - <div class="rounded-xl border border-border/70 bg-card p-4"> | |
| 676 | - <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("exams.average")}</p> | |
| 677 | + <div class="rounded-xl border border-border-line bg-surface-overlay p-4"> | |
| 678 | + <p class="text-xs font-medium text-text-subtle">{t("exams.average")}</p> | |
| 677 | 679 | <p class="mono mt-1 text-2xl font-semibold tabular-nums">{s().average == null ? "—" : s().average}</p> |
| 678 | 680 | </div> |
| 679 | - <div class="rounded-xl border border-border/70 bg-card p-4"> | |
| 680 | - <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("exams.min")}</p> | |
| 681 | + <div class="rounded-xl border border-border-line bg-surface-overlay p-4"> | |
| 682 | + <p class="text-xs font-medium text-text-subtle">{t("exams.min")}</p> | |
| 681 | 683 | <p class="mono mt-1 text-2xl font-semibold tabular-nums">{s().min == null ? "—" : s().min}</p> |
| 682 | 684 | </div> |
| 683 | - <div class="rounded-xl border border-border/70 bg-card p-4"> | |
| 684 | - <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("exams.max")}</p> | |
| 685 | + <div class="rounded-xl border border-border-line bg-surface-overlay p-4"> | |
| 686 | + <p class="text-xs font-medium text-text-subtle">{t("exams.max")}</p> | |
| 685 | 687 | <p class="mono mt-1 text-2xl font-semibold tabular-nums">{s().max == null ? "—" : s().max}</p> |
| 686 | 688 | </div> |
| 687 | 689 | </div> |
| @@ -690,13 +692,13 @@ function ExamDetailContent() { | ||
| 690 | 692 | </Suspense> |
| 691 | 693 | </TabsContent> |
| 692 | 694 | |
| 693 | - <TabsContent value="questions" forceMount class="border-border/60 bg-card/80 shadow-sm"> | |
| 695 | + <TabsContent value="questions" forceMount class="data-shell p-4"> | |
| 694 | 696 | <ExamQuestionsPanel examId={id()} courseId={ex().course} readOnly={isFinished()} embedded /> |
| 695 | 697 | </TabsContent> |
| 696 | 698 | |
| 697 | - <TabsContent value="results" forceMount class="space-y-4 border-border/60 bg-card/80 shadow-sm"> | |
| 699 | + <TabsContent value="results" forceMount class="data-shell space-y-4 p-4"> | |
| 698 | 700 | <div class="flex flex-wrap items-center justify-between gap-3"> |
| 699 | - <Badge variant="secondary" class="rounded-full">{`${resultTotal()} ${t("exams.studentResults")}`}</Badge> | |
| 701 | + <Badge variant="secondary">{`${resultTotal()} ${t("exams.studentResults")}`}</Badge> | |
| 700 | 702 | <div class="flex flex-wrap items-center gap-2"> |
| 701 | 703 | <Show when={isFinished()}> |
| 702 | 704 | <label |
| @@ -765,7 +767,7 @@ function ExamDetailContent() { | ||
| 765 | 767 | <Alert variant="success">{flash()}</Alert> |
| 766 | 768 | </Show> |
| 767 | 769 | {error() && ( |
| 768 | - <p class="rounded-sm bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p> | |
| 770 | + <p class="rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p> | |
| 769 | 771 | )} |
| 770 | 772 | |
| 771 | 773 | <ConfirmDialog |
src/pages/exams-page.tsxmodified+19 -16
| @@ -177,7 +177,7 @@ function ExamsContent() { | ||
| 177 | 177 | cell: (cell) => { |
| 178 | 178 | const status = cell.row.original.displayStatus; |
| 179 | 179 | return ( |
| 180 | - <Badge variant="outline" class={cn("min-w-28 justify-center whitespace-nowrap rounded-full", scheduleStatusClass(examStatusTone(status)))}> | |
| 180 | + <Badge variant="outline" class={cn("min-w-28 justify-center whitespace-nowrap", scheduleStatusClass(examStatusTone(status)))}> | |
| 181 | 181 | <span class={cn("mr-1.5 h-1.5 w-1.5 rounded-full", scheduleStatusDotClass(examStatusTone(status)))} /> |
| 182 | 182 | {statusLabel(status)} |
| 183 | 183 | </Badge> |
| @@ -187,7 +187,10 @@ function ExamsContent() { | ||
| 187 | 187 | { |
| 188 | 188 | id: "actions", |
| 189 | 189 | header: t("common.actions"), |
| 190 | - meta: { headerClass: "text-center", cellClass: "text-center" }, | |
| 190 | + meta: { | |
| 191 | + headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 192 | + cellClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 193 | + }, | |
| 191 | 194 | cell: (cell) => ( |
| 192 | 195 | <TableRowActions |
| 193 | 196 | label={t("common.actions")} |
| @@ -265,7 +268,7 @@ function ExamsContent() { | ||
| 265 | 268 | <Alert variant="destructive">{error()}</Alert> |
| 266 | 269 | </Show> |
| 267 | 270 | |
| 268 | - <section class="data-shell space-y-4 border-sky-500/15 bg-sky-500/2.5 p-4"> | |
| 271 | + <section class="data-shell space-y-4 p-4"> | |
| 269 | 272 | <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}> |
| 270 | 273 | <Show when={list.error}> |
| 271 | 274 | <Alert variant="destructive">{formatApiError(list.error)}</Alert> |
| @@ -275,7 +278,7 @@ function ExamsContent() { | ||
| 275 | 278 | description={t("exams.subtitle")} |
| 276 | 279 | actions={ |
| 277 | 280 | canCreate() ? ( |
| 278 | - <Button type="button" size="sm" class="min-w-30" onClick={openCreateModal}> | |
| 281 | + <Button type="button" size="sm" class="min-w-[7.5rem] rounded-lg" onClick={openCreateModal}> | |
| 279 | 282 | <IconPlus class="h-4 w-4" /> |
| 280 | 283 | {t("exams.create")} |
| 281 | 284 | </Button> |
| @@ -324,7 +327,7 @@ function ExamsContent() { | ||
| 324 | 327 | type="button" |
| 325 | 328 | variant="ghost" |
| 326 | 329 | size="sm" |
| 327 | - class="h-9 rounded-md px-3 text-xs font-medium text-muted-foreground hover:text-foreground" | |
| 330 | + class="h-8 rounded-lg px-3 text-[13px] font-medium text-muted-foreground hover:text-foreground" | |
| 328 | 331 | onClick={() => { |
| 329 | 332 | setStatusFilter("all"); |
| 330 | 333 | setCourseFilter("all"); |
| @@ -353,13 +356,13 @@ function ExamsContent() { | ||
| 353 | 356 | description={createdExam() ? t("exams.step2Questions") : t("exams.subtitle")} |
| 354 | 357 | size={createStep() === "questions" ? "wide" : "default"} |
| 355 | 358 | > |
| 356 | - <div class="mb-4 flex rounded-lg border border-indigo-500/15 bg-indigo-500/3 p-1"> | |
| 359 | + <div class="mb-4 flex rounded-md border border-border-line bg-surface-overlay p-1"> | |
| 357 | 360 | <button |
| 358 | 361 | type="button" |
| 359 | 362 | class={cn( |
| 360 | - "rounded-xl px-3 py-2 text-xs font-semibold transition-colors", | |
| 363 | + "rounded-md px-3 py-1.5 text-xs font-medium transition-colors", | |
| 361 | 364 | createStep() === "details" |
| 362 | - ? "bg-primary text-primary-foreground shadow-2xs" | |
| 365 | + ? "bg-surface-base text-foreground shadow-xs" | |
| 363 | 366 | : "text-muted-foreground hover:bg-muted/50", |
| 364 | 367 | )} |
| 365 | 368 | onClick={() => setCreateStep("details")} |
| @@ -370,9 +373,9 @@ function ExamsContent() { | ||
| 370 | 373 | type="button" |
| 371 | 374 | disabled={!createdExam()} |
| 372 | 375 | class={cn( |
| 373 | - "rounded-xl px-3 py-2 text-xs font-semibold transition-colors", | |
| 376 | + "rounded-md px-3 py-1.5 text-xs font-medium transition-colors", | |
| 374 | 377 | createStep() === "questions" |
| 375 | - ? "bg-primary text-primary-foreground shadow-2xs" | |
| 378 | + ? "bg-surface-base text-foreground shadow-xs" | |
| 376 | 379 | : createdExam() |
| 377 | 380 | ? "text-muted-foreground hover:bg-muted/50" |
| 378 | 381 | : "opacity-40 cursor-not-allowed text-muted-foreground", |
| @@ -385,7 +388,7 @@ function ExamsContent() { | ||
| 385 | 388 | |
| 386 | 389 | <Show when={createStep() === "details"}> |
| 387 | 390 | <Show when={!createdExam()}> |
| 388 | - <div class="mb-4 space-y-1.5 rounded-lg border border-sky-500/15 bg-sky-500/2.5 p-4"> | |
| 391 | + <div class="mb-4 space-y-1.5 rounded-xl border border-border-line bg-surface-overlay p-4"> | |
| 389 | 392 | <label class="text-sm font-medium" for="exam-course"> |
| 390 | 393 | {t("exams.selectCourse")} |
| 391 | 394 | </label> |
| @@ -431,13 +434,13 @@ function ExamsContent() { | ||
| 431 | 434 | <Show when={editingExam()}> |
| 432 | 435 | {(exam) => ( |
| 433 | 436 | <div class="space-y-4"> |
| 434 | - <div class="flex rounded-lg border border-indigo-500/15 bg-indigo-500/3 p-1"> | |
| 437 | + <div class="flex rounded-md border border-border-line bg-surface-overlay p-1"> | |
| 435 | 438 | <button |
| 436 | 439 | type="button" |
| 437 | 440 | class={cn( |
| 438 | - "rounded-xl px-3 py-2 text-xs font-semibold transition-colors", | |
| 441 | + "rounded-md px-3 py-1.5 text-xs font-medium transition-colors", | |
| 439 | 442 | editTab() === "details" |
| 440 | - ? "bg-primary text-primary-foreground shadow-2xs" | |
| 443 | + ? "bg-surface-base text-foreground shadow-xs" | |
| 441 | 444 | : "text-muted-foreground hover:bg-muted/50", |
| 442 | 445 | )} |
| 443 | 446 | onClick={() => setEditTab("details")} |
| @@ -447,9 +450,9 @@ function ExamsContent() { | ||
| 447 | 450 | <button |
| 448 | 451 | type="button" |
| 449 | 452 | class={cn( |
| 450 | - "rounded-xl px-3 py-2 text-xs font-semibold transition-colors", | |
| 453 | + "rounded-md px-3 py-1.5 text-xs font-medium transition-colors", | |
| 451 | 454 | editTab() === "questions" |
| 452 | - ? "bg-primary text-primary-foreground shadow-2xs" | |
| 455 | + ? "bg-surface-base text-foreground shadow-xs" | |
| 453 | 456 | : "text-muted-foreground hover:bg-muted/50", |
| 454 | 457 | )} |
| 455 | 458 | onClick={() => setEditTab("questions")} |
src/pages/homework-detail-page.tsxmodified+11 -11
| @@ -61,20 +61,20 @@ export default function HomeworkDetailPage() { | ||
| 61 | 61 | } |
| 62 | 62 | /> |
| 63 | 63 | <div class="grid gap-3 text-sm sm:grid-cols-2 lg:grid-cols-4"> |
| 64 | - <div class="detail-metric-card"> | |
| 65 | - <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("nav.courses")}</p> | |
| 66 | - <p class="mt-1 font-medium">{course()?.title ?? item().course}</p> | |
| 64 | + <div class="rounded-xl border border-border-line bg-surface-base px-4 py-4"> | |
| 65 | + <p class="text-xs font-medium uppercase tracking-[0.08em] text-text-subtle">{t("nav.courses")}</p> | |
| 66 | + <p class="mt-1 font-medium text-text-default">{course()?.title ?? item().course}</p> | |
| 67 | 67 | </div> |
| 68 | - <div class="detail-metric-card"> | |
| 69 | - <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("subjects.subject")}</p> | |
| 70 | - <p class="mt-1 font-medium">{subject()?.name ?? item().subject}</p> | |
| 68 | + <div class="rounded-xl border border-border-line bg-surface-base px-4 py-4"> | |
| 69 | + <p class="text-xs font-medium uppercase tracking-[0.08em] text-text-subtle">{t("subjects.subject")}</p> | |
| 70 | + <p class="mt-1 font-medium text-text-default">{subject()?.name ?? item().subject}</p> | |
| 71 | 71 | </div> |
| 72 | - <div class="detail-metric-card"> | |
| 73 | - <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("homework.dueAt")}</p> | |
| 74 | - <p class="mono mt-1 font-medium tabular-nums">{formatDateTime(item().due_at, locale())}</p> | |
| 72 | + <div class="rounded-xl border border-border-line bg-surface-base px-4 py-4"> | |
| 73 | + <p class="text-xs font-medium uppercase tracking-[0.08em] text-text-subtle">{t("homework.dueAt")}</p> | |
| 74 | + <p class="mono mt-1 font-medium tabular-nums text-text-default">{formatDateTime(item().due_at, locale())}</p> | |
| 75 | 75 | </div> |
| 76 | - <div class="detail-metric-card"> | |
| 77 | - <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("homework.assigned")}</p> | |
| 76 | + <div class="rounded-xl border border-border-line bg-surface-base px-4 py-4"> | |
| 77 | + <p class="text-xs font-medium uppercase tracking-[0.08em] text-text-subtle">{t("homework.assigned")}</p> | |
| 78 | 78 | <Badge variant="outline" class="mt-2 rounded-full"> |
| 79 | 79 | {item().assigned?.length ? t("common.countItem", { count: item().assigned!.length, item: t("courses.rosterItem") }) : t("homework.wholeCourse")} |
| 80 | 80 | </Badge> |
src/pages/homework-page.tsxmodified+10 -10
| @@ -144,7 +144,7 @@ function HomeworkContent() { | ||
| 144 | 144 | cell: (cell) => ( |
| 145 | 145 | <div class="min-w-0"> |
| 146 | 146 | <p class="truncate font-medium">{cell.row.original.title}</p> |
| 147 | - <p class="truncate text-xs text-muted-foreground">{cell.row.original.description || "—"}</p> | |
| 147 | + <p class="truncate text-xs text-text-subtle">{cell.row.original.description || "—"}</p> | |
| 148 | 148 | </div> |
| 149 | 149 | ), |
| 150 | 150 | }, |
| @@ -152,14 +152,14 @@ function HomeworkContent() { | ||
| 152 | 152 | id: "course", |
| 153 | 153 | accessorFn: (row) => courseName(row.course), |
| 154 | 154 | header: t("nav.courses"), |
| 155 | - meta: { cellClass: "text-muted-foreground" }, | |
| 155 | + meta: { cellClass: "text-text-subtle" }, | |
| 156 | 156 | cell: (cell) => courseName(cell.row.original.course), |
| 157 | 157 | }, |
| 158 | 158 | { |
| 159 | 159 | id: "due_at", |
| 160 | 160 | accessorFn: (row) => row.due_at, |
| 161 | 161 | header: t("homework.dueAt"), |
| 162 | - meta: { cellClass: "mono whitespace-nowrap text-muted-foreground" }, | |
| 162 | + meta: { cellClass: "mono whitespace-nowrap text-text-subtle" }, | |
| 163 | 163 | cell: (cell) => formatDateTime(cell.row.original.due_at, locale()), |
| 164 | 164 | }, |
| 165 | 165 | { |
| @@ -211,18 +211,18 @@ function HomeworkContent() { | ||
| 211 | 211 | <div class="space-y-1.5"> |
| 212 | 212 | <Label for="homework-due-global">{t("homework.dueAt")}</Label> |
| 213 | 213 | <div class="grid grid-cols-2 gap-2"> |
| 214 | - <DatePicker id="homework-due-global" class="h-10" placeholder={t("form.datePlaceholder")} value={dueDate()} required onChange={setDueDate} /> | |
| 215 | - <Input class="h-10 rounded-sm font-mono placeholder:text-muted-foreground/35" placeholder="17:00" value={dueTime()} required onInput={(event) => setDueTime(event.currentTarget.value)} /> | |
| 214 | + <DatePicker id="homework-due-global" class="h-9" placeholder={t("form.datePlaceholder")} value={dueDate()} required onChange={setDueDate} /> | |
| 215 | + <Input class="h-9 rounded-md font-mono placeholder:text-text-placeholder" placeholder="17:00" value={dueTime()} required onInput={(event) => setDueTime(event.currentTarget.value)} /> | |
| 216 | 216 | </div> |
| 217 | 217 | </div> |
| 218 | - <p class="rounded-xl border bg-muted/30 px-3 py-2 text-xs text-muted-foreground">{t("homework.wholeCourseHelp")}</p> | |
| 218 | + <p class="rounded-xl border border-border-line bg-surface-tint px-3 py-2 text-xs text-text-subtle">{t("homework.wholeCourseHelp")}</p> | |
| 219 | 219 | <div class="flex flex-wrap gap-2"> |
| 220 | - <Button type="submit" class="rounded-xl" disabled={pending()}>{t("common.create")}</Button> | |
| 221 | - <Button type="button" variant="outline" class="rounded-xl" onClick={() => setCreateOpen(false)}>{t("common.cancel")}</Button> | |
| 220 | + <Button type="submit" class="rounded-lg" disabled={pending()}>{t("common.create")}</Button> | |
| 221 | + <Button type="button" variant="outline" class="rounded-lg" onClick={() => setCreateOpen(false)}>{t("common.cancel")}</Button> | |
| 222 | 222 | </div> |
| 223 | 223 | </form> |
| 224 | 224 | </SidePanel> |
| 225 | - <section class="data-shell space-y-4 border-sky-500/15 bg-sky-500/2.5 p-4"> | |
| 225 | + <section class="data-shell space-y-4 p-4"> | |
| 226 | 226 | <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}> |
| 227 | 227 | <Show when={list.error}> |
| 228 | 228 | <Alert variant="destructive">{formatApiError(list.error)}</Alert> |
| @@ -232,7 +232,7 @@ function HomeworkContent() { | ||
| 232 | 232 | description={t("homework.listHelp")} |
| 233 | 233 | actions={ |
| 234 | 234 | <Show when={canCreate()}> |
| 235 | - <Button type="button" size="sm" class="min-w-30" onClick={() => setCreateOpen(true)}> | |
| 235 | + <Button type="button" size="sm" class="min-w-[7.5rem] rounded-lg" onClick={() => setCreateOpen(true)}> | |
| 236 | 236 | <IconPlus class="h-4 w-4" /> |
| 237 | 237 | {t("homework.add")} |
| 238 | 238 | </Button> |
src/pages/login-page.tsxmodified+34 -8
| @@ -3,6 +3,7 @@ import { createResource, createSignal, Show } from "solid-js"; | ||
| 3 | 3 | import { postLogin } from "@/api/auth"; |
| 4 | 4 | import { getLimits } from "@/api/limits"; |
| 5 | 5 | import { formatApiError } from "@/api/client"; |
| 6 | +import { LogoMark } from "@/components/brand/logo-mark"; | |
| 6 | 7 | import { Button } from "@/components/ui/button"; |
| 7 | 8 | import { Input } from "@/components/ui/input"; |
| 8 | 9 | import { Label } from "@/components/ui/label"; |
| @@ -23,6 +24,10 @@ function LoginForm() { | ||
| 23 | 24 | const auth = useAuth(); |
| 24 | 25 | const navigate = useNavigate(); |
| 25 | 26 | const t = useT(); |
| 27 | + // Backend slug bounds (hezarfen_backend MIN_SLUG_LEN / MAX_SLUG_LEN). | |
| 28 | + const MIN_SCHOOL_SLUG_LEN = 2; | |
| 29 | + const MAX_SCHOOL_SLUG_LEN = 32; | |
| 30 | + const [school, setSchool] = createSignal(""); | |
| 26 | 31 | const [username, setUsername] = createSignal(""); |
| 27 | 32 | const [password, setPassword] = createSignal(""); |
| 28 | 33 | const [showPassword, setShowPassword] = createSignal(false); |
| @@ -32,8 +37,13 @@ function LoginForm() { | ||
| 32 | 37 | |
| 33 | 38 | const handleSubmit = async (e: SubmitEvent) => { |
| 34 | 39 | e.preventDefault(); |
| 40 | + const s = school().trim(); | |
| 35 | 41 | const u = username().trim(); |
| 36 | 42 | const p = password(); |
| 43 | + if (s.length < MIN_SCHOOL_SLUG_LEN || s.length > MAX_SCHOOL_SLUG_LEN) { | |
| 44 | + setError(t("auth.schoolHint")); | |
| 45 | + return; | |
| 46 | + } | |
| 37 | 47 | const userLimits = limits()?.user; |
| 38 | 48 | if (userLimits && (u.length < userLimits.min_username_len || u.length > userLimits.max_username_len)) { |
| 39 | 49 | setError(t("auth.usernameHint")); |
| @@ -46,7 +56,7 @@ function LoginForm() { | ||
| 46 | 56 | setError(""); |
| 47 | 57 | setPending(true); |
| 48 | 58 | try { |
| 49 | - await postLogin({ username: u, password: p }); | |
| 59 | + await postLogin({ school: s, username: u, password: p }); | |
| 50 | 60 | await auth.refresh(); |
| 51 | 61 | void navigate({ to: "/" }); |
| 52 | 62 | } catch (err) { |
| @@ -57,14 +67,30 @@ function LoginForm() { | ||
| 57 | 67 | }; |
| 58 | 68 | |
| 59 | 69 | return ( |
| 60 | - <div class="-mx-4 -my-6 flex min-h-[calc(100dvh-3.5rem)] items-center justify-center overflow-hidden px-4 py-8 sm:-mx-6 sm:px-6 lg:-mx-8 lg:-my-8 lg:px-8"> | |
| 61 | - <div class="data-shell w-full max-w-sm p-6 shadow-lg sm:p-8"> | |
| 70 | + <div class="-mx-4 -my-6 flex min-h-[var(--app-viewport)] items-center justify-center overflow-hidden px-4 py-8 sm:-mx-6 sm:px-6 lg:-mx-10 lg:px-10"> | |
| 71 | + <div class="w-full max-w-[480px] rounded-xl border border-border-line bg-surface-base px-6 pb-8 pt-9 shadow-[0_10px_24px_-4px_rgba(0,0,0,0.10)] sm:px-10"> | |
| 62 | 72 | <div class="mb-8 text-center"> |
| 63 | - <h1 class="text-3xl font-semibold tracking-tight">{t("auth.loginTitle")}</h1> | |
| 64 | - <p class="mt-1.5 text-sm text-muted-foreground">{t("auth.loginSubtitle")}</p> | |
| 73 | + <div class="mx-auto mb-5 flex h-12 w-12 items-center justify-center text-text-strong"> | |
| 74 | + <LogoMark size={44} /> | |
| 75 | + </div> | |
| 76 | + <h1 class="text-[28px] font-semibold leading-9 tracking-[-0.025em] text-text-strong">{t("auth.loginTitle")}</h1> | |
| 77 | + <p class="mt-2 text-sm leading-[21px] text-text-subtle">{t("auth.loginSubtitle")}</p> | |
| 65 | 78 | </div> |
| 66 | 79 | |
| 67 | - <form class="space-y-5" onSubmit={handleSubmit}> | |
| 80 | + <form class="space-y-[18px]" onSubmit={handleSubmit}> | |
| 81 | + <div class="space-y-2"> | |
| 82 | + <Label for="login-school">{t("auth.school")}</Label> | |
| 83 | + <Input | |
| 84 | + id="login-school" | |
| 85 | + class="h-9" | |
| 86 | + minlength={MIN_SCHOOL_SLUG_LEN} | |
| 87 | + maxlength={MAX_SCHOOL_SLUG_LEN} | |
| 88 | + required | |
| 89 | + value={school()} | |
| 90 | + onInput={(e) => setSchool(e.currentTarget.value)} | |
| 91 | + /> | |
| 92 | + </div> | |
| 93 | + | |
| 68 | 94 | <div class="space-y-2"> |
| 69 | 95 | <Label for="login-username">{t("auth.username")}</Label> |
| 70 | 96 | <Input |
| @@ -110,12 +136,12 @@ function LoginForm() { | ||
| 110 | 136 | <p class="rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive">{error()}</p> |
| 111 | 137 | )} |
| 112 | 138 | |
| 113 | - <Button type="submit" class="h-9 w-full text-base" disabled={pending()}> | |
| 139 | + <Button type="submit" class="h-9 w-full text-sm" disabled={pending()}> | |
| 114 | 140 | {t("auth.login")} |
| 115 | 141 | </Button> |
| 116 | 142 | </form> |
| 117 | 143 | |
| 118 | - <p class="mt-8 text-center text-sm text-muted-foreground"> | |
| 144 | + <p class="mt-8 border-t border-border-hairline pt-6 text-center text-sm text-text-subtle"> | |
| 119 | 145 | {t("auth.noAccount")}{" "} |
| 120 | 146 | <Link to="/register" class="font-semibold text-primary underline-offset-4 hover:underline"> |
| 121 | 147 | {t("auth.register")} |
src/pages/meal-detail-page.tsxmodified+18 -18
| @@ -199,7 +199,7 @@ function MealDetailContent() { | ||
| 199 | 199 | </div> |
| 200 | 200 | |
| 201 | 201 | <Show when={conflicts().length > 0}> |
| 202 | - <Alert class="border-amber-500/40 bg-amber-500/10 text-amber-800 dark:text-amber-200"><span class="flex gap-2"><IconAlert class="mt-0.5 h-4 w-4 shrink-0" /><span>{t("meals.conflict")}: {conflicts().join(", ")}</span></span></Alert> | |
| 202 | + <Alert class="border-warning/50 bg-warning/10 text-warning"><span class="flex gap-2"><IconAlert class="mt-0.5 h-4 w-4 shrink-0" /><span>{t("meals.conflict")}: {conflicts().join(", ")}</span></span></Alert> | |
| 203 | 203 | </Show> |
| 204 | 204 | |
| 205 | 205 | <Show when={isParent()}> |
| @@ -217,11 +217,11 @@ function MealDetailContent() { | ||
| 217 | 217 | <TabsContent value="menu" class="space-y-4"> |
| 218 | 218 | <div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-3"> |
| 219 | 219 | <For each={current().dishes}>{(dish) => ( |
| 220 | - <article class="rounded-lg border border-border/70 bg-card p-4"> | |
| 221 | - <div class="flex justify-between gap-3"><h2 class="font-semibold">{dish.name}</h2><span class="font-semibold">{formatTry(dish.price_minor, moneyLocale())}</span></div> | |
| 222 | - <p class="mt-2 text-sm text-muted-foreground">{dish.description || "—"}</p> | |
| 223 | - <div class="mt-3 flex flex-wrap gap-1"><For each={dish.tags}>{(tag) => <Badge variant="outline" class={dish.conflicts.includes(tag) ? "border-amber-500/40 bg-amber-500/10 text-amber-800 dark:text-amber-200" : ""}>{dish.conflicts.includes(tag) ? `⚠ ${tag}` : tag}</Badge>}</For></div> | |
| 224 | - <Show when={canManage()}><div class="mt-3 flex gap-2 border-t pt-3"><Button variant="outline" size="sm" onClick={() => openDish(dish)}>{t("common.edit")}</Button><Button variant="ghost" size="sm" class="text-destructive" onClick={() => setDeleteDish(dish)}>{t("common.delete")}</Button></div></Show> | |
| 220 | + <article class="rounded-xl border border-border-line bg-surface-base p-4"> | |
| 221 | + <div class="flex justify-between gap-3"><h2 class="font-semibold text-text-strong">{dish.name}</h2><span class="font-semibold">{formatTry(dish.price_minor, moneyLocale())}</span></div> | |
| 222 | + <p class="mt-2 text-sm text-text-subtle">{dish.description || "—"}</p> | |
| 223 | + <div class="mt-3 flex flex-wrap gap-1"><For each={dish.tags}>{(tag) => <Badge variant="outline" class={dish.conflicts.includes(tag) ? "border-warning/50 bg-warning/10 text-warning" : ""}>{dish.conflicts.includes(tag) ? `⚠ ${tag}` : tag}</Badge>}</For></div> | |
| 224 | + <Show when={canManage()}><div class="mt-3 flex gap-2 border-t border-border-hairline pt-3"><Button variant="outline" size="sm" onClick={() => openDish(dish)}>{t("common.edit")}</Button><Button variant="ghost" size="sm" class="text-destructive" onClick={() => setDeleteDish(dish)}>{t("common.delete")}</Button></div></Show> | |
| 225 | 225 | </article> |
| 226 | 226 | )}</For> |
| 227 | 227 | </div> |
| @@ -236,40 +236,40 @@ function MealDetailContent() { | ||
| 236 | 236 | |
| 237 | 237 | <TabsContent value="account" class="space-y-4"> |
| 238 | 238 | <div class="grid gap-4 lg:grid-cols-2"> |
| 239 | - <section class="data-shell p-4"><h2 class="font-semibold">{t("meals.dietaryProfile")}</h2><div class="mt-3 flex flex-wrap gap-1.5"><For each={profile()?.tags ?? []}>{(tag) => <Badge variant="outline" class="border-amber-500/40 bg-amber-500/10 text-amber-800 dark:text-amber-200">⚠ {tag}</Badge>}</For></div><p class="mt-3 text-sm text-muted-foreground">{profile()?.note || t("meals.noDietaryNotes")}</p></section> | |
| 240 | - <Show when={canReadMoney()}><section class="data-shell p-4"><h2 class="font-semibold">{t("meals.balance")}</h2><p class="mt-3 text-2xl font-semibold tabular-nums">{formatTry(balance()?.balance_minor ?? 0, moneyLocale())}</p></section></Show> | |
| 239 | + <section class="data-shell p-4"><h2 class="font-semibold text-text-strong">{t("meals.dietaryProfile")}</h2><div class="mt-3 flex flex-wrap gap-1.5"><For each={profile()?.tags ?? []}>{(tag) => <Badge variant="outline" class="border-warning/50 bg-warning/10 text-warning">⚠ {tag}</Badge>}</For></div><p class="mt-3 text-sm text-text-subtle">{profile()?.note || t("meals.noDietaryNotes")}</p></section> | |
| 240 | + <Show when={canReadMoney()}><section class="data-shell p-4"><h2 class="font-semibold text-text-strong">{t("meals.balance")}</h2><p class="mt-3 text-2xl font-semibold tabular-nums">{formatTry(balance()?.balance_minor ?? 0, moneyLocale())}</p></section></Show> | |
| 241 | 241 | </div> |
| 242 | - <Show when={canReadMoney()}><section class="data-shell p-4"><h2 class="font-semibold">{t("meals.ledger")}</h2><div class="mt-3 divide-y divide-border/60"><For each={ledger()?.items ?? []}>{(line) => <div class="flex justify-between gap-3 py-3 text-sm"><div><p class="font-medium">{t(`meals.ledger.${line.kind}` as never)}</p><p class="text-xs text-muted-foreground">{line.note || line.method || "—"} · {formatDateTime(line.created_at, locale())}</p></div><span class="font-semibold tabular-nums">{line.kind === "charge" ? "−" : "+"}{formatTry(line.amount_minor, moneyLocale())}</span></div>}</For></div><Show when={(ledger()?.items.length ?? 0) === 0}><p class="mt-3 text-sm text-muted-foreground">{t("meals.noLedger")}</p></Show></section></Show> | |
| 243 | - <section class="data-shell p-4"><h2 class="font-semibold">{t("meals.attendance")}</h2><div class="mt-3 divide-y divide-border/60"><For each={attendance()?.items ?? []}>{(row) => <div class="flex justify-between gap-3 py-3 text-sm"><span>{row.status}</span><span class="text-muted-foreground">{formatDateTime(row.marked_at, locale())}</span></div>}</For></div></section> | |
| 242 | + <Show when={canReadMoney()}><section class="data-shell p-4"><h2 class="font-semibold text-text-strong">{t("meals.ledger")}</h2><div class="mt-3 divide-y divide-border-hairline"><For each={ledger()?.items ?? []}>{(line) => <div class="flex justify-between gap-3 py-3 text-sm"><div><p class="font-medium">{t(`meals.ledger.${line.kind}` as never)}</p><p class="text-xs text-text-subtle">{line.note || line.method || "—"} · {formatDateTime(line.created_at, locale())}</p></div><span class="font-semibold tabular-nums">{line.kind === "charge" ? "−" : "+"}{formatTry(line.amount_minor, moneyLocale())}</span></div>}</For></div><Show when={(ledger()?.items.length ?? 0) === 0}><p class="mt-3 text-sm text-text-subtle">{t("meals.noLedger")}</p></Show></section></Show> | |
| 243 | + <section class="data-shell p-4"><h2 class="font-semibold text-text-strong">{t("meals.attendance")}</h2><div class="mt-3 divide-y divide-border-hairline"><For each={attendance()?.items ?? []}>{(row) => <div class="flex justify-between gap-3 py-3 text-sm"><span>{row.status}</span><span class="text-text-subtle">{formatDateTime(row.marked_at, locale())}</span></div>}</For></div></section> | |
| 244 | 244 | </TabsContent> |
| 245 | 245 | |
| 246 | 246 | <TabsContent value="service" class="space-y-4"> |
| 247 | 247 | <div class="data-shell p-4"> |
| 248 | - <h2 class="font-semibold">{t("meals.walkIn")}</h2> | |
| 248 | + <h2 class="font-semibold text-text-strong">{t("meals.walkIn")}</h2> | |
| 249 | 249 | <div class="mt-3 flex flex-col gap-2 sm:flex-row sm:items-end"><div class="min-w-0 flex-1"><UserSearchSelect id="meal-walkin" value={walkIn()} onChange={setWalkIn} placeholder={t("form.selectStudent")} /></div><Button disabled={!walkIn() || pending()} onClick={() => void run(async () => { await postMealAttendance(id(), walkIn(), "served"); setWalkIn(""); await refetchService(); })}>{t("meals.served")}</Button></div> |
| 250 | 250 | </div> |
| 251 | 251 | <Show when={serviceAttendance.error || serviceBookings.error}><ErrorAlert message={formatApiError(serviceAttendance.error || serviceBookings.error)} onRetry={() => void refetchService()} /></Show> |
| 252 | 252 | <div class="space-y-2"> |
| 253 | - <For each={serviceEntries()}>{(entry) => <div class="data-shell flex flex-wrap items-center justify-between gap-3 p-3"><div><p class="font-medium">{personLabel(entry.student)}</p><p class="text-xs text-muted-foreground">{entry.booking ? t("meals.booked") : t("meals.walkIn")} · {entry.attendance?.status ?? t("meals.notMarked")}</p></div><div class="flex gap-2"><Button size="sm" variant={entry.attendance?.status === "served" ? "default" : "outline"} onClick={() => void run(async () => { await postMealAttendance(id(), entry.student.id, "served"); await refetchService(); })}>{t("meals.served")}</Button><Button size="sm" variant={entry.attendance?.status === "missed" ? "destructive" : "outline"} onClick={() => void run(async () => { await postMealAttendance(id(), entry.student.id, "missed"); await refetchService(); })}>{t("meals.missed")}</Button><Show when={canManage() && entry.booking?.status === "booked"}><Button size="sm" variant="ghost" class="text-destructive" onClick={() => setCancelBooking(entry.booking)}>{t("meals.cancelBooking")}</Button></Show></div></div>}</For> | |
| 253 | + <For each={serviceEntries()}>{(entry) => <div class="data-shell flex flex-wrap items-center justify-between gap-3 p-3"><div><p class="font-medium">{personLabel(entry.student)}</p><p class="text-xs text-text-subtle">{entry.booking ? t("meals.booked") : t("meals.walkIn")} · {entry.attendance?.status ?? t("meals.notMarked")}</p></div><div class="flex gap-2"><Button size="sm" variant={entry.attendance?.status === "served" ? "default" : "outline"} onClick={() => void run(async () => { await postMealAttendance(id(), entry.student.id, "served"); await refetchService(); })}>{t("meals.served")}</Button><Button size="sm" variant={entry.attendance?.status === "missed" ? "destructive" : "outline"} onClick={() => void run(async () => { await postMealAttendance(id(), entry.student.id, "missed"); await refetchService(); })}>{t("meals.missed")}</Button><Show when={canManage() && entry.booking?.status === "booked"}><Button size="sm" variant="ghost" class="text-destructive" onClick={() => setCancelBooking(entry.booking)}>{t("meals.cancelBooking")}</Button></Show></div></div>}</For> | |
| 254 | 254 | </div> |
| 255 | 255 | </TabsContent> |
| 256 | 256 | |
| 257 | 257 | <TabsContent value="manage" class="space-y-5"> |
| 258 | - <div class="flex justify-end"><Button size="sm" onClick={() => openDish()}><IconPlus class="h-4 w-4" />{t("meals.addDish")}</Button></div> | |
| 258 | + <div class="flex justify-end"><Button size="sm" class="rounded-lg" onClick={() => openDish()}><IconPlus class="h-4 w-4" />{t("meals.addDish")}</Button></div> | |
| 259 | 259 | <section class="data-shell space-y-4 p-4"> |
| 260 | - <h2 class="font-semibold">{t("meals.studentRecord")}</h2> | |
| 260 | + <h2 class="font-semibold text-text-strong">{t("meals.studentRecord")}</h2> | |
| 261 | 261 | <UserSearchSelect id="meal-record-user" role="student" value={lookupStudent()} onChange={setLookupStudent} label={t("meals.student")} /> |
| 262 | 262 | <Show when={lookupStudent()}> |
| 263 | 263 | <div class="space-y-3"> |
| 264 | - <div class="flex flex-wrap gap-2"><For each={settings()?.dietary_tags ?? []}>{(tag) => <label class="flex items-center gap-2 rounded-lg border px-3 py-2 text-sm"><input type="checkbox" checked={profileTags().includes(tag)} onChange={() => toggleTag(tag, profileTags(), setProfileTags)} />{tag}</label>}</For></div> | |
| 264 | + <div class="flex flex-wrap gap-2"><For each={settings()?.dietary_tags ?? []}>{(tag) => <label class="flex items-center gap-2 rounded-lg border border-border-line px-3 py-2 text-sm"><input type="checkbox" checked={profileTags().includes(tag)} onChange={() => toggleTag(tag, profileTags(), setProfileTags)} />{tag}</label>}</For></div> | |
| 265 | 265 | <Textarea maxlength={limits()?.meal.max_dietary_note_len} value={profileNote()} placeholder={t("meals.dietaryNote")} onInput={(e) => setProfileNote(e.currentTarget.value)} /> |
| 266 | 266 | <Button disabled={pending()} onClick={() => void run(async () => { await patchDietaryProfileByUserId(lookupStudent(), { tags: profileTags(), note: profileNote().trim() || null }); await refetchProfile(); })}>{t("common.save")}</Button> |
| 267 | 267 | </div> |
| 268 | 268 | </Show> |
| 269 | 269 | </section> |
| 270 | - <section class="data-shell p-4"><h2 class="font-semibold">{t("meals.bookingAudit")}</h2><div class="mt-3 divide-y divide-border/60"><For each={audit()?.items ?? []}>{(booking) => <div class="flex justify-between gap-3 py-3 text-sm"><span>{personLabel(booking.student)}</span><Badge variant={booking.status === "booked" ? "default" : "secondary"}>{booking.status}</Badge></div>}</For></div></section> | |
| 270 | + <section class="data-shell p-4"><h2 class="font-semibold text-text-strong">{t("meals.bookingAudit")}</h2><div class="mt-3 divide-y divide-border-hairline"><For each={audit()?.items ?? []}>{(booking) => <div class="flex justify-between gap-3 py-3 text-sm"><span>{personLabel(booking.student)}</span><Badge variant={booking.status === "booked" ? "default" : "secondary"}>{booking.status}</Badge></div>}</For></div></section> | |
| 271 | 271 | <Show when={isAdmin()}> |
| 272 | - <section class="data-shell space-y-3 p-4"><h2 class="font-semibold">{t("meals.recordCredit")}</h2><p class="text-sm text-muted-foreground">{t("meals.creditAppendOnly")}</p><Input type="number" min={0.01} step={0.01} value={creditAmount()} placeholder={t("meals.amountTry")} onInput={(e) => setCreditAmount(e.currentTarget.value)} /><Input maxlength={limits()?.meal.max_ledger_method_len} value={creditMethod()} placeholder={t("meals.method")} onInput={(e) => setCreditMethod(e.currentTarget.value)} /><Textarea maxlength={limits()?.meal.max_ledger_note_len} value={creditNote()} placeholder={t("meals.note")} onInput={(e) => setCreditNote(e.currentTarget.value)} /><Button disabled={!lookupStudent() || pending()} onClick={() => void run(async () => { await postMealCredit({ student_id: lookupStudent(), amount_minor: Math.round(Number(creditAmount()) * 100), method: creditMethod().trim() || undefined, note: creditNote().trim() || undefined }); setCreditAmount(""); setCreditMethod(""); setCreditNote(""); await Promise.all([refetchBalance(), refetchLedger()]); }, t("meals.creditRecorded"))}>{t("meals.recordCredit")}</Button></section> | |
| 272 | + <section class="data-shell space-y-3 p-4"><h2 class="font-semibold text-text-strong">{t("meals.recordCredit")}</h2><p class="text-sm text-text-subtle">{t("meals.creditAppendOnly")}</p><Input type="number" min={0.01} step={0.01} value={creditAmount()} placeholder={t("meals.amountTry")} onInput={(e) => setCreditAmount(e.currentTarget.value)} /><Input maxlength={limits()?.meal.max_ledger_method_len} value={creditMethod()} placeholder={t("meals.method")} onInput={(e) => setCreditMethod(e.currentTarget.value)} /><Textarea maxlength={limits()?.meal.max_ledger_note_len} value={creditNote()} placeholder={t("meals.note")} onInput={(e) => setCreditNote(e.currentTarget.value)} /><Button disabled={!lookupStudent() || pending()} onClick={() => void run(async () => { await postMealCredit({ student_id: lookupStudent(), amount_minor: Math.round(Number(creditAmount()) * 100), method: creditMethod().trim() || undefined, note: creditNote().trim() || undefined }); setCreditAmount(""); setCreditMethod(""); setCreditNote(""); await Promise.all([refetchBalance(), refetchLedger()]); }, t("meals.creditRecorded"))}>{t("meals.recordCredit")}</Button></section> | |
| 273 | 273 | </Show> |
| 274 | 274 | </TabsContent> |
| 275 | 275 | </Tabs> |
| @@ -287,7 +287,7 @@ function MealDetailContent() { | ||
| 287 | 287 | <div class="space-y-1.5"><Label for="dish-name">{t("meals.dishName")}</Label><Input id="dish-name" required maxlength={limits()?.meal.max_dish_name_len} value={dishName()} onInput={(e) => setDishName(e.currentTarget.value)} /></div> |
| 288 | 288 | <div class="space-y-1.5"><Label for="dish-description">{t("form.description")}</Label><Textarea id="dish-description" maxlength={limits()?.meal.max_dish_description_len} value={dishDescription()} onInput={(e) => setDishDescription(e.currentTarget.value)} /></div> |
| 289 | 289 | <div class="space-y-1.5"><Label for="dish-price">{t("meals.priceTry")}</Label><Input id="dish-price" required type="number" min={0} step={0.01} value={dishPrice()} onInput={(e) => setDishPrice(e.currentTarget.value)} /></div> |
| 290 | - <div class="flex flex-wrap gap-2"><For each={settings()?.dietary_tags ?? []}>{(tag) => <label class="flex items-center gap-2 rounded-lg border px-3 py-2 text-sm"><input type="checkbox" checked={dishTags().includes(tag)} onChange={() => toggleTag(tag, dishTags(), setDishTags)} />{tag}</label>}</For></div> | |
| 290 | + <div class="flex flex-wrap gap-2"><For each={settings()?.dietary_tags ?? []}>{(tag) => <label class="flex items-center gap-2 rounded-lg border border-border-line px-3 py-2 text-sm"><input type="checkbox" checked={dishTags().includes(tag)} onChange={() => toggleTag(tag, dishTags(), setDishTags)} />{tag}</label>}</For></div> | |
| 291 | 291 | <Button type="submit" disabled={pending()}>{t("common.save")}</Button> |
| 292 | 292 | </form> |
| 293 | 293 | </SidePanel> |
src/pages/meals-page.tsxmodified+2 -2
| @@ -68,7 +68,7 @@ function MealsContent() { | ||
| 68 | 68 | |
| 69 | 69 | return ( |
| 70 | 70 | <div class="space-y-5"> |
| 71 | - <PageHeader eyebrow={t("nav.group.community")} title={t("meals.title")} description={t("meals.subtitle")} actions={<Show when={canManage()}><Button size="sm" class="min-w-30 rounded-lg" onClick={() => { setNewSlot(settings()?.meal_slots[0]?.name ?? ""); setShowCreate(true); }}><IconPlus class="h-4 w-4" />{t("meals.publish")}</Button></Show>} /> | |
| 71 | + <PageHeader eyebrow={t("nav.group.community")} title={t("meals.title")} description={t("meals.subtitle")} actions={<Show when={canManage()}><Button size="sm" class="min-w-[7.5rem] rounded-lg" onClick={() => { setNewSlot(settings()?.meal_slots[0]?.name ?? ""); setShowCreate(true); }}><IconPlus class="h-4 w-4" />{t("meals.publish")}</Button></Show>} /> | |
| 72 | 72 | <SidePanel open={showCreate()} onOpenChange={setShowCreate} title={t("meals.publish")} description={t("meals.publishHelp")}> |
| 73 | 73 | <form class="space-y-4" onSubmit={publish}> |
| 74 | 74 | <Show when={limits.error}><ErrorAlert message={formatApiError(limits.error)} onRetry={() => void refetchLimits()} /></Show> |
| @@ -76,7 +76,7 @@ function MealsContent() { | ||
| 76 | 76 | <div class="space-y-1.5"><Label for="meal-slot">{t("meals.slot")}</Label><Select id="meal-slot" required value={newSlot()} onChange={(e) => setNewSlot(e.currentTarget.value)}><For each={settings()?.meal_slots ?? []}>{(item) => <option value={item.name}>{item.name}</option>}</For></Select></div> |
| 77 | 77 | <div class="space-y-1.5"><Label for="meal-capacity">{t("meals.capacity")}</Label><Input id="meal-capacity" type="number" min={0} max={limits()?.meal.max_menu_capacity} value={capacity()} onInput={(e) => setCapacity(e.currentTarget.value)} /></div> |
| 78 | 78 | <Show when={error()}><Alert variant="destructive">{error()}</Alert></Show> |
| 79 | - <div class="flex gap-2 border-t pt-4"><Button type="submit" disabled={pending()}>{t("common.create")}</Button><Button type="button" variant="outline" onClick={() => setShowCreate(false)}>{t("common.cancel")}</Button></div> | |
| 79 | + <div class="flex gap-2 border-t border-border-hairline pt-4"><Button type="submit" disabled={pending()}>{t("common.create")}</Button><Button type="button" variant="outline" onClick={() => setShowCreate(false)}>{t("common.cancel")}</Button></div> | |
| 80 | 80 | </form> |
| 81 | 81 | </SidePanel> |
| 82 | 82 | <Show when={flash()}><Alert variant="success">{flash()}</Alert></Show> |
src/pages/messages-page.tsxmodified+11 -12
| @@ -164,21 +164,20 @@ export default function MessagesPage() { | ||
| 164 | 164 | return ( |
| 165 | 165 | <RouteGuard> |
| 166 | 166 | <div class="min-h-[50vh] bg-background sm:min-h-[calc(100vh-7rem)]"> |
| 167 | - <section class="data-shell overflow-hidden p-0 border-none"> | |
| 167 | + <section class="data-shell overflow-hidden p-0"> | |
| 168 | 168 | <div class="flex min-h-[50vh] flex-col sm:min-h-[calc(100vh-7rem)]"> |
| 169 | 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"> | |
| 170 | + <aside class="flex flex-wrap items-center gap-2 border-b border-border-hairline bg-surface-overlay px-3 py-2.5"> | |
| 171 | 171 | {/* Compose Button */} |
| 172 | 172 | <Button |
| 173 | - variant="outline" | |
| 174 | 173 | size="sm" |
| 175 | - class="order-2 ml-auto h-9 shrink-0 rounded-lg text-xs" | |
| 174 | + class="order-2 ml-auto shrink-0 rounded-lg text-xs" | |
| 176 | 175 | onClick={() => { |
| 177 | 176 | setReplyData(null); |
| 178 | 177 | setComposeOpen(true); |
| 179 | 178 | }} |
| 180 | 179 | > |
| 181 | - <IconPlus class="h-5 w-5 text-primary" /> | |
| 180 | + <IconPlus class="h-5 w-5" /> | |
| 182 | 181 | <span>{t("messages.newMessage")}</span> |
| 183 | 182 | </Button> |
| 184 | 183 | |
| @@ -283,13 +282,13 @@ export default function MessagesPage() { | ||
| 283 | 282 | <main class="flex-1 flex flex-col min-w-0 bg-background"> |
| 284 | 283 | {/* Top Header Toolbar */} |
| 285 | 284 | <Show when={!selected()}> |
| 286 | - <div class="flex flex-col gap-2 border-b bg-card/40 px-3 py-2.5 sm:flex-row sm:items-center sm:justify-between sm:px-4 sm:py-3"> | |
| 285 | + <div class="flex flex-col gap-2 border-b border-border-hairline bg-surface-overlay px-3 py-2.5 sm:flex-row sm:items-center sm:justify-between sm:px-4 sm:py-3"> | |
| 287 | 286 | <div class="flex w-full items-center gap-2 sm:max-w-xl"> |
| 288 | 287 | {/* Gmail Refresh Button */} |
| 289 | 288 | <Button |
| 290 | 289 | variant="outline" |
| 291 | 290 | size="sm" |
| 292 | - class="h-9 px-3 rounded-full text-xs font-semibold shrink-0" | |
| 291 | + class="h-8 px-3 rounded-lg text-[13px] font-semibold shrink-0" | |
| 293 | 292 | onClick={handleRefresh} |
| 294 | 293 | disabled={isRefreshing()} |
| 295 | 294 | title={t("messages.refreshList")} |
| @@ -304,9 +303,9 @@ export default function MessagesPage() { | ||
| 304 | 303 | </Button> |
| 305 | 304 | |
| 306 | 305 | <div class="relative w-full"> |
| 307 | - <IconSearch class="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" /> | |
| 306 | + <IconSearch class="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-subtle" /> | |
| 308 | 307 | <Input |
| 309 | - class="h-9 rounded-full bg-muted/40 pl-9 pr-4 text-xs border-none focus-visible:ring-1" | |
| 308 | + class="h-8 rounded-lg bg-surface-tint pl-9 pr-4 text-[13px] border-none focus-visible:ring-1" | |
| 310 | 309 | placeholder={t("messages.search")} |
| 311 | 310 | value={query()} |
| 312 | 311 | onInput={(event) => setQuery(event.currentTarget.value)} |
| @@ -319,7 +318,7 @@ export default function MessagesPage() { | ||
| 319 | 318 | <Button |
| 320 | 319 | variant="outline" |
| 321 | 320 | size="sm" |
| 322 | - class="h-8 rounded-lg text-xs text-destructive hover:bg-destructive/10" | |
| 321 | + class="h-8 rounded-lg text-[13px] text-destructive hover:bg-destructive/10" | |
| 323 | 322 | onClick={handleEmptyTrash} |
| 324 | 323 | > |
| 325 | 324 | <IconTrash class="mr-1.5 h-3.5 w-3.5" /> |
| @@ -328,7 +327,7 @@ export default function MessagesPage() { | ||
| 328 | 327 | </Show> |
| 329 | 328 | |
| 330 | 329 | <Show when={messagePage()}> |
| 331 | - <span class="font-mono text-xs text-muted-foreground shrink-0"> | |
| 330 | + <span class="font-mono text-xs text-text-subtle shrink-0"> | |
| 332 | 331 | {messagePage()!.total > 0 |
| 333 | 332 | ? `${(page() - 1) * limit + 1}-${Math.min(page() * limit, messagePage()!.total)} / ${messagePage()!.total}` |
| 334 | 333 | : "0 / 0"} |
| @@ -400,7 +399,7 @@ export default function MessagesPage() { | ||
| 400 | 399 | </Suspense> |
| 401 | 400 | |
| 402 | 401 | <Show when={messagePage() && messagePage()!.total > limit}> |
| 403 | - <div class="p-4 border-t"> | |
| 402 | + <div class="p-4 border-t border-border-hairline"> | |
| 404 | 403 | <PaginationControls |
| 405 | 404 | page={page()} |
| 406 | 405 | onPageChange={setPage} |
src/pages/payments-page.tsxmodified+28 -19
| @@ -206,8 +206,8 @@ function PaymentsContent() { | ||
| 206 | 206 | if (bal == null) return <span class="text-sm text-muted-foreground">—</span>; |
| 207 | 207 | const inDebt = bal < 0; |
| 208 | 208 | return ( |
| 209 | - <Badge variant="outline" class={inDebt ? "border-red-500/40 bg-red-500/10 text-red-700 dark:text-red-300" : "border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300"}> | |
| 210 | - <span class={`mr-1.5 inline-block h-1.5 w-1.5 rounded-full ${inDebt ? "bg-red-500" : "bg-emerald-500"}`} /> | |
| 209 | + <Badge variant="outline" class={inDebt ? "border-destructive/50 bg-destructive/10 text-destructive" : "border-success/50 bg-success/10 text-success"}> | |
| 210 | + <span class={`mr-1.5 inline-block h-1.5 w-1.5 rounded-full ${inDebt ? "bg-destructive" : "bg-success"}`} /> | |
| 211 | 211 | {inDebt ? t("payments.inDebt") : t("payments.settled")} |
| 212 | 212 | </Badge> |
| 213 | 213 | ); |
| @@ -225,7 +225,10 @@ function PaymentsContent() { | ||
| 225 | 225 | { |
| 226 | 226 | id: "actions", |
| 227 | 227 | header: t("common.actions"), |
| 228 | - meta: { headerClass: "w-28 min-w-28 text-center whitespace-nowrap" }, | |
| 228 | + meta: { | |
| 229 | + headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 230 | + cellClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 231 | + }, | |
| 229 | 232 | cell: (cell) => ( |
| 230 | 233 | <TableRowActions |
| 231 | 234 | label={t("common.actions")} |
| @@ -335,7 +338,10 @@ function PaymentsContent() { | ||
| 335 | 338 | { |
| 336 | 339 | id: "actions", |
| 337 | 340 | header: t("common.actions"), |
| 338 | - meta: { headerClass: "w-28 min-w-28 text-center", cellClass: "text-center" }, | |
| 341 | + meta: { | |
| 342 | + headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 343 | + cellClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 344 | + }, | |
| 339 | 345 | cell: (cell) => ( |
| 340 | 346 | <TableRowActions |
| 341 | 347 | label={t("common.actions")} |
| @@ -417,7 +423,10 @@ function PaymentsContent() { | ||
| 417 | 423 | { |
| 418 | 424 | id: "actions", |
| 419 | 425 | header: t("common.actions"), |
| 420 | - meta: { headerClass: "text-center", cellClass: "text-center" }, | |
| 426 | + meta: { | |
| 427 | + headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 428 | + cellClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 429 | + }, | |
| 421 | 430 | cell: (cell) => ( |
| 422 | 431 | <div class="flex items-center justify-center gap-1"> |
| 423 | 432 | <Button size="sm" variant="outline" class="h-8 gap-1 rounded-lg px-2 text-xs" onClick={() => openAssign(cell.row.original)}> |
| @@ -555,7 +564,7 @@ function PaymentsContent() { | ||
| 555 | 564 | <Show |
| 556 | 565 | when={selectedStudent()} |
| 557 | 566 | fallback={ |
| 558 | - <section class="data-shell space-y-4 border-sky-500/15 bg-sky-500/2.5 p-4"> | |
| 567 | + <section class="data-shell space-y-4 p-4"> | |
| 559 | 568 | <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}> |
| 560 | 569 | <Show when={studentsPage.error}> |
| 561 | 570 | <ErrorAlert message={formatApiError(studentsPage.error)} onRetry={() => void refetchStudents()} /> |
| @@ -609,13 +618,13 @@ function PaymentsContent() { | ||
| 609 | 618 | </Button> |
| 610 | 619 | </div> |
| 611 | 620 | <div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-4"> |
| 612 | - <div class="detail-metric-card"><p class="text-xs uppercase text-muted-foreground">{t("payments.totalDebt")}</p><p class="mt-1 font-semibold tabular-nums">{formatTry(summary().billed, moneyLocale())}</p></div> | |
| 613 | - <div class="detail-metric-card"><p class="text-xs uppercase text-muted-foreground">{t("payments.collected")}</p><p class="mt-1 font-semibold tabular-nums">{formatTry(summary().collected, moneyLocale())}</p></div> | |
| 614 | - <div class="detail-metric-card"><p class="text-xs uppercase text-muted-foreground">{t("payments.balance")}</p><p class="mt-1 font-semibold tabular-nums" classList={{ "text-destructive": summary().balance < 0 }}>{formatTry(summary().balance, moneyLocale())}</p></div> | |
| 615 | - <div class="detail-metric-card"><p class="text-xs uppercase text-muted-foreground">{t("payments.overdueCount")}</p><p class="mt-1 font-semibold tabular-nums" classList={{ "text-destructive": summary().overdue > 0 }}>{summary().overdue}</p></div> | |
| 621 | + <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.totalDebt")}</p><p class="mt-1 font-semibold tabular-nums">{formatTry(summary().billed, moneyLocale())}</p></div> | |
| 622 | + <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.collected")}</p><p class="mt-1 font-semibold tabular-nums">{formatTry(summary().collected, moneyLocale())}</p></div> | |
| 623 | + <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.balance")}</p><p class="mt-1 font-semibold tabular-nums" classList={{ "text-destructive": summary().balance < 0 }}>{formatTry(summary().balance, moneyLocale())}</p></div> | |
| 624 | + <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.overdueCount")}</p><p class="mt-1 font-semibold tabular-nums" classList={{ "text-destructive": summary().overdue > 0 }}>{summary().overdue}</p></div> | |
| 616 | 625 | </div> |
| 617 | 626 | |
| 618 | - <section class="data-shell space-y-4 border-sky-500/15 bg-sky-500/2.5 p-4"> | |
| 627 | + <section class="data-shell space-y-4 p-4"> | |
| 619 | 628 | <Suspense fallback={<DataTableSkeleton columns={5} rows={5} />}> |
| 620 | 629 | <Show when={statement.error}> |
| 621 | 630 | <ErrorAlert message={formatApiError(statement.error)} onRetry={() => void refetchStatement()} /> |
| @@ -687,12 +696,12 @@ function PaymentsContent() { | ||
| 687 | 696 | {/* ---------------- Fee plans ---------------- */} |
| 688 | 697 | <TabsContent value="plans" class="space-y-4"> |
| 689 | 698 | <div class="flex justify-end"> |
| 690 | - <Button type="button" size="sm" class="min-w-30 rounded-lg" onClick={openCreate}> | |
| 699 | + <Button type="button" size="sm" class="min-w-[7.5rem] rounded-lg" onClick={openCreate}> | |
| 691 | 700 | <IconPlus class="h-4 w-4" /> |
| 692 | 701 | {t("payments.createPlan")} |
| 693 | 702 | </Button> |
| 694 | 703 | </div> |
| 695 | - <section class="data-shell space-y-4 border-sky-500/15 bg-sky-500/2.5 p-4"> | |
| 704 | + <section class="data-shell space-y-4 p-4"> | |
| 696 | 705 | <Suspense fallback={<DataTableSkeleton columns={4} rows={6} />}> |
| 697 | 706 | <Show when={plans.error}> |
| 698 | 707 | <ErrorAlert message={formatApiError(plans.error)} onRetry={() => void refetchPlans()} /> |
| @@ -808,8 +817,8 @@ function PaymentsContent() { | ||
| 808 | 817 | <Textarea id="collect-note" maxlength={500} value={collectNote()} onInput={(e) => setCollectNote(e.currentTarget.value)} /> |
| 809 | 818 | </div> |
| 810 | 819 | <div class="flex flex-wrap items-center gap-2"> |
| 811 | - <Button type="button" variant="outline" class="h-10 rounded-lg" onClick={() => setCollectEntry(null)}>{t("common.cancel")}</Button> | |
| 812 | - <Button type="submit" class="h-10 rounded-lg" disabled={pending()}>{t("payments.collect")}</Button> | |
| 820 | + <Button type="button" variant="outline" onClick={() => setCollectEntry(null)}>{t("common.cancel")}</Button> | |
| 821 | + <Button type="submit" disabled={pending()}>{t("payments.collect")}</Button> | |
| 813 | 822 | </div> |
| 814 | 823 | </form> |
| 815 | 824 | </SidePanel> |
| @@ -836,8 +845,8 @@ function PaymentsContent() { | ||
| 836 | 845 | <Textarea id="correction-note" maxlength={500} value={actionNote()} onInput={(e) => setActionNote(e.currentTarget.value)} /> |
| 837 | 846 | </div> |
| 838 | 847 | <div class="flex flex-wrap items-center gap-2"> |
| 839 | - <Button type="button" variant="outline" class="h-10 rounded-lg" onClick={() => setLineAction(null)}>{t("common.cancel")}</Button> | |
| 840 | - <Button type="submit" class="h-10 rounded-lg" disabled={pending()}>{t("common.save")}</Button> | |
| 848 | + <Button type="button" variant="outline" onClick={() => setLineAction(null)}>{t("common.cancel")}</Button> | |
| 849 | + <Button type="submit" disabled={pending()}>{t("common.save")}</Button> | |
| 841 | 850 | </div> |
| 842 | 851 | </form> |
| 843 | 852 | </SidePanel> |
| @@ -881,8 +890,8 @@ function PaymentsContent() { | ||
| 881 | 890 | </Index> |
| 882 | 891 | </div> |
| 883 | 892 | <div class="flex flex-wrap items-center gap-2"> |
| 884 | - <Button type="button" variant="outline" class="h-10 rounded-lg" onClick={() => setPanelOpen(false)}>{t("common.cancel")}</Button> | |
| 885 | - <Button type="submit" class="h-10 rounded-lg" disabled={pending()}>{editing() ? t("common.update") : t("common.create")}</Button> | |
| 893 | + <Button type="button" variant="outline" onClick={() => setPanelOpen(false)}>{t("common.cancel")}</Button> | |
| 894 | + <Button type="submit" disabled={pending()}>{editing() ? t("common.update") : t("common.create")}</Button> | |
| 886 | 895 | </div> |
| 887 | 896 | </form> |
| 888 | 897 | </SidePanel> |
src/pages/question-bank-page.tsxmodified+7 -4
| @@ -145,7 +145,7 @@ function QuestionBankContent() { | ||
| 145 | 145 | </Badge> |
| 146 | 146 | } |
| 147 | 147 | > |
| 148 | - <Badge variant="outline" class="gap-1 whitespace-nowrap border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300"> | |
| 148 | + <Badge variant="outline" class="gap-1 whitespace-nowrap border-success/50 bg-success/10 text-success"> | |
| 149 | 149 | <IconUsers class="h-3 w-3" /> |
| 150 | 150 | {t("bank.sharedWithSchool")} |
| 151 | 151 | </Badge> |
| @@ -155,7 +155,10 @@ function QuestionBankContent() { | ||
| 155 | 155 | { |
| 156 | 156 | id: "actions", |
| 157 | 157 | header: t("common.actions"), |
| 158 | - meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap", cellClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" }, | |
| 158 | + meta: { | |
| 159 | + headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 160 | + cellClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 161 | + }, | |
| 159 | 162 | cell: (cell) => ( |
| 160 | 163 | <TableRowActions |
| 161 | 164 | label={t("common.actions")} |
| @@ -198,7 +201,7 @@ function QuestionBankContent() { | ||
| 198 | 201 | <Alert variant="destructive">{error()}</Alert> |
| 199 | 202 | </Show> |
| 200 | 203 | |
| 201 | - <section class="data-shell space-y-4 border-sky-500/15 bg-sky-500/2.5 p-4"> | |
| 204 | + <section class="data-shell space-y-4 p-4"> | |
| 202 | 205 | <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}> |
| 203 | 206 | <Show when={list.error}> |
| 204 | 207 | <Alert variant="destructive">{formatApiError(list.error)}</Alert> |
| @@ -208,7 +211,7 @@ function QuestionBankContent() { | ||
| 208 | 211 | description={`${t("bank.subtitle")} ${t("bank.countTotal", { total: total() })}`} |
| 209 | 212 | actions={ |
| 210 | 213 | <Show when={manageableCourses().length > 0}> |
| 211 | - <Button type="button" size="sm" class="min-w-30 rounded-lg" onClick={() => setCreateOpen(true)}> | |
| 214 | + <Button type="button" size="sm" class="min-w-[7.5rem] rounded-lg" onClick={() => setCreateOpen(true)}> | |
| 212 | 215 | <IconPlus class="h-4 w-4" /> |
| 213 | 216 | {t("bank.create")} |
| 214 | 217 | </Button> |
src/pages/register-page.tsxmodified+23 -1
| @@ -21,6 +21,10 @@ export default function RegisterPage() { | ||
| 21 | 21 | function RegisterForm() { |
| 22 | 22 | const navigate = useNavigate(); |
| 23 | 23 | const t = useT(); |
| 24 | + // Backend slug bounds (hezarfen_backend MIN_SLUG_LEN / MAX_SLUG_LEN). | |
| 25 | + const MIN_SCHOOL_SLUG_LEN = 2; | |
| 26 | + const MAX_SCHOOL_SLUG_LEN = 32; | |
| 27 | + const [school, setSchool] = createSignal(""); | |
| 24 | 28 | const [username, setUsername] = createSignal(""); |
| 25 | 29 | const [password, setPassword] = createSignal(""); |
| 26 | 30 | const [confirmPassword, setConfirmPassword] = createSignal(""); |
| @@ -31,9 +35,14 @@ function RegisterForm() { | ||
| 31 | 35 | |
| 32 | 36 | const handleSubmit = async (e: SubmitEvent) => { |
| 33 | 37 | e.preventDefault(); |
| 38 | + const s = school().trim(); | |
| 34 | 39 | const u = username().trim(); |
| 35 | 40 | const p = password(); |
| 36 | 41 | const cp = confirmPassword(); |
| 42 | + if (s.length < MIN_SCHOOL_SLUG_LEN || s.length > MAX_SCHOOL_SLUG_LEN) { | |
| 43 | + setError(t("auth.schoolHint")); | |
| 44 | + return; | |
| 45 | + } | |
| 37 | 46 | const userLimits = limits()?.user; |
| 38 | 47 | if (userLimits && (u.length < userLimits.min_username_len || u.length > userLimits.max_username_len)) { |
| 39 | 48 | setError(t("auth.usernameHint")); |
| @@ -50,7 +59,7 @@ function RegisterForm() { | ||
| 50 | 59 | setError(""); |
| 51 | 60 | setPending(true); |
| 52 | 61 | try { |
| 53 | - await postRegister({ username: u, password: p }); | |
| 62 | + await postRegister({ school: s, username: u, password: p }); | |
| 54 | 63 | void navigate({ to: "/login" }); |
| 55 | 64 | } catch (err) { |
| 56 | 65 | setError(formatApiError(err)); |
| @@ -68,6 +77,19 @@ function RegisterForm() { | ||
| 68 | 77 | </div> |
| 69 | 78 | |
| 70 | 79 | <form class="space-y-5" onSubmit={handleSubmit}> |
| 80 | + <div class="space-y-2"> | |
| 81 | + <Label for="register-school">{t("auth.school")}</Label> | |
| 82 | + <Input | |
| 83 | + id="register-school" | |
| 84 | + class="h-9" | |
| 85 | + minlength={MIN_SCHOOL_SLUG_LEN} | |
| 86 | + maxlength={MAX_SCHOOL_SLUG_LEN} | |
| 87 | + required | |
| 88 | + value={school()} | |
| 89 | + onInput={(e) => setSchool(e.currentTarget.value)} | |
| 90 | + /> | |
| 91 | + </div> | |
| 92 | + | |
| 71 | 93 | <div class="space-y-2"> |
| 72 | 94 | <Label for="register-username">{t("auth.username")}</Label> |
| 73 | 95 | <Input |
src/pages/settings-page.tsxmodified+9 -9
| @@ -167,12 +167,12 @@ function SettingsContent() { | ||
| 167 | 167 | <span class="text-xs text-muted-foreground">{t("settings.unsaved")}</span> |
| 168 | 168 | </Show> |
| 169 | 169 | <Show when={saved() && !dirty()}> |
| 170 | - <span class="text-xs text-emerald-700 dark:text-emerald-300">{t("settings.saved")}</span> | |
| 170 | + <span class="text-xs text-success">{t("settings.saved")}</span> | |
| 171 | 171 | </Show> |
| 172 | 172 | <Button |
| 173 | 173 | type="button" |
| 174 | 174 | size="sm" |
| 175 | - class="min-w-30 rounded-lg" | |
| 175 | + class="min-w-[7.5rem] rounded-lg" | |
| 176 | 176 | disabled={pending() || !dirty()} |
| 177 | 177 | onClick={() => void save()} |
| 178 | 178 | > |
| @@ -211,7 +211,7 @@ function SettingsContent() { | ||
| 211 | 211 | <h2 class="text-base font-semibold">{t("settings.examKinds")}</h2> |
| 212 | 212 | <p class="mt-0.5 text-xs leading-relaxed text-muted-foreground">{t("settings.examKindsHelp")}</p> |
| 213 | 213 | </div> |
| 214 | - <Badge variant="secondary" class="mono shrink-0 rounded-sm tabular-nums"> | |
| 214 | + <Badge variant="secondary" class="mono shrink-0 tabular-nums"> | |
| 215 | 215 | {examKinds().length} |
| 216 | 216 | </Badge> |
| 217 | 217 | </div> |
| @@ -293,7 +293,7 @@ function SettingsContent() { | ||
| 293 | 293 | <h2 class="text-base font-semibold">{t("settings.attendanceStatuses")}</h2> |
| 294 | 294 | <p class="mt-0.5 text-xs leading-relaxed text-muted-foreground">{t("settings.attendanceHelp")}</p> |
| 295 | 295 | </div> |
| 296 | - <Badge variant="secondary" class="mono shrink-0 rounded-sm tabular-nums"> | |
| 296 | + <Badge variant="secondary" class="mono shrink-0 tabular-nums"> | |
| 297 | 297 | {attendanceStatuses().length} |
| 298 | 298 | </Badge> |
| 299 | 299 | </div> |
| @@ -382,7 +382,7 @@ function SettingsContent() { | ||
| 382 | 382 | <h2 class="text-base font-semibold">{t("settings.gradeBands")}</h2> |
| 383 | 383 | <p class="mt-0.5 text-xs leading-relaxed text-muted-foreground">{t("settings.gradeBandsHelp")}</p> |
| 384 | 384 | </div> |
| 385 | - <Badge variant="secondary" class="mono shrink-0 rounded-sm tabular-nums"> | |
| 385 | + <Badge variant="secondary" class="mono shrink-0 tabular-nums"> | |
| 386 | 386 | {gradeBands().length} |
| 387 | 387 | </Badge> |
| 388 | 388 | </div> |
| @@ -469,7 +469,7 @@ function SettingsContent() { | ||
| 469 | 469 | </div> |
| 470 | 470 | <div class="space-y-1.5"> |
| 471 | 471 | <Label for="meal-cutoff" class="text-[11px] font-medium uppercase tracking-wide text-muted-foreground">{t("settings.mealCutoff")}</Label> |
| 472 | - <Input id="meal-cutoff" class="h-10 rounded-md text-right font-mono" type="number" min={0} max={limits()?.meal.max_cancel_cutoff_minutes} value={mealCutoff()} placeholder={t("settings.noCutoff")} onInput={(e) => setMealCutoff(e.currentTarget.value)} /> | |
| 472 | + <Input id="meal-cutoff" class="h-9 rounded-md text-right font-mono" type="number" min={0} max={limits()?.meal.max_cancel_cutoff_minutes} value={mealCutoff()} placeholder={t("settings.noCutoff")} onInput={(e) => setMealCutoff(e.currentTarget.value)} /> | |
| 473 | 473 | </div> |
| 474 | 474 | </div> |
| 475 | 475 | </section> |
| @@ -479,7 +479,7 @@ function SettingsContent() { | ||
| 479 | 479 | <header class="border-b border-border/70 px-4 py-3"> |
| 480 | 480 | <div class="flex items-start justify-between gap-3"> |
| 481 | 481 | <h2 class="text-base font-semibold">{t("settings.mealSlot")}</h2> |
| 482 | - <Badge variant="secondary" class="mono shrink-0 rounded-sm tabular-nums">{mealSlots().length}</Badge> | |
| 482 | + <Badge variant="secondary" class="mono shrink-0 tabular-nums">{mealSlots().length}</Badge> | |
| 483 | 483 | </div> |
| 484 | 484 | </header> |
| 485 | 485 | <div class="flex-1 space-y-2 p-4"> |
| @@ -522,7 +522,7 @@ function SettingsContent() { | ||
| 522 | 522 | <header class="border-b border-border/70 px-4 py-3"> |
| 523 | 523 | <div class="flex items-start justify-between gap-3"> |
| 524 | 524 | <h2 class="text-base font-semibold">{t("settings.dietaryTags")}</h2> |
| 525 | - <Badge variant="secondary" class="mono shrink-0 rounded-sm tabular-nums">{dietaryTags().length}</Badge> | |
| 525 | + <Badge variant="secondary" class="mono shrink-0 tabular-nums">{dietaryTags().length}</Badge> | |
| 526 | 526 | </div> |
| 527 | 527 | </header> |
| 528 | 528 | <div class="flex-1 space-y-2 p-4"> |
| @@ -562,7 +562,7 @@ function SettingsContent() { | ||
| 562 | 562 | </div> |
| 563 | 563 | <Input |
| 564 | 564 | aria-label={t("settings.maxFileSize")} |
| 565 | - class="h-10 rounded-md text-right font-mono" | |
| 565 | + class="h-9 rounded-md text-right font-mono" | |
| 566 | 566 | type="number" |
| 567 | 567 | min={(limits()?.file.min_max_file_bytes ?? 1024) / BYTES_PER_MIB} |
| 568 | 568 | max={(limits()?.file.max_max_file_bytes ?? 25 * BYTES_PER_MIB) / BYTES_PER_MIB} |
src/pages/staff-work-page.tsxmodified+16 -10
| @@ -128,7 +128,10 @@ function StaffWorkContent() { | ||
| 128 | 128 | { |
| 129 | 129 | id: "actions", |
| 130 | 130 | header: t("common.actions"), |
| 131 | - meta: { headerClass: "w-28 min-w-28 text-center whitespace-nowrap" }, | |
| 131 | + meta: { | |
| 132 | + headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 133 | + cellClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 134 | + }, | |
| 132 | 135 | cell: (cell) => ( |
| 133 | 136 | <TableRowActions |
| 134 | 137 | label={t("common.actions")} |
| @@ -168,12 +171,15 @@ function StaffWorkContent() { | ||
| 168 | 171 | { |
| 169 | 172 | id: "status", |
| 170 | 173 | header: t("work.status"), |
| 171 | - cell: (cell) => <Badge variant={cell.row.original.check_out == null ? "default" : "secondary"} class="rounded-sm">{cell.row.original.check_out == null ? t("work.open") : t("work.closed")}</Badge>, | |
| 174 | + cell: (cell) => <Badge variant={cell.row.original.check_out == null ? "default" : "secondary"}>{cell.row.original.check_out == null ? t("work.open") : t("work.closed")}</Badge>, | |
| 172 | 175 | }, |
| 173 | 176 | { |
| 174 | 177 | id: "actions", |
| 175 | 178 | header: t("common.actions"), |
| 176 | - meta: { headerClass: "w-28 min-w-28 text-center whitespace-nowrap" }, | |
| 179 | + meta: { | |
| 180 | + headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 181 | + cellClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 182 | + }, | |
| 177 | 183 | cell: (cell) => ( |
| 178 | 184 | <TableRowActions |
| 179 | 185 | label={t("common.actions")} |
| @@ -243,7 +249,7 @@ function StaffWorkContent() { | ||
| 243 | 249 | <Alert variant="success">{flash()}</Alert> |
| 244 | 250 | </Show> |
| 245 | 251 | |
| 246 | - <section class="data-shell space-y-4 border-sky-500/15 bg-sky-500/2.5 p-4"> | |
| 252 | + <section class="data-shell space-y-4 p-4"> | |
| 247 | 253 | <Show when={error() && !viewUser() && !editTarget()}> |
| 248 | 254 | <Alert variant="destructive">{error()}</Alert> |
| 249 | 255 | </Show> |
| @@ -315,22 +321,22 @@ function StaffWorkContent() { | ||
| 315 | 321 | <div class="space-y-1.5"> |
| 316 | 322 | <Label>{t("work.checkIn")}</Label> |
| 317 | 323 | <div class="grid grid-cols-2 gap-2"> |
| 318 | - <DatePicker id="staff-check-in-date" class="h-10" placeholder={t("form.datePlaceholder")} value={checkInDate()} required onChange={setCheckInDate} /> | |
| 319 | - <Input class="h-10 rounded-sm font-mono" placeholder="09:00" value={checkInTime()} required onInput={(e) => setCheckInTime(e.currentTarget.value)} /> | |
| 324 | + <DatePicker id="staff-check-in-date" class="h-9" placeholder={t("form.datePlaceholder")} value={checkInDate()} required onChange={setCheckInDate} /> | |
| 325 | + <Input class="h-9 rounded-md font-mono" placeholder="09:00" value={checkInTime()} required onInput={(e) => setCheckInTime(e.currentTarget.value)} /> | |
| 320 | 326 | </div> |
| 321 | 327 | </div> |
| 322 | 328 | <div class="space-y-1.5"> |
| 323 | 329 | <Label>{t("work.checkOut")}</Label> |
| 324 | 330 | <div class="grid grid-cols-2 gap-2"> |
| 325 | - <DatePicker id="staff-check-out-date" class="h-10" placeholder={t("form.datePlaceholder")} value={checkOutDate()} required onChange={setCheckOutDate} /> | |
| 326 | - <Input class="h-10 rounded-sm font-mono" placeholder="17:00" value={checkOutTime()} required onInput={(e) => setCheckOutTime(e.currentTarget.value)} /> | |
| 331 | + <DatePicker id="staff-check-out-date" class="h-9" placeholder={t("form.datePlaceholder")} value={checkOutDate()} required onChange={setCheckOutDate} /> | |
| 332 | + <Input class="h-9 rounded-md font-mono" placeholder="17:00" value={checkOutTime()} required onInput={(e) => setCheckOutTime(e.currentTarget.value)} /> | |
| 327 | 333 | </div> |
| 328 | 334 | </div> |
| 329 | 335 | <div class="flex flex-wrap gap-2"> |
| 330 | - <Button type="button" variant="outline" class="h-10 rounded-lg" onClick={() => setEditTarget(null)}> | |
| 336 | + <Button type="button" variant="outline" onClick={() => setEditTarget(null)}> | |
| 331 | 337 | {t("common.cancel")} |
| 332 | 338 | </Button> |
| 333 | - <Button type="submit" class="h-10 rounded-lg" disabled={pending() || !checkInDate().trim() || !checkInTime().trim() || !checkOutDate().trim() || !checkOutTime().trim()}> | |
| 339 | + <Button type="submit" disabled={pending() || !checkInDate().trim() || !checkInTime().trim() || !checkOutDate().trim() || !checkOutTime().trim()}> | |
| 334 | 340 | {t("common.update")} |
| 335 | 341 | </Button> |
| 336 | 342 | </div> |
src/pages/student-attendance-page.tsxmodified+5 -2
| @@ -79,7 +79,10 @@ function StudentAttendanceContent() { | ||
| 79 | 79 | { |
| 80 | 80 | id: "actions", |
| 81 | 81 | header: t("common.actions"), |
| 82 | - meta: { headerClass: "w-28 min-w-28 text-center whitespace-nowrap" }, | |
| 82 | + meta: { | |
| 83 | + headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 84 | + cellClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 85 | + }, | |
| 83 | 86 | cell: (cell) => ( |
| 84 | 87 | <TableRowActions |
| 85 | 88 | label={t("common.actions")} |
| @@ -100,7 +103,7 @@ function StudentAttendanceContent() { | ||
| 100 | 103 | |
| 101 | 104 | return ( |
| 102 | 105 | <div class="space-y-6"> |
| 103 | - <section class="data-shell space-y-4 border-sky-500/15 bg-sky-500/2.5 p-4"> | |
| 106 | + <section class="data-shell space-y-4 p-4"> | |
| 104 | 107 | <Show when={error() && !viewUser()}> |
| 105 | 108 | <Alert variant="destructive">{error()}</Alert> |
| 106 | 109 | </Show> |
src/pages/student-marks-page.tsxmodified+6 -4
| @@ -19,8 +19,7 @@ import { useT } from "@/stores/preferences-context"; | ||
| 19 | 19 | const PAGE_SIZE = 10; |
| 20 | 20 | const round = (n: number) => (Math.round(n * 100) / 100).toString(); |
| 21 | 21 | // ponytail: display-only color tiers (70/40 on a 0-100 scale), not a pass/fail rule |
| 22 | -const avgTone = (v: number) => | |
| 23 | - v >= 70 ? "text-emerald-600 dark:text-emerald-400" : v >= 40 ? "text-amber-600 dark:text-amber-400" : "text-red-600 dark:text-red-400"; | |
| 22 | +const avgTone = (v: number) => (v >= 70 ? "text-success" : v >= 40 ? "text-warning" : "text-destructive"); | |
| 24 | 23 | |
| 25 | 24 | export default function StudentMarksPage() { |
| 26 | 25 | return ( |
| @@ -135,7 +134,10 @@ function StudentMarksContent() { | ||
| 135 | 134 | { |
| 136 | 135 | id: "actions", |
| 137 | 136 | header: t("common.actions"), |
| 138 | - meta: { headerClass: "w-28 min-w-28 text-center whitespace-nowrap" }, | |
| 137 | + meta: { | |
| 138 | + headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 139 | + cellClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", | |
| 140 | + }, | |
| 139 | 141 | cell: (cell) => ( |
| 140 | 142 | <TableRowActions |
| 141 | 143 | label={t("common.actions")} |
| @@ -156,7 +158,7 @@ function StudentMarksContent() { | ||
| 156 | 158 | |
| 157 | 159 | return ( |
| 158 | 160 | <div class="space-y-6"> |
| 159 | - <section class="data-shell space-y-4 border-sky-500/15 bg-sky-500/2.5 p-4"> | |
| 161 | + <section class="data-shell space-y-4 p-4"> | |
| 160 | 162 | <Show when={error() && !viewUser()}> |
| 161 | 163 | <Alert variant="destructive">{error()}</Alert> |
| 162 | 164 | </Show> |
src/pages/whiteboard-page.tsxmodified+12 -12
| @@ -204,7 +204,7 @@ function WhiteboardContent() { | ||
| 204 | 204 | <IconChevronLeft class="h-4 w-4" /> |
| 205 | 205 | {t("common.back")} |
| 206 | 206 | </Button> |
| 207 | - <Button type="button" variant="outline" size="sm" onClick={() => setHistoryOpen(true)}> | |
| 207 | + <Button type="button" variant="outline" size="sm" class="rounded-lg" onClick={() => setHistoryOpen(true)}> | |
| 208 | 208 | {t("whiteboard.history")} |
| 209 | 209 | </Button> |
| 210 | 210 | <Button type="button" size="sm" class="rounded-lg" onClick={() => setSettingsOpen(true)}> |
| @@ -213,7 +213,7 @@ function WhiteboardContent() { | ||
| 213 | 213 | <Show when={isCreator()}> |
| 214 | 214 | <DropdownMenu placement="bottom-end" gutter={8}> |
| 215 | 215 | <DropdownMenuTrigger |
| 216 | - class="inline-flex h-8 w-8 items-center justify-center rounded-lg border border-border/80 bg-muted/45 text-foreground outline-hidden transition-colors hover:border-primary/30 hover:bg-primary/8 hover:text-primary focus-visible:ring-2 focus-visible:ring-ring data-expanded:border-primary/30 data-expanded:bg-primary/10 data-expanded:text-primary" | |
| 216 | + class="inline-flex h-8 w-8 items-center justify-center rounded-lg border border-border-line bg-surface-tint text-foreground outline-hidden transition-colors hover:border-primary/30 hover:bg-primary/8 hover:text-primary focus-visible:ring-2 focus-visible:ring-ring data-expanded:border-primary/30 data-expanded:bg-primary/10 data-expanded:text-primary" | |
| 217 | 217 | aria-label={t("common.actions")} |
| 218 | 218 | title={t("common.actions")} |
| 219 | 219 | > |
| @@ -230,7 +230,7 @@ function WhiteboardContent() { | ||
| 230 | 230 | {t("whiteboard.clear")} |
| 231 | 231 | </DropdownMenuItem> |
| 232 | 232 | <DropdownMenuSeparator /> |
| 233 | - <DropdownMenuItem class="text-amber-700 focus:bg-amber-500/10 focus:text-amber-800 data-highlighted:bg-amber-500/10 data-highlighted:text-amber-800 dark:text-amber-400" disabled={busy()} onSelect={() => setTimeout(() => setCloseOpen(true), 0)}> | |
| 233 | + <DropdownMenuItem class="text-warning focus:bg-warning/10 focus:text-warning data-highlighted:bg-warning/10 data-highlighted:text-warning" disabled={busy()} onSelect={() => setTimeout(() => setCloseOpen(true), 0)}> | |
| 234 | 234 | <IconLock class="h-4 w-4" /> |
| 235 | 235 | {t("whiteboard.close")} |
| 236 | 236 | </DropdownMenuItem> |
| @@ -259,20 +259,20 @@ function WhiteboardContent() { | ||
| 259 | 259 | onConnectionChange={setConnection} |
| 260 | 260 | onDeleted={() => navigate({ to: "/whiteboards" })} |
| 261 | 261 | /> |
| 262 | - <aside class="overflow-hidden rounded-2xl border border-border/70 bg-card shadow-xs"> | |
| 263 | - <div class="space-y-2 border-b border-border/70 bg-muted/30 px-4 py-3"> | |
| 262 | + <aside class="overflow-hidden rounded-xl border border-border-line bg-surface-base shadow-xs"> | |
| 263 | + <div class="space-y-2 border-b border-border-hairline bg-surface-tint px-4 py-3"> | |
| 264 | 264 | <div class="flex items-center justify-between gap-2"> |
| 265 | - <h3 class="text-sm font-semibold">{t("whiteboard.roster")}</h3> | |
| 266 | - <Badge variant="secondary" class="rounded-full">{roster().length}</Badge> | |
| 265 | + <h3 class="text-sm font-semibold text-text-strong">{t("whiteboard.roster")}</h3> | |
| 266 | + <Badge variant="secondary">{roster().length}</Badge> | |
| 267 | 267 | </div> |
| 268 | 268 | <span class="inline-flex items-center gap-1.5 text-xs font-medium text-muted-foreground"> |
| 269 | 269 | <span class={connection() === "connected" ? "h-2 w-2 rounded-full bg-success" : "h-2 w-2 rounded-full bg-warning"} /> |
| 270 | 270 | {connection() === "connected" ? t("ws.connected") : connection() === "connecting" ? t("ws.connecting") : t("ws.disconnected")} |
| 271 | 271 | </span> |
| 272 | 272 | <div class="flex flex-wrap gap-1.5"> |
| 273 | - <Show when={closed()}><Badge variant="outline" class="rounded-full border-amber-500/40 bg-amber-500/10 text-amber-700">{t("whiteboard.closedBadge")}</Badge></Show> | |
| 274 | - <Show when={locked() && !closed()}><Badge variant="outline" class="rounded-full">{t("whiteboard.lockedBadge")}</Badge></Show> | |
| 275 | - <Show when={!isParticipant()}><Badge variant="outline" class="rounded-full">{t("whiteboard.readOnlyBadge")}</Badge></Show> | |
| 273 | + <Show when={closed()}><Badge variant="warning">{t("whiteboard.closedBadge")}</Badge></Show> | |
| 274 | + <Show when={locked() && !closed()}><Badge variant="outline">{t("whiteboard.lockedBadge")}</Badge></Show> | |
| 275 | + <Show when={!isParticipant()}><Badge variant="outline">{t("whiteboard.readOnlyBadge")}</Badge></Show> | |
| 276 | 276 | </div> |
| 277 | 277 | </div> |
| 278 | 278 | <ul class="space-y-1 p-2"> |
| @@ -286,7 +286,7 @@ function WhiteboardContent() { | ||
| 286 | 286 | <span class="flex min-w-0 items-center gap-1.5"> |
| 287 | 287 | <span class="truncate text-sm font-medium">{nameOf(userId)}</span> |
| 288 | 288 | <Show when={userId === live().creator}> |
| 289 | - <Badge variant="outline" class="shrink-0 rounded-full text-[10px]">{t("whiteboard.creator")}</Badge> | |
| 289 | + <Badge variant="outline" class="shrink-0 text-[10px]">{t("whiteboard.creator")}</Badge> | |
| 290 | 290 | </Show> |
| 291 | 291 | </span> |
| 292 | 292 | <span class="block truncate text-xs text-muted-foreground">{roleOf(userId) || userId}</span> |
| @@ -351,7 +351,7 @@ function WhiteboardContent() { | ||
| 351 | 351 | summary={b().title} |
| 352 | 352 | confirmLabel={t("whiteboard.close")} |
| 353 | 353 | icon={<IconLock class="h-4 w-4" />} |
| 354 | - iconClass="border-amber-500/40 bg-amber-500/10 text-amber-700 dark:text-amber-400" | |
| 354 | + iconClass="border-warning/40 bg-warning/10 text-warning" | |
| 355 | 355 | onConfirm={doClose} |
| 356 | 356 | /> |
| 357 | 357 | <ConfirmDialog |
src/pages/whiteboards-page.tsxmodified+7 -7
| @@ -53,7 +53,7 @@ function WhiteboardsContent() { | ||
| 53 | 53 | title={t("whiteboard.title")} |
| 54 | 54 | description={t("whiteboard.subtitle")} |
| 55 | 55 | actions={ |
| 56 | - <Button type="button" onClick={() => setCreateOpen(true)}> | |
| 56 | + <Button type="button" size="sm" class="min-w-[7.5rem] rounded-lg" onClick={() => setCreateOpen(true)}> | |
| 57 | 57 | <IconPlus class="h-4 w-4" /> |
| 58 | 58 | {t("whiteboard.create")} |
| 59 | 59 | </Button> |
| @@ -112,24 +112,24 @@ function BoardCard(props: { board: Board; isCreator: boolean; onOpen: () => void | ||
| 112 | 112 | return ( |
| 113 | 113 | <button |
| 114 | 114 | type="button" |
| 115 | - class="flex w-full cursor-pointer flex-col gap-3 rounded-xl border border-border/70 bg-card p-4 text-left shadow-xs outline-hidden transition-all hover:-translate-y-0.5 hover:border-primary/35 hover:bg-muted/25 hover:shadow-sm focus-visible:border-primary/50 focus-visible:ring-2 focus-visible:ring-ring active:translate-y-0" | |
| 115 | + class="flex w-full cursor-pointer flex-col gap-3 rounded-xl border border-border-line bg-surface-base p-4 text-left shadow-xs outline-hidden transition-all hover:-translate-y-0.5 hover:border-primary/35 hover:bg-surface-tint focus-visible:border-primary/50 focus-visible:ring-2 focus-visible:ring-ring active:translate-y-0" | |
| 116 | 116 | onClick={props.onOpen} |
| 117 | 117 | > |
| 118 | 118 | <div class="flex items-start justify-between gap-2"> |
| 119 | - <h3 class="min-w-0 truncate font-semibold">{props.board.title}</h3> | |
| 119 | + <h3 class="min-w-0 truncate font-semibold text-text-strong">{props.board.title}</h3> | |
| 120 | 120 | <div class="flex shrink-0 gap-1"> |
| 121 | 121 | <Show when={props.board.closed_at != null}> |
| 122 | - <Badge variant="outline" class="rounded-full text-amber-600">{t("whiteboard.closedBadge")}</Badge> | |
| 122 | + <Badge variant="warning">{t("whiteboard.closedBadge")}</Badge> | |
| 123 | 123 | </Show> |
| 124 | 124 | <Show when={props.board.locked && props.board.closed_at == null}> |
| 125 | - <Badge variant="outline" class="rounded-full">{t("whiteboard.lockedBadge")}</Badge> | |
| 125 | + <Badge variant="outline">{t("whiteboard.lockedBadge")}</Badge> | |
| 126 | 126 | </Show> |
| 127 | 127 | <Show when={props.isCreator}> |
| 128 | - <Badge variant="outline" class="rounded-full">{t("whiteboard.creator")}</Badge> | |
| 128 | + <Badge variant="outline">{t("whiteboard.creator")}</Badge> | |
| 129 | 129 | </Show> |
| 130 | 130 | </div> |
| 131 | 131 | </div> |
| 132 | - <p class="text-xs text-muted-foreground"> | |
| 132 | + <p class="text-xs text-text-subtle"> | |
| 133 | 133 | {t("whiteboard.createdAt")}: {props.createdLabel} · {props.board.participants.length + 1} {t("whiteboard.participants").toLowerCase()} |
| 134 | 134 | </p> |
| 135 | 135 | </button> |
src/pages/work-log-page.tsxmodified+4 -4
| @@ -69,7 +69,7 @@ function WorkLogContent() { | ||
| 69 | 69 | id: "status", |
| 70 | 70 | header: t("work.status"), |
| 71 | 71 | cell: (cell) => ( |
| 72 | - <Badge variant={cell.row.original.check_out == null ? "default" : "secondary"} class="rounded-sm"> | |
| 72 | + <Badge variant={cell.row.original.check_out == null ? "default" : "secondary"}> | |
| 73 | 73 | {cell.row.original.check_out == null ? t("work.open") : t("work.closed")} |
| 74 | 74 | </Badge> |
| 75 | 75 | ), |
| @@ -115,13 +115,13 @@ function WorkLogContent() { | ||
| 115 | 115 | </Show> |
| 116 | 116 | </p> |
| 117 | 117 | </div> |
| 118 | - <Button type="button" size="lg" class="rounded-sm" variant={openEntry() ? "destructive" : "default"} disabled={pending()} onClick={() => void toggle()}> | |
| 118 | + <Button type="button" size="lg" variant={openEntry() ? "destructive" : "default"} disabled={pending()} onClick={() => void toggle()}> | |
| 119 | 119 | {openEntry() ? t("work.checkOut") : t("work.checkIn")} |
| 120 | 120 | </Button> |
| 121 | 121 | </div> |
| 122 | 122 | </section> |
| 123 | 123 | |
| 124 | - <section class="data-shell space-y-4 border-sky-500/15 bg-sky-500/2.5 p-4"> | |
| 124 | + <section class="data-shell space-y-4 p-4"> | |
| 125 | 125 | <Suspense fallback={<PageSpinner />}> |
| 126 | 126 | <Show when={list.error}> |
| 127 | 127 | <ErrorAlert message={formatApiError(list.error)} onRetry={() => void refetch()} /> |
| @@ -132,7 +132,7 @@ function WorkLogContent() { | ||
| 132 | 132 | > |
| 133 | 133 | <DataTable |
| 134 | 134 | title={t("work.entries")} |
| 135 | - actions={<Badge variant="secondary" class="mono rounded-lg px-3 py-1">{total()}</Badge>} | |
| 135 | + actions={<Badge variant="secondary" class="mono px-3 py-1">{total()}</Badge>} | |
| 136 | 136 | columns={columns()} |
| 137 | 137 | data={pageItems()} |
| 138 | 138 | enablePagination |