diff --git a/firebase/internal-launchpad/assets/data/links.json b/firebase/internal-launchpad/assets/data/links.json index 0b2c2446..40b7f76d 100644 --- a/firebase/internal-launchpad/assets/data/links.json +++ b/firebase/internal-launchpad/assets/data/links.json @@ -2,7 +2,7 @@ { "title": "Applications", "iconColorClass": "bg-primary-100", - "iconSvg": "", + "iconPath": "assets/images/icon-applications.svg", "links": [ { "title": "Control Tower", @@ -27,7 +27,7 @@ { "title": "Legacy Mobile Apps", "iconColorClass": "bg-green-100", - "iconSvg": "", + "iconPath": "assets/images/icon-legacy-mobile-apps.svg", "links": [ { "title": "Google Play Store", @@ -35,7 +35,7 @@ "badge": "Live", "badgeColorClass": "bg-green-500", "containerClass": "bg-gradient-to-r from-green-50 to-emerald-100 hover:from-green-100 hover:to-emerald-200", - "iconSvg": "", + "iconPath": "assets/images/icon-google-play.svg", "textHoverClass": "group-hover:text-green-700" }, { @@ -44,7 +44,7 @@ "badge": "Live", "badgeColorClass": "bg-gray-700", "containerClass": "bg-gradient-to-r from-gray-50 to-gray-100 hover:from-gray-100 hover:to-gray-200", - "iconSvg": "", + "iconPath": "assets/images/icon-apple-app-store.svg", "textHoverClass": "group-hover:text-gray-700" } ] @@ -52,7 +52,7 @@ { "title": "Cloud Infrastructure", "iconColorClass": "bg-purple-100", - "iconSvg": "", + "iconPath": "assets/images/icon-cloud-infrastructure.svg", "links": [ { "title": "Firebase Console", @@ -60,7 +60,7 @@ "badge": "Dev", "badgeColorClass": "bg-blue-500", "containerClass": "bg-gradient-to-r from-blue-50 to-indigo-100 hover:from-blue-100 hover:to-indigo-200", - "iconSvg": "", + "iconPath": "assets/images/icon-firebase-console.svg", "textHoverClass": "group-hover:text-indigo-700" }, { @@ -69,7 +69,7 @@ "badge": "Staging", "badgeColorClass": "bg-amber-500", "containerClass": "bg-gradient-to-r from-amber-50 to-orange-100 hover:from-amber-100 hover:to-orange-200", - "iconSvg": "", + "iconPath": "assets/images/icon-firebase-console.svg", "textHoverClass": "group-hover:text-orange-700" }, { @@ -78,7 +78,7 @@ "badge": "Dev", "badgeColorClass": "bg-blue-500", "containerClass": "bg-gradient-to-r from-blue-50 to-cyan-100 hover:from-blue-100 hover:to-cyan-200", - "iconSvg": "", + "iconPath": "assets/images/icon-google-cloud.svg", "textHoverClass": "group-hover:text-cyan-700" }, { @@ -87,7 +87,7 @@ "badge": "Staging", "badgeColorClass": "bg-amber-500", "containerClass": "bg-gradient-to-r from-amber-50 to-yellow-100 hover:from-amber-100 hover:to-yellow-200", - "iconSvg": "", + "iconPath": "assets/images/icon-google-cloud.svg", "textHoverClass": "group-hover:text-yellow-700" } ] @@ -95,7 +95,7 @@ { "title": "Design", "iconColorClass": "bg-pink-100", - "iconSvg": "", + "iconPath": "assets/images/icon-design.svg", "links": [ { "title": "Staff App Figma File", @@ -103,7 +103,7 @@ "badge": "Design", "badgeColorClass": "bg-pink-500", "containerClass": "bg-gradient-to-r from-pink-50 to-rose-100 hover:from-pink-100 hover:to-rose-200", - "iconSvg": "", + "iconPath": "assets/images/icon-figma.svg", "textHoverClass": "group-hover:text-pink-700" }, { @@ -112,7 +112,7 @@ "badge": "Preview", "badgeColorClass": "bg-purple-500", "containerClass": "bg-gradient-to-r from-purple-50 to-fuchsia-100 hover:from-purple-100 hover:to-fuchsia-200", - "iconSvg": "", + "iconPath": "assets/images/icon-preview.svg", "textHoverClass": "group-hover:text-purple-700" } ] @@ -120,14 +120,14 @@ { "title": "Resources", "iconColorClass": "bg-indigo-100", - "iconSvg": "", + "iconPath": "assets/images/icon-resources.svg", "links": [ { "title": "GitHub Repository", "subtitle": "View source code", "url": "https://github.com/Oloodi/krow-workforce", "containerClass": "bg-gradient-to-r from-gray-50 to-slate-100 hover:from-gray-100 hover:to-slate-200", - "iconSvg": "", + "iconPath": "assets/images/icon-github.svg", "textHoverClass": "group-hover:text-gray-700", "arrowIcon": true }, @@ -136,7 +136,7 @@ "subtitle": "Google Chat", "url": "https://chat.google.com/", "containerClass": "bg-gradient-to-r from-green-50 to-teal-100 hover:from-green-100 hover:to-teal-200", - "iconSvg": "", + "iconPath": "assets/images/icon-chat.svg", "textHoverClass": "group-hover:text-teal-700", "arrowIcon": true } diff --git a/firebase/internal-launchpad/assets/images/icon-apple-app-store.svg b/firebase/internal-launchpad/assets/images/icon-apple-app-store.svg new file mode 100644 index 00000000..00407e9d --- /dev/null +++ b/firebase/internal-launchpad/assets/images/icon-apple-app-store.svg @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/firebase/internal-launchpad/assets/images/icon-applications.svg b/firebase/internal-launchpad/assets/images/icon-applications.svg new file mode 100644 index 00000000..c7fc8783 --- /dev/null +++ b/firebase/internal-launchpad/assets/images/icon-applications.svg @@ -0,0 +1 @@ + diff --git a/firebase/internal-launchpad/assets/images/icon-chat.svg b/firebase/internal-launchpad/assets/images/icon-chat.svg new file mode 100644 index 00000000..0be8c1ac --- /dev/null +++ b/firebase/internal-launchpad/assets/images/icon-chat.svg @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/firebase/internal-launchpad/assets/images/icon-cloud-infrastructure.svg b/firebase/internal-launchpad/assets/images/icon-cloud-infrastructure.svg new file mode 100644 index 00000000..41b26fd4 --- /dev/null +++ b/firebase/internal-launchpad/assets/images/icon-cloud-infrastructure.svg @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/firebase/internal-launchpad/assets/images/icon-design.svg b/firebase/internal-launchpad/assets/images/icon-design.svg new file mode 100644 index 00000000..0442362c --- /dev/null +++ b/firebase/internal-launchpad/assets/images/icon-design.svg @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/firebase/internal-launchpad/assets/images/icon-figma.svg b/firebase/internal-launchpad/assets/images/icon-figma.svg new file mode 100644 index 00000000..88fa947d --- /dev/null +++ b/firebase/internal-launchpad/assets/images/icon-figma.svg @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/firebase/internal-launchpad/assets/images/icon-firebase-console.svg b/firebase/internal-launchpad/assets/images/icon-firebase-console.svg new file mode 100644 index 00000000..d6ed32f0 --- /dev/null +++ b/firebase/internal-launchpad/assets/images/icon-firebase-console.svg @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/firebase/internal-launchpad/assets/images/icon-github.svg b/firebase/internal-launchpad/assets/images/icon-github.svg new file mode 100644 index 00000000..f5f2bd80 --- /dev/null +++ b/firebase/internal-launchpad/assets/images/icon-github.svg @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/firebase/internal-launchpad/assets/images/icon-google-cloud.svg b/firebase/internal-launchpad/assets/images/icon-google-cloud.svg new file mode 100644 index 00000000..6f5213d3 --- /dev/null +++ b/firebase/internal-launchpad/assets/images/icon-google-cloud.svg @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/firebase/internal-launchpad/assets/images/icon-google-play.svg b/firebase/internal-launchpad/assets/images/icon-google-play.svg new file mode 100644 index 00000000..8a02867a --- /dev/null +++ b/firebase/internal-launchpad/assets/images/icon-google-play.svg @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/firebase/internal-launchpad/assets/images/icon-legacy-mobile-apps.svg b/firebase/internal-launchpad/assets/images/icon-legacy-mobile-apps.svg new file mode 100644 index 00000000..c43a10d4 --- /dev/null +++ b/firebase/internal-launchpad/assets/images/icon-legacy-mobile-apps.svg @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/firebase/internal-launchpad/assets/images/icon-preview.svg b/firebase/internal-launchpad/assets/images/icon-preview.svg new file mode 100644 index 00000000..e9846535 --- /dev/null +++ b/firebase/internal-launchpad/assets/images/icon-preview.svg @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/firebase/internal-launchpad/assets/images/icon-resources.svg b/firebase/internal-launchpad/assets/images/icon-resources.svg new file mode 100644 index 00000000..cda1666d --- /dev/null +++ b/firebase/internal-launchpad/assets/images/icon-resources.svg @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/firebase/internal-launchpad/assets/js/links-loader.js b/firebase/internal-launchpad/assets/js/links-loader.js index f00b10a9..9bca36f7 100644 --- a/firebase/internal-launchpad/assets/js/links-loader.js +++ b/firebase/internal-launchpad/assets/js/links-loader.js @@ -10,7 +10,32 @@ async function loadLinks() { const groups = await response.json(); - container.innerHTML = groups.map(group => ` + // Helper function to fetch SVG content + const fetchSvg = async (path) => { + if (!path) return ''; + try { + const res = await fetch(path); + if (!res.ok) return ''; + return await res.text(); + } catch (e) { + console.error(`Failed to load SVG: ${path}`, e); + return ''; + } + }; + + // Process groups and fetch SVGs in parallel + const groupsWithSvgs = await Promise.all(groups.map(async (group) => { + const groupIconSvg = await fetchSvg(group.iconPath); + + const linksWithSvgs = await Promise.all(group.links.map(async (link) => { + const linkIconSvg = link.iconPath ? await fetchSvg(link.iconPath) : ''; + return { ...link, iconSvg: linkIconSvg }; + })); + + return { ...group, iconSvg: groupIconSvg, links: linksWithSvgs }; + })); + + container.innerHTML = groupsWithSvgs.map(group => `