@davoodmehraban89 / Factor-easy / commits / 5d33b6e
Fork 0

سامانه صدور فاکتور و حسابداری

Branding: Finora ERP login and real app icon

* State: record Finora branding and login redesign request * Branding: redesign login and install Finora icon * Build: include Finora brand assets in Pages artifact * State: record branding Pages artifact fix * State: reconcile deployed scrollbar cache hotfix

davoodmehraban89 committed Oct 2, 2026 at 12:57 UTC 5d33b6ea4fb173f6b2e6514c756fc1d122fd2773
10 files changed +117 -52
.github/workflows/quality.yml
+3 -1
@@ -56,6 +56,8 @@ jobs:
56 run: node scripts/identity-wave5b-check.mjs
57 - name: Wave 5c privileged backup authorization invariants
58 run: node scripts/identity-wave5c-check.mjs
59 + - name: Finora branding and login invariants
60 + run: node scripts/branding-login-check.mjs
61 - name: Office Slice C1 invariants
62 run: node scripts/office-slice-c1-check.mjs
63 - name: Office Slice C2 invariants
@@ -93,7 +95,7 @@ jobs:
95 - name: Real DOM smoke
96 run: |
97 python3 -m http.server 4173 >/tmp/finora-http.log 2>&1 &
96 - npx playwright test scripts/dom-smoke.spec.js scripts/platform-office.spec.js scripts/enterprise-license.spec.js scripts/enterprise-role.spec.js scripts/enterprise-invitation.spec.js scripts/enterprise-org-ux.spec.js scripts/identity-wave5a.spec.js scripts/identity-wave5b.spec.js scripts/identity-wave5c.spec.js scripts/shell-scroll-ownership.spec.js scripts/office-slice-c1.spec.js scripts/office-slice-c2.spec.js scripts/office-slice-c3.spec.js scripts/office-slice-c4.spec.js scripts/office-slice-c5.spec.js scripts/office-slice-c6.spec.js scripts/office-slice-c7.spec.js scripts/office-slice-c8.spec.js scripts/office-slice-c8-runtime.spec.js scripts/request-workflow-d2.spec.js scripts/request-workflow-d3b.spec.js scripts/request-workflow-d3c.spec.js scripts/request-workflow-d4a.spec.js scripts/taxpayer-print.spec.js scripts/pages-artifact.spec.js --reporter=line --workers=1
98 + npx playwright test scripts/dom-smoke.spec.js scripts/platform-office.spec.js scripts/enterprise-license.spec.js scripts/enterprise-role.spec.js scripts/enterprise-invitation.spec.js scripts/enterprise-org-ux.spec.js scripts/identity-wave5a.spec.js scripts/identity-wave5b.spec.js scripts/identity-wave5c.spec.js scripts/branding-login.spec.js scripts/shell-scroll-ownership.spec.js scripts/office-slice-c1.spec.js scripts/office-slice-c2.spec.js scripts/office-slice-c3.spec.js scripts/office-slice-c4.spec.js scripts/office-slice-c5.spec.js scripts/office-slice-c6.spec.js scripts/office-slice-c7.spec.js scripts/office-slice-c8.spec.js scripts/office-slice-c8-runtime.spec.js scripts/request-workflow-d2.spec.js scripts/request-workflow-d3b.spec.js scripts/request-workflow-d3c.spec.js scripts/request-workflow-d4a.spec.js scripts/taxpayer-print.spec.js scripts/pages-artifact.spec.js --reporter=line --workers=1
99
100 identity-wave5a-database:
101 runs-on: ubuntu-latest
PROJECT_STATE.md
+3 -1
@@ -14,7 +14,9 @@ This is high-assurance accounting/ERP software. Posted financial history, tenant
14 ## Current change ledger
15 | Date | Request / decision | Status | Evidence / next action |
16 |---|---|---|---|
17 -| 2026-10-02 | Owner video confirms the three-scrollbar defect is still visible after PR #35 deployment. | **ROOT CAUSE FOUND / HOTFIX IMPLEMENTED / CI PENDING** | Video matches the pre-fix mapping: cached `js/ui.js` can leave the document/body as the workspace scroll owner while rail/panel native RTL scrollbars remain on their left edges. The critical desktop ownership CSS is now duplicated in `index.html` (not dependent on JS cache) and the `ui.js` URL is version-bumped to `20261002-shell-scroll-ownership-v2`; regression test now asserts the live cache-buster. |
17 +| 2026-10-02 | Branding PR first Quality run exposed a Pages-artifact packaging gap: new icon files were present in source but `scripts/build-pages.mjs` copied only `js` and `vendor`, causing a 404 in hardened Pages smoke. | **BUILD FIX APPLIED / RETEST PENDING** | Pages builder now copies the versioned `assets` directory into `_site`; product/auth logic was not the cause. Security run `36989236713` succeeded; Quality retest required. |
18 +| 2026-10-02 | Owner requested product-wide naming change to «نرم‌افزار ERP سازمانی فینورا», a premium redesign of the login screen based on the supplied reference, and replacement of the generated letter favicon/bookmark icon with the supplied Finora F icon. | **IMPLEMENTED ON BRANCH / CI PENDING** | Browser/bookmark title, application metadata, manifest and visible legacy tagline now use «نرم‌افزار ERP سازمانی فینورا». Added supplied-logo-derived 32px favicon + 180px app/apple icon, real icon in shell branding, and a responsive premium split login with Finora Enterprise visual while preserving every auth contract ID/action. Added static + Real-DOM desktop/mobile regression gates; CI/merge/deploy pending. |
19 +| 2026-10-02 | Owner video confirms the three-scrollbar defect is still visible after PR #35 deployment. | **HOTFIX MERGED / MAIN CI + RELEASE + DEPLOY VERIFIED** | Main `a55933c421eb1ea75a863fadd5d51f3bb29d6b8d` duplicates critical desktop ownership CSS in `index.html` and cache-busts `ui.js` as `20261002-shell-scroll-ownership-v2`. Quality `36985456403` SUCCESS, Security `36985456341` SUCCESS, Release gate `36985769059` SUCCESS and gated Pages `36985796598` SUCCESS. |
20 | 2026-10-02 | Owner reported three desktop vertical scrollbars are attached to the wrong visual edges and requested strict scroll ownership: module rail scrolls only main modules from its right edge; contextual subsystem panel scrolls only its own links from its right edge; workspace scrolls only the active work surface from its right edge. | **MERGED / MAIN CI + RELEASE + DEPLOY VERIFIED** | PR #35 merged as `4a8caf7447ddb5361fe56555a8a6bccc7a733602`. Desktop document scrolling is suppressed; module rail, subsystem links, and workspace are independent viewport-bound scroll owners with physical-right scrollbars while Persian content remains RTL; workspace navigation resets its own scroller; mobile/print retain normal flow. PR retest corrected one test-only mobile overflow expectation. Main Quality `36984349326` SUCCESS, Security `36984349300` SUCCESS, Release gate `36984494858` SUCCESS, gated Pages `36984556741` SUCCESS. |
21 | 2026-10-02 | Wave 5c privileged full backup/restore authorization after offboarding hardening. | **IMPLEMENTED ON BRANCH / CI PENDING** | Full organization export/restore now requires both fresh server membership revalidation and existing organization-management authority (owner or `core:configure`); restore performs the check before reading the selected file. Static + Real-DOM denial-path gates added. This is an application-layer privilege boundary over data already readable under server RLS; no new schema/RLS/auth-role change was introduced. |
22 | 2026-10-02 | Supabase security-advisor intent review for authenticated-callable SECURITY DEFINER RPCs and three private C8 no-policy tables. | **LIVE INTENT REVIEW VERIFIED / NO DDL REQUIRED** | Production `hcsixhqbyuhpshfwqpjx` reviewed read-only. All 20 public advisor-listed SECURITY DEFINER functions use `search_path=''` and enforce caller/admin/org/capability/read-scope checks appropriate to their RPC contract; warning is retained as an intentional privileged-RPC boundary rather than weakened. The three private C8 tables have RLS enabled, zero policies, and no anon/authenticated CRUD grants, confirming deliberate deny-by-default private storage behind controlled RPCs. Evidence: `docs/SECURITY_ADVISOR_INTENT_REVIEW_2026-10-02.md`. Leaked-password protection remains an external Auth-setting gap. |
README.md
+2 -2
@@ -2,7 +2,7 @@
2
3 # فینورا (Finora) — نسخه ۱.۰
4
5 -سامانه ابری صدور فاکتور و مدیریت مالی. داده‌ها و لایسنس روی Supabase نگهداری می‌شوند، ورود با Google یا کد یک‌بارمصرف ایمیل انجام می‌شود، و کنترل دسترسی و نقش مدیر کاملاً سمت سرور (RLS) است.
5 +**نرم‌افزار ERP سازمانی فینورا**. داده‌ها و لایسنس روی Supabase نگهداری می‌شوند، ورود با Google یا کد یک‌بارمصرف ایمیل انجام می‌شود، و کنترل دسترسی و نقش مدیر کاملاً سمت سرور (RLS) است.
6
7 ## راه‌اندازی یک‌بار مصرف (Supabase)
8
@@ -51,7 +51,7 @@ where user_id = (select id from public.profiles where email = 'davoodmehraban89@
51
52 ## محدودیت‌های شناخته‌شده
53 - اتصال واقعی به API سامانه مودیان پیاده‌سازی نشده (فقط فرم اطلاعات سند).
54 -- PWA آفلاین (Service Worker و آیکن) در محدوده نسخه ۱.۰ نیست.
54 +- آیکن رسمی فینورا برای favicon، bookmark و manifest نصب شده است؛ Service Worker آفلاین همچنان خارج از محدوده نسخه ۱.۰ است.
55 - فعال‌سازی Leaked Password Protection و تنظیم SMTP اختصاصی، تنظیمات عملیاتی Supabase هستند و باید در داشبورد سرویس فعال بمانند/فعال شوند.
56 - تفاوت‌های فیزیکی چاپگرها و درایورها خارج از تست خودکار مرورگر است؛ قالب رسمی A4 و غیررسمی A5 در کد و Quality Gate کنترل می‌شوند.
57
assets/finora-favicon-32.png
Binary files /dev/null and b/assets/finora-favicon-32.png differ
assets/finora-icon-180.png
Binary files /dev/null and b/assets/finora-icon-180.png differ
index.html
+61 -43
@@ -3,14 +3,16 @@
3 <head>
4 <meta charset="UTF-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6 -<title>فینورا | سامانه صدور فاکتور و مدیریت مالی</title>
7 -<link rel="manifest" href="manifest.json" />
8 -<meta name="application-name" content="فینورا" />
9 -<meta name="description" content="سامانه ابری صدور فاکتور و مدیریت مالی فینورا" />
6 +<title>نرم‌افزار ERP سازمانی فینورا</title>
7 +<link rel="manifest" href="manifest.json?v=20261002-brand-v1" />
8 +<link rel="icon" type="image/png" sizes="32x32" href="assets/finora-favicon-32.png?v=20261002-brand-v1" />
9 +<link rel="apple-touch-icon" sizes="180x180" href="assets/finora-icon-180.png?v=20261002-brand-v1" />
10 +<meta name="application-name" content="نرم‌افزار ERP سازمانی فینورا" />
11 +<meta name="description" content="نرم‌افزار ERP سازمانی فینورا؛ مدیریت یکپارچه مالی، بازرگانی، خزانه، انبار، پیمان و عملیات سازمانی" />
12 <meta name="referrer" content="strict-origin-when-cross-origin" />
13 <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; font-src 'self' https://cdn.jsdelivr.net data:; img-src 'self' data: blob:; connect-src 'self' https://hcsixhqbyuhpshfwqpjx.supabase.co; object-src 'none'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests" />
14 <meta name="apple-mobile-web-app-capable" content="yes" />
13 -<meta name="theme-color" content="#2563eb" />
15 +<meta name="theme-color" content="#071a48" />
16 <script src="vendor/supabase.js"></script>
17 <script src="https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"></script>
18 <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/misc/Farsi-Digits/Vazirmatn-FD-font-face.css" />
@@ -19,8 +21,18 @@
21 html,body{width:100%;max-width:100%;overflow-x:hidden!important;position:relative}
22 *{box-sizing:border-box;margin:0;padding:0;font-family:'Vazirmatn FD',-apple-system,BlinkMacSystemFont,Tahoma,sans-serif;-webkit-tap-highlight-color:transparent}
23 body{background-color:var(--bg);color:var(--text);font-size:14px}
22 -#auth-screen{position:fixed;top:0;left:0;right:0;bottom:0;background:linear-gradient(135deg,#1e3a8a,#2563eb);z-index:9999;display:flex;align-items:center;justify-content:center;padding:20px}
23 -.auth-card{background:#fff;border-radius:16px;max-width:420px;width:100%;padding:30px;box-shadow:0 25px 50px -12px rgba(0,0,0,.25);text-align:right}
24 +#auth-screen{position:fixed;inset:0;background:radial-gradient(circle at 14% 12%,rgba(71,153,255,.18),transparent 32%),linear-gradient(135deg,#f8fbff 0%,#eef4ff 48%,#e8f1ff 100%);z-index:9999;display:flex;align-items:center;justify-content:center;padding:clamp(14px,3vw,42px);overflow:auto}
25 +.auth-shell{width:min(1180px,100%);min-height:min(760px,calc(100vh - 56px));display:grid;grid-template-columns:minmax(420px,.94fr) minmax(480px,1.06fr);background:#fff;border:1px solid rgba(148,163,184,.22);border-radius:32px;overflow:hidden;box-shadow:0 34px 90px rgba(15,42,91,.18),0 8px 28px rgba(37,99,235,.08)}
26 +.auth-card{background:linear-gradient(180deg,#fff,#fbfdff);width:100%;padding:clamp(32px,5vw,68px);text-align:right;display:flex;flex-direction:column;justify-content:center}
27 +.auth-brand{display:flex;align-items:center;gap:14px;margin-bottom:28px}.auth-brand-logo{width:58px;height:58px;border-radius:16px;box-shadow:0 12px 28px rgba(24,94,214,.22);flex:none}.auth-brand h1{font-size:24px;color:#0b1739;letter-spacing:-.5px}.auth-brand p{font-size:12px;color:#64748b;margin-top:3px}
28 +.auth-card .form-group label{color:#334155}.auth-card .form-control{min-height:50px;border-radius:12px;border-color:#dbe4f0;background:#fff;padding:10px 14px}.auth-card .form-control:focus{border-color:#2b75ff;box-shadow:0 0 0 4px rgba(43,117,255,.10)}
29 +.auth-google{width:100%;min-height:50px;margin-bottom:16px;background:#fff!important;color:#172033!important;border:1px solid #dbe4f0!important;border-radius:12px!important;box-shadow:0 4px 12px rgba(15,23,42,.04)}.auth-google:hover{background:#f8fafc!important}.auth-google-mark{font-family:Arial,sans-serif;font-weight:800;color:#4285f4;font-size:18px}
30 +.auth-divider{display:flex;align-items:center;gap:12px;color:#94a3b8;font-size:11.5px;margin:12px 0 18px}.auth-divider:before,.auth-divider:after{content:"";height:1px;background:#e7edf5;flex:1}
31 +.auth-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}.auth-actions .btn{border-radius:12px;min-height:48px}.auth-signup{width:100%;margin-top:10px;border-radius:12px;background:#eef4ff!important;color:#1556c0!important}.auth-note{font-size:11px;color:#7c8aa0;margin-top:14px;line-height:1.9}
32 +.auth-visual{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(145deg,#061335 0%,#071d55 50%,#063ba4 100%);color:#fff;display:flex;align-items:center;justify-content:center;padding:56px}.auth-visual:before{content:"";position:absolute;width:620px;height:620px;border-radius:50%;background:radial-gradient(circle,rgba(0,201,255,.30),rgba(0,91,255,.08) 45%,transparent 68%);left:-220px;bottom:-290px;z-index:-1}.auth-visual:after{content:"";position:absolute;inset:auto -140px -210px 120px;height:430px;background:linear-gradient(135deg,rgba(20,106,255,.46),rgba(0,217,255,.08));transform:rotate(-12deg);border-radius:80px;filter:blur(1px);z-index:-1}
33 +.auth-hero{width:min(470px,100%);text-align:center;display:flex;flex-direction:column;align-items:center}.auth-hero-logo{width:96px;height:96px;border-radius:25px;box-shadow:0 22px 48px rgba(0,0,0,.28);margin-bottom:18px}.auth-hero h2{font-family:Arial,sans-serif;font-size:52px;letter-spacing:-1.5px;line-height:1}.auth-hero .erp{font-family:Arial,sans-serif;font-size:13px;letter-spacing:6px;color:#c9dcff;margin-top:8px}.auth-hero .tagline{font-size:14px;color:#d9e7ff;margin-top:22px}
34 +.auth-dashboard-art{width:100%;height:260px;margin-top:34px;position:relative;perspective:900px}.auth-glass{position:absolute;border:1px solid rgba(118,210,255,.58);background:linear-gradient(145deg,rgba(65,152,255,.18),rgba(4,36,105,.28));box-shadow:inset 0 0 30px rgba(65,192,255,.08),0 25px 50px rgba(0,0,0,.18);backdrop-filter:blur(7px)}.auth-glass-main{right:9%;left:12%;top:18px;bottom:0;border-radius:22px;transform:rotateY(-8deg)}.auth-glass-side{right:0;width:76px;top:0;bottom:18px;border-radius:18px;display:flex;flex-direction:column;gap:14px;align-items:center;justify-content:center}.auth-glass-side span{width:34px;height:34px;border-radius:10px;background:rgba(88,185,255,.24);display:grid;place-items:center;color:#8be8ff}.auth-chart{position:absolute;left:21%;right:22%;top:80px;height:95px;border-left:1px solid rgba(139,232,255,.24);border-bottom:1px solid rgba(139,232,255,.24)}.auth-chart:after{content:"";position:absolute;inset:12px 6px 8px;background:linear-gradient(135deg,transparent 0 18%,#39c8ff 19% 21%,transparent 22% 37%,#39c8ff 38% 40%,transparent 41% 58%,#39c8ff 59% 61%,transparent 62% 76%,#39c8ff 77% 79%,transparent 80%);filter:drop-shadow(0 0 6px #27bfff)}
35 +@media(max-width:900px){.auth-shell{grid-template-columns:1fr;min-height:0;max-width:560px}.auth-visual{display:none}.auth-card{padding:32px 24px}.auth-brand{justify-content:center;text-align:center}.auth-actions{grid-template-columns:1fr}#auth-screen{align-items:flex-start}.auth-card{min-height:calc(100vh - 28px)}}
36 .app-root{display:flex;min-height:100vh;width:100%;max-width:100%;overflow-x:hidden}
37 .sidebar{width:var(--sidebar-w);background:var(--card-bg);border-left:1px solid var(--border);display:flex;flex-direction:column;position:fixed;top:0;bottom:0;right:0;z-index:100}
38 .brand-box{padding:20px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--border)}
@@ -209,40 +221,46 @@ body{background:#f6f9fc}
221 <body>
222
223 <div id="auth-screen">
212 -<div class="auth-card">
213 -<div style="text-align:center;margin-bottom:20px">
214 -<div style="width:50px;height:50px;background:var(--primary);color:#fff;font-weight:bold;font-size:18px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;margin-bottom:10px">فینورا</div>
215 -<h2 style="font-size:20px;font-weight:bold;color:var(--text)">سامانه فینورا</h2>
216 -<p style="font-size:12px;color:var(--text-muted);margin-top:4px">ورود یا ثبت‌نام در سامانه</p>
217 -</div>
218 -<div id="auth-form-container">
219 -<button class="btn btn-secondary" style="width:100%;margin-bottom:12px" onclick="signInWithGoogle()"><strong>G</strong>&nbsp; ادامه با Google</button>
220 -<div style="text-align:center;font-size:12px;color:var(--text-muted);margin:8px 0">یا با ایمیل</div>
221 -<div class="form-group"><label>ایمیل</label><input type="email" id="auth-email" class="form-control" placeholder="name@example.com" autocomplete="email" autocapitalize="none" dir="ltr" /></div>
222 -<div class="form-group"><label>رمز عبور (اگر قبلاً تعیین کرده‌اید)</label><input type="password" id="auth-password" class="form-control" placeholder="رمز عبور" autocomplete="current-password" dir="ltr" /></div>
223 -<div style="display:flex;gap:10px;margin-top:16px">
224 -<button class="btn btn-primary" style="flex:1" onclick="handleLogin()">ورود با رمز</button>
225 -<button class="btn btn-secondary" style="flex:1" onclick="startEmailOtp(false,false)">ورود با کد ایمیل</button>
226 -</div>
227 -<button class="btn btn-secondary" style="width:100%;margin-top:10px" onclick="startEmailOtp(false,true)">ثبت‌نام با کد ایمیل</button>
228 -<p style="font-size:11.5px;color:var(--text-muted);margin-top:12px;line-height:1.8">برای ورود به حساب موجود «ورود با کد ایمیل» را بزنید. ایجاد حساب جدید فقط از مسیر صریح «ثبت‌نام با کد ایمیل» انجام می‌شود.</p>
229 -</div>
230 -<div id="auth-otp-container" style="display:none">
231 -<p style="font-size:13px;line-height:1.9;margin-bottom:12px">کد یک‌بارمصرف به <strong dir="ltr" id="auth-otp-email-label"></strong> ارسال شد. پوشه‌ی هرزنامه را هم ببینید.</p>
232 -<div class="form-group"><label>کد تأیید</label><input type="text" id="auth-otp" class="form-control" inputmode="numeric" autocomplete="one-time-code" placeholder="------" dir="ltr" /></div>
233 -<div style="display:flex;gap:10px;margin-top:16px">
234 -<button class="btn btn-primary" style="flex:1" onclick="verifyEmailOtp()">تأیید کد</button>
235 -<button class="btn btn-secondary" style="flex:1" onclick="startEmailOtp(true)">ارسال دوباره</button>
236 -</div>
237 -<button class="btn btn-secondary" style="width:100%;margin-top:10px" onclick="backToAuthMain()">بازگشت</button>
238 -</div>
239 -<div id="auth-setpass-container" style="display:none">
240 -<p style="font-size:13px;line-height:1.9;margin-bottom:12px">ایمیل شما تأیید شد. برای ورودهای بعدی می‌توانید یک رمز عبور تعیین کنید.</p>
241 -<div class="form-group"><label>رمز عبور جدید</label><input type="password" id="auth-newpass" class="form-control" placeholder="حداقل ۸ کاراکتر" autocomplete="new-password" dir="ltr" /></div>
242 -<div class="form-group"><label>تکرار رمز عبور</label><input type="password" id="auth-newpass2" class="form-control" placeholder="تکرار رمز" autocomplete="new-password" dir="ltr" /></div>
243 -<button class="btn btn-primary" style="width:100%;margin-top:16px" onclick="saveNewPassword()">ذخیره رمز و ورود</button>
244 -<button class="btn btn-secondary" style="width:100%;margin-top:10px" onclick="skipSetPassword()">فعلاً بدون رمز ادامه بده</button>
245 -</div>
224 +<div class="auth-shell">
225 + <div class="auth-card">
226 + <div class="auth-brand">
227 + <img class="auth-brand-logo" src="assets/finora-icon-180.png?v=20261002-brand-v1" alt="نشان فینورا" />
228 + <div><h1>نرم‌افزار ERP سازمانی فینورا</h1><p>ورود یا ثبت‌نام امن در محیط سازمانی</p></div>
229 + </div>
230 + <div id="auth-form-container">
231 + <button class="btn auth-google" onclick="signInWithGoogle()"><span class="auth-google-mark">G</span><span>ادامه با Google</span></button>
232 + <div class="auth-divider">یا با ایمیل</div>
233 + <div class="form-group"><label>ایمیل</label><input type="email" id="auth-email" class="form-control" placeholder="name@example.com" autocomplete="email" autocapitalize="none" dir="ltr" /></div>
234 + <div class="form-group"><label>رمز عبور</label><input type="password" id="auth-password" class="form-control" placeholder="رمز عبور" autocomplete="current-password" dir="ltr" /></div>
235 + <div class="auth-actions">
236 + <button class="btn btn-primary" onclick="handleLogin()">ورود با رمز</button>
237 + <button class="btn btn-secondary" onclick="startEmailOtp(false,false)">ورود با کد ایمیل</button>
238 + </div>
239 + <button class="btn auth-signup" onclick="startEmailOtp(false,true)">ثبت‌نام با کد ایمیل</button>
240 + <p class="auth-note">ورود با کد ایمیل برای حساب موجود است. ایجاد حساب جدید فقط از مسیر «ثبت‌نام با کد ایمیل» انجام می‌شود.</p>
241 + </div>
242 + <div id="auth-otp-container" style="display:none">
243 + <p style="font-size:13px;line-height:1.9;margin-bottom:12px">کد یک‌بارمصرف به <strong dir="ltr" id="auth-otp-email-label"></strong> ارسال شد. پوشه‌ی هرزنامه را هم ببینید.</p>
244 + <div class="form-group"><label>کد تأیید</label><input type="text" id="auth-otp" class="form-control" inputmode="numeric" autocomplete="one-time-code" placeholder="------" dir="ltr" /></div>
245 + <div class="auth-actions"><button class="btn btn-primary" onclick="verifyEmailOtp()">تأیید کد</button><button class="btn btn-secondary" onclick="startEmailOtp(true)">ارسال دوباره</button></div>
246 + <button class="btn btn-secondary" style="width:100%;margin-top:10px" onclick="backToAuthMain()">بازگشت</button>
247 + </div>
248 + <div id="auth-setpass-container" style="display:none">
249 + <p style="font-size:13px;line-height:1.9;margin-bottom:12px">ایمیل شما تأیید شد. برای ورودهای بعدی می‌توانید یک رمز عبور تعیین کنید.</p>
250 + <div class="form-group"><label>رمز عبور جدید</label><input type="password" id="auth-newpass" class="form-control" placeholder="حداقل ۸ کاراکتر" autocomplete="new-password" dir="ltr" /></div>
251 + <div class="form-group"><label>تکرار رمز عبور</label><input type="password" id="auth-newpass2" class="form-control" placeholder="تکرار رمز" autocomplete="new-password" dir="ltr" /></div>
252 + <button class="btn btn-primary" style="width:100%;margin-top:16px" onclick="saveNewPassword()">ذخیره رمز و ورود</button>
253 + <button class="btn btn-secondary" style="width:100%;margin-top:10px" onclick="skipSetPassword()">فعلاً بدون رمز ادامه بده</button>
254 + </div>
255 + </div>
256 + <aside class="auth-visual" aria-label="معرفی فینورا">
257 + <div class="auth-hero">
258 + <img class="auth-hero-logo" src="assets/finora-icon-180.png?v=20261002-brand-v1" alt="" aria-hidden="true" />
259 + <h2>Finora</h2><div class="erp">ENTERPRISE ERP</div>
260 + <p class="tagline">مدیریت یکپارچه، تصمیم‌گیری هوشمند، رشد پایدار</p>
261 + <div class="auth-dashboard-art" aria-hidden="true"><div class="auth-glass auth-glass-main"></div><div class="auth-glass auth-glass-side"><span>⌂</span><span>▥</span><span>♙</span><span>◇</span></div><div class="auth-chart"></div></div>
262 + </div>
263 + </aside>
264 </div>
265 </div>
266
@@ -250,7 +268,7 @@ body{background:#f6f9fc}
268 <div class="app-root">
269 <aside class="sidebar app-shell-nav no-print" aria-label="ناوبری اصلی">
270 <div class="brand-box">
253 - <div class="brand-icon" aria-hidden="true">F</div>
271 + <img class="brand-icon" src="assets/finora-icon-180.png?v=20261002-brand-v1" alt="" aria-hidden="true" />
272 <div class="brand-copy"><h2>فینورا</h2><small>نسخه ۱.۰</small><span class="sr-only">فینورا — نسخه ۱.۰</span></div>
273 </div>
274 <div class="module-rail" id="module-rail">
@@ -701,7 +719,7 @@ body{background:#f6f9fc}
719 <div class="accordion-header" onclick="toggleAccordion(this)"><span>ℹ️ درباره نرم‌افزار</span><span>▼</span></div>
720 <div class="accordion-body">
721 <h3 style="font-size:16px;font-weight:bold">فینورا - Finora</h3>
704 -<p style="color:var(--text-muted);font-size:13px;margin:6px 0 12px 0">سامانه ابری صدور فاکتور و مدیریت مالی چندکاربره</p>
722 +<p style="color:var(--text-muted);font-size:13px;margin:6px 0 12px 0">نرم‌افزار ERP سازمانی فینورا</p>
723 <p style="font-size:13px;margin-bottom:8px">نگارش فعال: <strong>نسخه ۱.۰</strong></p>
724 <div class="about-dev-card">
725 <div class="about-dev-avatar">د.م</div>
manifest.json
+19 -4
@@ -1,11 +1,26 @@
1 {
2 - "name": "فینورا | سامانه صدور فاکتور و مدیریت مالی",
2 + "name": "نرم‌افزار ERP سازمانی فینورا",
3 "short_name": "فینورا",
4 + "description": "نرم‌افزار ERP سازمانی فینورا",
5 "start_url": "./index.html",
6 "display": "standalone",
6 - "background_color": "#ffffff",
7 - "theme_color": "#2563eb",
7 + "background_color": "#f4f8ff",
8 + "theme_color": "#071a48",
9 "orientation": "any",
10 "dir": "rtl",
10 - "lang": "fa-IR"
11 + "lang": "fa-IR",
12 + "icons": [
13 + {
14 + "src": "assets/finora-icon-180.png",
15 + "sizes": "180x180",
16 + "type": "image/png",
17 + "purpose": "any"
18 + },
19 + {
20 + "src": "assets/finora-icon-180.png",
21 + "sizes": "180x180",
22 + "type": "image/png",
23 + "purpose": "maskable"
24 + }
25 + ]
26 }
scripts/branding-login-check.mjs new
+12
@@ -0,0 +1,12 @@
1 +import fs from 'node:fs';import assert from 'node:assert/strict';
2 +const html=fs.readFileSync('index.html','utf8'),manifest=JSON.parse(fs.readFileSync('manifest.json','utf8')),readme=fs.readFileSync('README.md','utf8');
3 +const exact='نرم‌افزار ERP سازمانی فینورا';
4 +assert(html.includes('<title>'+exact+'</title>'),'browser/bookmark title must use ERP product name');
5 +assert(html.includes('name="application-name" content="'+exact+'"'),'application-name must use ERP product name');
6 +assert(html.includes('assets/finora-favicon-32.png'),'real favicon link missing');
7 +assert(html.includes('assets/finora-icon-180.png'),'Finora icon asset link missing');
8 +assert(html.includes('class="auth-shell"')&&html.includes('class="auth-visual"'),'premium split auth shell missing');
9 +assert(html.includes('id="auth-email"')&&html.includes('id="auth-password"')&&html.includes('id="auth-otp"'),'auth contract IDs changed');
10 +assert.equal(manifest.name,exact);assert(manifest.icons?.length>=1,'manifest icon missing');
11 +for(const source of [html,JSON.stringify(manifest),readme])assert(!source.includes('سامانه ابری صدور فاکتور و مدیریت مالی'),'legacy product tagline remains');
12 +console.log('Finora branding/login invariants passed');
scripts/branding-login.spec.js new
+16
@@ -0,0 +1,16 @@
1 +const {test,expect}=require('@playwright/test');
2 +test('Finora login renders premium ERP branding and real icon assets',async({page})=>{
3 + await page.setViewportSize({width:1440,height:900});
4 + await page.goto('http://127.0.0.1:4173/index.html',{waitUntil:'domcontentloaded'});
5 + await expect(page).toHaveTitle('نرم‌افزار ERP سازمانی فینورا');
6 + await expect(page.locator('#auth-screen .auth-shell')).toBeVisible();
7 + await expect(page.locator('.auth-visual')).toBeVisible();
8 + await expect(page.locator('.auth-brand h1')).toHaveText('نرم‌افزار ERP سازمانی فینورا');
9 + await expect(page.locator('#auth-email')).toBeVisible();await expect(page.locator('#auth-password')).toBeVisible();
10 + const logo=page.locator('.auth-brand-logo');await expect(logo).toBeVisible();expect(await logo.evaluate(el=>el.naturalWidth)).toBeGreaterThan(0);
11 + const href=await page.locator('link[rel="icon"]').getAttribute('href');expect(href).toContain('finora-favicon-32.png');
12 +});
13 +test('Finora login remains focused and usable on mobile',async({page})=>{
14 + await page.setViewportSize({width:390,height:844});await page.goto('http://127.0.0.1:4173/index.html',{waitUntil:'domcontentloaded'});
15 + await expect(page.locator('.auth-visual')).toBeHidden();await expect(page.locator('.auth-card')).toBeVisible();await expect(page.locator('#auth-email')).toBeVisible();
16 +});
scripts/build-pages.mjs
+1 -1
@@ -10,7 +10,7 @@ for(const name of ['manifest.json','CNAME']){
10 const src=path.join(root,name);
11 if(fs.existsSync(src))fs.copyFileSync(src,path.join(out,name));
12 }
13 -for(const dir of ['js','vendor'])fs.cpSync(path.join(root,dir),path.join(out,dir),{recursive:true});
13 +for(const dir of ['js','vendor','assets']){const src=path.join(root,dir);if(fs.existsSync(src))fs.cpSync(src,path.join(out,dir),{recursive:true});}
14
15 const simpleCall=/^\s*(?:return\s+)?(?:window\.)?[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*\s*\([^;]*\)\s*;?\s*$/;
16 const builderExpression=/^'\+[A-Za-z_$][\w$]*\+'$/;