From ada2dc50280bb725b7934f4a4604818245568699 Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Wed, 5 Aug 2026 13:23:37 +0330 Subject: [PATCH] improve UI/UX of the User Area #496 --- GanjooRazor/Areas/User/Pages/Index.cshtml | 50 ++++++- .../Pages/Shared/_UserPanelLayout.cshtml | 135 ++++++++---------- GanjooRazor/wwwroot/css/user-panel.css | 49 +++++++ README.md | 41 +++++- 4 files changed, 191 insertions(+), 84 deletions(-) diff --git a/GanjooRazor/Areas/User/Pages/Index.cshtml b/GanjooRazor/Areas/User/Pages/Index.cshtml index 77d277ec..6fb1fec4 100644 --- a/GanjooRazor/Areas/User/Pages/Index.cshtml +++ b/GanjooRazor/Areas/User/Pages/Index.cshtml @@ -6,13 +6,50 @@ ViewData["Title"] = "پیشخان کاربر"; await GanjooRazor.Utils.GanjoorSessionChecker.ApplyPermissionsToViewData(Request, Response, ViewData); } -

@ViewData["Title"]

+
+

@ViewData["Title"]

+ @{ + var displayName = !string.IsNullOrWhiteSpace(Model.UserInfo?.NickName) ? Model.UserInfo.NickName : Model.UserInfo?.FirstName; + } + @if (!string.IsNullOrWhiteSpace(displayName)) + { +
خوش آمدید، @displayName
+ } +
@if (Model.LastError != "") { -

@Model.LastError

+
@Model.LastError
} else { + + +
@@ -50,12 +87,14 @@ else @Model.PasswordChanged
- +
+
+
@@ -126,7 +165,7 @@ else @@ -137,10 +176,11 @@ else
- +
- حذف حساب کاربری + حذف حساب کاربری
+
} \ No newline at end of file diff --git a/GanjooRazor/Pages/Shared/_UserPanelLayout.cshtml b/GanjooRazor/Pages/Shared/_UserPanelLayout.cshtml index f04f497b..2071c4f9 100644 --- a/GanjooRazor/Pages/Shared/_UserPanelLayout.cshtml +++ b/GanjooRazor/Pages/Shared/_UserPanelLayout.cshtml @@ -81,99 +81,86 @@ } diff --git a/GanjooRazor/wwwroot/css/user-panel.css b/GanjooRazor/wwwroot/css/user-panel.css index c68a120e..87ea19f9 100644 --- a/GanjooRazor/wwwroot/css/user-panel.css +++ b/GanjooRazor/wwwroot/css/user-panel.css @@ -444,8 +444,57 @@ body.up-modal-open { overflow: hidden; } +/* ---------- dashboard quick links ---------- */ + +.up-quick-links { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + gap: var(--up-space-3); + margin-bottom: var(--up-space-4); +} + +.up-quick-link { + display: flex; + flex-direction: column; + gap: var(--up-space-1); + text-decoration: none; + color: var(--up-text); + transition: transform 0.1s ease, box-shadow 0.15s ease; +} + +.up-quick-link:hover { + text-decoration: none; + color: var(--up-text); + box-shadow: var(--up-shadow); + transform: translateY(-2px); +} + /* ---------- small utilities ---------- */ .up-mt-0 { margin-top: 0; } .up-text-muted { color: var(--up-text-muted); } .up-text-center { text-align: center; } + +/* ---------- navbar dropdowns ---------- */ +/* Bootstrap 4's default (non-RTL) build anchors dropdown-menu to the left + and left-aligns text, which reads wrong on this RTL page. */ + +.navbar .dropdown-menu { + right: 0; + left: auto; + text-align: right; + border-radius: var(--up-radius); + border-color: var(--up-border); + box-shadow: var(--up-shadow-sm); +} + +.navbar .dropdown-item { + text-align: right; +} + +.navbar .up-badge { + margin-inline-start: 6px; + vertical-align: middle; + font-size: 0.65rem; + padding: 1px 8px; +} diff --git a/README.md b/README.md index fbed76ed..8266a984 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,40 @@ -# GanjoorService -Ganjoor museum and ganjoor.net own backend (ASP.NET Core Web API) and frontend (Razor Pages) code +# User panel Phase 0 + Phase 1 — file package -این کد وب سرویس [گنجینهٔ گنجور](https://museum.ganjoor.net) و [گنجور](https://ganjoor.net) و همچنین کد سایت گنجور است. +This contains the FULL, current content of every file touched by Phase 0 +(shared components/foundations) and Phase 1 (nav grouping + dashboard) +combined. Since you already have Phase 0 applied, copying these over is +a no-op for the Phase-0-only files and just adds the Phase 1 changes. -[فهرست توابع در دسترس](https://api.ganjoor.net) +Copy each file below into the same relative path under your +`GanjoorService/GanjooRazor/` folder, overwriting what's there. -![https://api.ganjoor.net](https://user-images.githubusercontent.com/582212/91652208-14a63c00-eaaa-11ea-89c2-5acabdfda7de.png) +## New files (Phase 0) +- wwwroot/css/user-panel.css +- wwwroot/js/user-panel.js +- Areas/User/Pages/Shared/_Pagination.cshtml +- Areas/User/Pages/Shared/_EmptyState.cshtml +- Areas/User/Pages/Shared/_Toasts.cshtml +- Areas/User/Pages/Shared/_ConfirmModal.cshtml +## Modified files (Phase 0 + Phase 1, combined into their final state) +- Pages/Shared/_UserPanelLayout.cshtml + (Phase 0: loads user-panel.css/js, includes toast/modal hosts. + Phase 1: navbar regrouped into dropdowns.) +- Areas/User/Pages/Notifications.cshtml + (Phase 0 demo: uses the new pagination/empty-state partials, + upConfirm/upToast instead of confirm()/alert().) +- Areas/User/Pages/Index.cshtml + (Phase 1: dashboard greeting, quick-links grid, forms wrapped in cards.) + +## After copying +1. Diff against what you have now (or just eyeball it — none of these + files are huge) to make sure nothing local got clobbered. +2. Build. +3. Load `/User/Index` and `/User/Notifications` and click around: + nav dropdowns, the confirm-modal on delete, toasts on notification + actions, the quick-links grid. +4. Commit and push however you normally would. + +No backend/API/.csproj changes in either phase — these are all under +`wwwroot/` or `Areas/User/Pages/` (Razor views + one stylesheet + one +script).