Initial commit: Meshkee dashboards monorepo.

Includes business, customer, and super-admin apps with shared packages and production deploy scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-07-22 13:48:53 +03:30
co-authored by Cursor
commit f566387c61
509 changed files with 62690 additions and 0 deletions
@@ -0,0 +1,35 @@
const FAVICON_ATTR = 'data-business-favicon'
function removeIconLinks(root: ParentNode = document.head) {
root
.querySelectorAll(
'link[rel="icon"], link[rel="shortcut icon"], link[rel="apple-touch-icon"]',
)
.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()}`
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
if (rel === 'icon') {
link.type = 'image/png'
link.sizes = '48x48'
}
document.head.appendChild(link)
}
}