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>
Admin panel:
- New 'هویت سایت' page under تنظیمات in sidebar
- Upload logo (PNG transparent, 200×60px recommended)
- Upload favicon (PNG/ICO, 32×32 or 64×64px)
- Live preview panel shows how logo looks in header
and how favicon looks in a browser tab mockup
- Saved to SiteSettings with section='identity', key='logo'/'favicon'
Frontend (_Layout.cshtml):
- Injects AppDbContext to load identity settings per request
- If logo is set: shows <img> in header instead of text
- If favicon is set: uses uploaded file as <link rel="icon">
- Falls back to text / favicon.ico when not configured
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>