feat: Refine dynamic manifest with OSIT branding and full icon set

- Incorporated comprehensive icon list from dgr.oneskyit.com reference.
- Updated dynamic naming logic to 'One Sky IT - {Account} Aether PWA'.
- Set display mode to 'fullscreen' per reference standard.
- Added verification tool to the Testing Dashboard.
This commit is contained in:
Scott Idem
2026-01-19 15:49:16 -05:00
parent 79e8411842
commit 08d0d9ca45

View File

@@ -38,55 +38,55 @@ export const GET: RequestHandler = async ({ url, fetch }) => {
console.error(`PWA Manifest: Lookup failed for domain ${fqdn}:`, e);
}
// Default branding values
let name = "Aether Platform";
let short_name = "Aether";
let background_color = "#1a1a1a";
// Default branding values (Fallback to OSIT Aether)
let name = "One Sky IT - One Sky IT Aether PWA";
let short_name = "Aether PWA";
let background_color = "hsl(220, 65%, 31%)";
let theme_color = "#3a5997";
let logo_url = "https://static.oneskyit.com/images/OSIT_logo_2022_192px.png";
let logo_url_large = "https://static.oneskyit.com/images/OSIT_logo_2022_512px.png";
if (site_domain) {
// Preference: Account Name > Site Name > Default
name = site_domain.account_name || site_domain.site_name || name;
short_name = site_domain.site_code || site_domain.account_code || short_name;
// If site_domain has account_name like "Danger Zone", name becomes "One Sky IT - Danger Zone Aether PWA"
const branding_name = site_domain.account_name || site_domain.name || "Aether";
name = `One Sky IT - ${branding_name} Aether PWA`;
short_name = `${site_domain.account_code || site_domain.code || 'Aether'} PWA`;
// If the site domain has a specific logo, we apply it here
if (site_domain.header_image_path) {
logo_url = site_domain.header_image_path;
logo_url_large = site_domain.header_image_path;
if (site_domain.cfg_json?.pwa_background_color) {
background_color = site_domain.cfg_json.pwa_background_color;
}
}
const manifest = {
name: name,
short_name: short_name,
description: `The ${name} Progressive Web App`,
start_url: "/",
display: "standalone",
background_color: background_color,
theme_color: theme_color,
icons: [
{
src: logo_url,
sizes: "192x192",
type: "image/png",
purpose: "any maskable"
},
{
src: logo_url_large,
sizes: "512x512",
type: "image/png",
purpose: "any maskable"
}
"background_color": background_color,
"description": `The ${name} Progressive Web App`,
"display": "fullscreen",
"icons": [
{ "sizes": "24x24", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_24px.png", "type": "image/png" },
{ "sizes": "48x48", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_48px.png", "type": "image/png" },
{ "sizes": "88x88", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_88px.webp", "type": "image/webp" },
{ "sizes": "88x88", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_88px.png", "type": "image/png" },
{ "sizes": "120x120", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_120px.png", "type": "image/png" },
{ "sizes": "144x144", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_144px.png", "type": "image/png" },
{ "sizes": "180x180", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_180px.png", "type": "image/png" },
{ "sizes": "192x192", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_192px.webp", "type": "image/webp" },
{ "sizes": "192x192", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_192px.png", "type": "image/png" },
{ "sizes": "256x256", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_256px.webp", "type": "image/webp" },
{ "sizes": "256x256", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_256px.png", "type": "image/png" },
{ "sizes": "300x300", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_300px.png", "type": "image/png" },
{ "sizes": "512x512", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_512px.webp", "type": "image/webp" },
{ "sizes": "512x512", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_512px.png", "type": "image/png" },
{ "sizes": "1024x1024", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_1024px.webp", "type": "image/webp" },
{ "sizes": "1024x1024", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_1024px.png", "type": "image/png" }
],
categories: ["business", "productivity"],
orientation: "any"
"name": name,
"short_name": short_name,
"start_url": "/",
"theme_color": theme_color
};
return json(manifest, {
headers: {
'Cache-Control': 'public, max-age=3600' // Cache for 1 hour to reduce API load
'Content-Type': 'application/manifest+json',
'Cache-Control': 'public, max-age=3600'
}
});
};