Improve portfolio title images, branding, and super-admin domains UI.

Add aspect-ratio crop presets for portfolio title images, fixed card image placeholders with contained centering, Meshkee favicon/logo fallbacks, login branding updates, category FAB alignment, and super-admin website/domain SSL tooling.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-07-23 12:23:02 +03:30
co-authored by Cursor
parent f566387c61
commit db52a83f98
40 changed files with 595 additions and 162 deletions
+25 -13
View File
@@ -1,4 +1,5 @@
const FAVICON_ATTR = 'data-business-favicon'
const DEFAULT_FAVICON_HREF = '/favicon.png'
function removeIconLinks(root: ParentNode = document.head) {
root
@@ -8,24 +9,19 @@ function removeIconLinks(root: ParentNode = document.head) {
.forEach((node) => node.remove())
}
/** Sets browser tab favicon links for the current tenant. Pass null to clear. */
export function applyDocumentFavicon(url: string | null | undefined) {
if (typeof document === 'undefined') return
removeIconLinks()
const href = url?.trim()
if (!href) return
// Bust browser favicon cache when the logo/favicon media URL changes.
const cacheBusted =
href.includes('?') ? `${href}&v=${Date.now()}` : `${href}?v=${Date.now()}`
function appendIconLinks(href: string, cacheBust: boolean) {
const resolved =
cacheBust
? href.includes('?')
? `${href}&v=${Date.now()}`
: `${href}?v=${Date.now()}`
: href
for (const rel of ['icon', 'apple-touch-icon'] as const) {
const link = document.createElement('link')
link.setAttribute(FAVICON_ATTR, 'true')
link.rel = rel
link.href = cacheBusted
link.href = resolved
if (rel === 'icon') {
link.type = 'image/png'
link.sizes = '48x48'
@@ -33,3 +29,19 @@ export function applyDocumentFavicon(url: string | null | undefined) {
document.head.appendChild(link)
}
}
/** Sets browser tab favicon links for the current tenant. Pass null to restore the app default. */
export function applyDocumentFavicon(url: string | null | undefined) {
if (typeof document === 'undefined') return
removeIconLinks()
const href = url?.trim()
if (!href) {
appendIconLinks(DEFAULT_FAVICON_HREF, false)
return
}
// Bust browser favicon cache when the logo/favicon media URL changes.
appendIconLinks(href, true)
}