Files
cobble/src/functions/backend/db/app-settings/grab-install-icon.ts
T
tbenandClaude Opus 5.5 e462806438 Let each install pick its app icon
Settings > General gets an App icon (super admin): one of the seven
stones, or an uploaded image with the picked stone as a top-left corner
mark (inside a round launcher's crop, clear of the browser's badge),
previewed in both launcher crops before saving.

Uploads are decoded and cropped to a stored square (no SVG); the set is
drawn into DATA_DIR/install-icon/<version>/ and served publicly and
immutable. The manifest, head icon links and push notifications point at
it; the ember stone keeps the stock icons. The generator shares the icon
renderer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 10:38:25 +01:00

11 lines
408 B
TypeScript

import { PwaInstallIconSettingKey } from "@/src/data/pwa-data";
import parseInstallIcon from "@/src/utils/parse-install-icon";
import grabAppSetting from "./grab-app-setting";
/**
* The install's own icon (Settings > General), else the stock ember one.
*/
export default async function grabInstallIcon() {
return parseInstallIcon({ saved: await grabAppSetting({ key: PwaInstallIconSettingKey }) });
}