From 217fc08cfe512ced828e30cb3c627c9682fa0a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Sun, 12 Jul 2026 22:57:22 +0300 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=92=84=20polish=20account,=20mar?= =?UTF-8?q?ks,=20and=20admin=20surfaces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tighten marks report cards, table wrappers, badges, and empty states - refine student mark lookup spacing, error display, and result context - polish admin user table container, role controls, and empty state - align profile form controls, save action, and account detail cards - improve login and register card spacing on smaller screens --- src/components/marks/marks-report-view.tsx | 81 ++++++++++++---------- src/components/users/profile-form.tsx | 18 ++--- src/components/users/user-table.tsx | 46 ++++++------ src/pages/admin-users-page.tsx | 12 ++-- src/pages/login-page.tsx | 4 +- src/pages/marks-page.tsx | 10 ++- src/pages/profile-page.tsx | 15 ++-- src/pages/register-page.tsx | 4 +- src/pages/student-marks-page.tsx | 32 +++++++-- 9 files changed, 132 insertions(+), 90 deletions(-) diff --git a/src/components/marks/marks-report-view.tsx b/src/components/marks/marks-report-view.tsx index af472ad..8876167 100644 --- a/src/components/marks/marks-report-view.tsx +++ b/src/components/marks/marks-report-view.tsx @@ -14,14 +14,14 @@ export function MarksReportView(props: { report: MarksReport }) { 0} fallback={ -
+
{t("marks.empty")}
} >
-
- {t("marks.overall")} +
+ {t("marks.overall")}

{props.report.overall_average == null ? "—" : round(props.report.overall_average)} @@ -32,49 +32,58 @@ export function MarksReportView(props: { report: MarksReport }) { {(block) => ( -

+

{block.course.title}

- + {block.average == null ? "—" : round(block.average)}
- 0} fallback={

{t("exams.noResults")}

}> - - - - {t("marks.exam")} - {t("exams.kind")} - {t("marks.weight")} - {t("marks.mark")} - - - - - {(entry) => ( - - - - {entry.title} - - - - - {examKindLabel(entry.kind, t)} - - - {entry.weight} - {entry.mark} - - )} - - -
+ 0} + fallback={ +

+ {t("exams.noResults")} +

+ } + > +
+ + + + {t("marks.exam")} + {t("exams.kind")} + {t("marks.weight")} + {t("marks.mark")} + + + + + {(entry) => ( + + + + {entry.title} + + + + + {examKindLabel(entry.kind, t)} + + + {entry.weight} + {entry.mark} + + )} + + +
+
)} diff --git a/src/components/users/profile-form.tsx b/src/components/users/profile-form.tsx index 9ac00f2..43de9bc 100644 --- a/src/components/users/profile-form.tsx +++ b/src/components/users/profile-form.tsx @@ -74,31 +74,33 @@ export function ProfileForm(props: { user: User; onSaved: () => void }) { }; return ( -
+
- setName(e.currentTarget.value)} /> + setName(e.currentTarget.value)} />
- setSurname(e.currentTarget.value)} /> + setSurname(e.currentTarget.value)} />
- setEmail(e.currentTarget.value)} /> + setEmail(e.currentTarget.value)} />
- setPhone(e.currentTarget.value)} /> + setPhone(e.currentTarget.value)} />
- setBirthDate(e.currentTarget.value)} /> + setBirthDate(e.currentTarget.value)} /> +
+ {error() &&

{error()}

} +
+
- {error() &&

{error()}

} -
); } diff --git a/src/components/users/user-table.tsx b/src/components/users/user-table.tsx index f82dd2b..8490391 100644 --- a/src/components/users/user-table.tsx +++ b/src/components/users/user-table.tsx @@ -33,7 +33,7 @@ function UserRoleRow(props: { {props.user.id} - @@ -75,25 +75,27 @@ export function UserTable(props: { }) { const t = useT(); return ( - - - - {t("admin.username")} - {t("admin.id")} - {t("admin.role")} - - - - - {(user) => ( - - )} - - -
+
+ + + + {t("admin.username")} + {t("admin.id")} + {t("admin.role")} + + + + + {(user) => ( + + )} + + +
+
); } diff --git a/src/pages/admin-users-page.tsx b/src/pages/admin-users-page.tsx index 8038e7f..ff34609 100644 --- a/src/pages/admin-users-page.tsx +++ b/src/pages/admin-users-page.tsx @@ -43,18 +43,20 @@ function AdminUsersContent() { description={t("admin.subtitle")} /> - {error() && ( -

{error()}

- )} + {error() &&

{error()}

} -
+
+
+

{t("nav.users")}

+

{t("admin.subtitle")}

+
}> {(list) => ( 0} fallback={ -
+
{t("admin.noUsers")}
} diff --git a/src/pages/login-page.tsx b/src/pages/login-page.tsx index db3880b..6f2f7ec 100644 --- a/src/pages/login-page.tsx +++ b/src/pages/login-page.tsx @@ -54,8 +54,8 @@ function LoginForm() { }; return ( -
-
+
+

{t("auth.loginTitle")}

{t("auth.loginSubtitle")}

diff --git a/src/pages/marks-page.tsx b/src/pages/marks-page.tsx index 3a6690b..e91ff2b 100644 --- a/src/pages/marks-page.tsx +++ b/src/pages/marks-page.tsx @@ -33,11 +33,17 @@ function MarksContent() { {formatApiError(mine.error)} - {t("marks.empty")}

}> + + {t("marks.empty")} +
+ } + > {(report) => } -
); } diff --git a/src/pages/profile-page.tsx b/src/pages/profile-page.tsx index dfa3baa..0a44b7d 100644 --- a/src/pages/profile-page.tsx +++ b/src/pages/profile-page.tsx @@ -32,7 +32,10 @@ function ProfileContent() {
-

{t("profile.edit")}

+
+

{t("profile.edit")}

+

{t("nav.account")}

+
{ @@ -44,23 +47,23 @@ function ProfileContent() {

{t("nav.account")}

-
+

{t("profile.name")}

{u().name || "—"}

-
+

{t("profile.surname")}

{u().surname || "—"}

-
+

{t("profile.email")}

{u().email || "—"}

-
+

{t("profile.phone")}

{u().phone || "—"}

-
+

{t("profile.birthDate")}

{u().birth_date || "—"}

diff --git a/src/pages/register-page.tsx b/src/pages/register-page.tsx index 99b830a..b263173 100644 --- a/src/pages/register-page.tsx +++ b/src/pages/register-page.tsx @@ -60,8 +60,8 @@ function RegisterForm() { }; return ( -
-
+
+

{t("auth.registerTitle")}

{t("auth.registerSubtitle")}

diff --git a/src/pages/student-marks-page.tsx b/src/pages/student-marks-page.tsx index 80ce085..d73795d 100644 --- a/src/pages/student-marks-page.tsx +++ b/src/pages/student-marks-page.tsx @@ -29,11 +29,20 @@ function StudentMarksContent() { return (
- +
+
+

{t("nav.studentMarks")}

+

{t("marks.lookup")}

+
{ e.preventDefault(); const id = userId().trim(); @@ -43,21 +52,30 @@ function StudentMarksContent() { >
- setUserId(e.currentTarget.value)} /> + setUserId(e.currentTarget.value)} + />
- +
-

{formatApiError(report.error)}

+

+ {formatApiError(report.error)} +

}> {(r) => ( -
-

{t("marks.forUser", { user: lookupId() ?? "" })}

+
+

+ {t("marks.forUser", { user: lookupId() ?? "" })} +

)}