fix: cropper mime bug + loadSiteIdentity crash + logo|name header
CI/CD / CI · dotnet build (push) Successful in 37s
CI/CD / Deploy · drsousan (push) Successful in 29s

1. applyCrop() — mime variable was declared INSIDE toBlob callback
   but used as an argument to toBlob() (outer scope) → ReferenceError.
   Fix: declare _mime, _quality, _ext BEFORE out.toBlob() call.

2. loadSiteIdentity() — crashed when identity section had no rows
   (data was null/non-array). Fix: safe Array.isArray guard + catch.

3. Header logo: show logo image + | + site name side by side
   when logo is configured (was showing one OR the other).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-02 18:15:51 +03:30
parent 5d6a4a630d
commit 1e51df406b
2 changed files with 15 additions and 16 deletions
+4 -6
View File
@@ -139,15 +139,13 @@
<body>
<header>
<a class="logo" href="/">
<a class="logo" href="/" style="display:flex;align-items:center;gap:.6rem">
@if (!string.IsNullOrEmpty(_logoUrl))
{
<img src="@_logoUrl" alt="@(ViewData["SiteName"] ?? "دکتر سوسن آل‌طه")" style="height:38px;width:auto;object-fit:contain;vertical-align:middle" />
}
else
{
@(ViewData["SiteName"] ?? "دکتر سوسن آل‌طه")
<img src="@_logoUrl" alt="@(ViewData["SiteName"] ?? "دکتر سوسن آل‌طه")" style="height:36px;width:auto;object-fit:contain;flex-shrink:0" />
<span style="color:var(--border);font-weight:300;font-size:1.1rem;line-height:1">|</span>
}
<span>@(ViewData["SiteName"] ?? "دکتر سوسن آل‌طه")</span>
</a>
<nav>
<a href="/#about">درباره من</a>