add manifest.json with icon for home screen (closes #525)

This commit is contained in:
Henry Dollman
2025-02-05 20:27:23 -05:00
parent 1daf35406a
commit d7ada1b1c5
5 changed files with 18 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ import { useEffect, useState } from "react"
import { CpuIcon, HardDriveIcon, MemoryStickIcon, ServerIcon } from "lucide-react"
import { EthernetIcon, ThermometerIcon } from "@/components/ui/icons"
import { t } from "@lingui/macro"
import { prependBasePath } from "@/components/router"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
@@ -106,7 +107,7 @@ export const formatDay = (timestamp: string) => {
}
export const updateFavicon = (newIcon: string) => {
;(document.querySelector("link[rel='icon']") as HTMLLinkElement).href = `/static/${newIcon}`
;(document.querySelector("link[rel='icon']") as HTMLLinkElement).href = prependBasePath( `/static/${newIcon}` )
}
export const isAdmin = () => pb.authStore.record?.role === "admin"