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); console.error(`PWA Manifest: Lookup failed for domain ${fqdn}:`, e);
} }
// Default branding values // Default branding values (Fallback to OSIT Aether)
let name = "Aether Platform"; let name = "One Sky IT - One Sky IT Aether PWA";
let short_name = "Aether"; let short_name = "Aether PWA";
let background_color = "#1a1a1a"; let background_color = "hsl(220, 65%, 31%)";
let theme_color = "#3a5997"; 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) { if (site_domain) {
// Preference: Account Name > Site Name > Default // If site_domain has account_name like "Danger Zone", name becomes "One Sky IT - Danger Zone Aether PWA"
name = site_domain.account_name || site_domain.site_name || name; const branding_name = site_domain.account_name || site_domain.name || "Aether";
short_name = site_domain.site_code || site_domain.account_code || short_name; 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.cfg_json?.pwa_background_color) {
if (site_domain.header_image_path) { background_color = site_domain.cfg_json.pwa_background_color;
logo_url = site_domain.header_image_path;
logo_url_large = site_domain.header_image_path;
} }
} }
const manifest = { const manifest = {
name: name, "background_color": background_color,
short_name: short_name, "description": `The ${name} Progressive Web App`,
description: `The ${name} Progressive Web App`, "display": "fullscreen",
start_url: "/", "icons": [
display: "standalone", { "sizes": "24x24", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_24px.png", "type": "image/png" },
background_color: background_color, { "sizes": "48x48", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_48px.png", "type": "image/png" },
theme_color: theme_color, { "sizes": "88x88", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_88px.webp", "type": "image/webp" },
icons: [ { "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" },
src: logo_url, { "sizes": "144x144", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_144px.png", "type": "image/png" },
sizes: "192x192", { "sizes": "180x180", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_180px.png", "type": "image/png" },
type: "image/png", { "sizes": "192x192", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_192px.webp", "type": "image/webp" },
purpose: "any maskable" { "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" },
src: logo_url_large, { "sizes": "300x300", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_300px.png", "type": "image/png" },
sizes: "512x512", { "sizes": "512x512", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_512px.webp", "type": "image/webp" },
type: "image/png", { "sizes": "512x512", "src": "https://static.oneskyit.com/images/OSIT_logo_2022_512px.png", "type": "image/png" },
purpose: "any maskable" { "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"], "name": name,
orientation: "any" "short_name": short_name,
"start_url": "/",
"theme_color": theme_color
}; };
return json(manifest, { return json(manifest, {
headers: { 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'
} }
}); });
}; };