forked from Blendman974/faceclaw
17 lines
450 B
TypeScript
17 lines
450 B
TypeScript
import { GrayImage } from "./image";
|
|
import { loadPngAsGrayImage } from "./imagefile";
|
|
|
|
let cachedDashboardLogo: GrayImage | null | undefined;
|
|
|
|
export function getDashboardLogo(): GrayImage | null {
|
|
if (cachedDashboardLogo !== undefined) {
|
|
return cachedDashboardLogo;
|
|
}
|
|
try {
|
|
cachedDashboardLogo = loadPngAsGrayImage("images/faceclaw-logo-dashboard.png");
|
|
} catch {
|
|
cachedDashboardLogo = null;
|
|
}
|
|
return cachedDashboardLogo;
|
|
}
|