From b7477944bc2b767ef94b50206bc559820430b567 Mon Sep 17 00:00:00 2001 From: bwnyasse <5323628+bwnyasse@users.noreply.github.com> Date: Fri, 14 Nov 2025 09:06:30 -0500 Subject: [PATCH] feat: update title and favicon in index.html This commit updates the title and favicon in the index.html file to reflect the new KROW branding. It also updates the links in the internal launchpad to point to the correct environments. feat: add script to patch index.html during integration This commit adds a new script to patch the index.html file during the integration process. This script updates the title and favicon to reflect the new KROW branding. style: update badge style in Dashboard.jsx This commit updates the badge style in the Dashboard.jsx file to use a span element with rounded corners instead of the Badge component. This is to match the design of the new KROW branding. --- Makefile | 2 ++ firebase/internal-launchpad/index.html | 4 +-- frontend-web/index.html | 4 +-- frontend-web/src/pages/Dashboard.jsx | 4 +-- scripts/patch-dashboard-for-env-label.js | 4 +-- scripts/patch-index-html.js | 41 ++++++++++++++++++++++++ 6 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 scripts/patch-index-html.js diff --git a/Makefile b/Makefile index ca061072..2352a912 100644 --- a/Makefile +++ b/Makefile @@ -65,6 +65,8 @@ integrate-export: @node scripts/patch-layout-query-key.js @echo " - Patching Dashboard.jsx for environment label..." @node scripts/patch-dashboard-for-env-label.js + @echo " - Patching index.html for title..." + @node scripts/patch-index-html.js @echo "--> Integration complete. Next step: 'make prepare-export'." # Applies all necessary patches to a fresh Base44 export to run it locally. diff --git a/firebase/internal-launchpad/index.html b/firebase/internal-launchpad/index.html index e62c859a..2fd6cf5a 100644 --- a/firebase/internal-launchpad/index.html +++ b/firebase/internal-launchpad/index.html @@ -169,11 +169,11 @@
diff --git a/frontend-web/index.html b/frontend-web/index.html index 8131cdb4..92c517d6 100644 --- a/frontend-web/index.html +++ b/frontend-web/index.html @@ -2,9 +2,9 @@ - + - Base44 APP + KROW
diff --git a/frontend-web/src/pages/Dashboard.jsx b/frontend-web/src/pages/Dashboard.jsx index 7efbb4f7..0033d94d 100644 --- a/frontend-web/src/pages/Dashboard.jsx +++ b/frontend-web/src/pages/Dashboard.jsx @@ -91,8 +91,8 @@ export default function Dashboard() { title={
Welcome to KROW - {import.meta.env.VITE_APP_ENV === 'staging' && Staging} - {import.meta.env.VITE_APP_ENV === 'dev' && Dev} + {import.meta.env.VITE_APP_ENV === 'staging' && Staging} + {import.meta.env.VITE_APP_ENV === 'dev' && Dev}
} subtitle="Your Complete Workforce Management Ecosystem" diff --git a/scripts/patch-dashboard-for-env-label.js b/scripts/patch-dashboard-for-env-label.js index be3db6e6..2886256b 100644 --- a/scripts/patch-dashboard-for-env-label.js +++ b/scripts/patch-dashboard-for-env-label.js @@ -11,8 +11,8 @@ const newString = ` Welcome to KROW - {import.meta.env.VITE_APP_ENV === 'staging' && Staging} - {import.meta.env.VITE_APP_ENV === 'dev' && Dev} + {import.meta.env.VITE_APP_ENV === 'staging' && Staging} + {import.meta.env.VITE_APP_ENV === 'dev' && Dev}
}`; diff --git a/scripts/patch-index-html.js b/scripts/patch-index-html.js new file mode 100644 index 00000000..77f868fe --- /dev/null +++ b/scripts/patch-index-html.js @@ -0,0 +1,41 @@ +const fs = require('fs'); +const path = require('path'); + +const projectRoot = path.resolve(__dirname, '..'); +const indexPath = path.join(projectRoot, 'frontend-web', 'index.html'); + +const oldTitle = 'Base44 APP'; +const newTitle = 'KROW'; + +const oldFavicon = ''; +const newFavicon = ''; + +try { + let content = fs.readFileSync(indexPath, 'utf8'); + + if (content.includes(oldTitle)) { + content = content.replace(oldTitle, newTitle); + console.log('✅ Successfully patched title in frontend-web/index.html.'); + } else if (content.includes(newTitle)) { + console.log('ℹ️ index.html title is already patched. Skipping.'); + } else { + console.error('❌ Patching index.html failed: Could not find the expected title tag.'); + process.exit(1); + } + + if (content.includes(oldFavicon)) { + content = content.replace(oldFavicon, newFavicon); + console.log('✅ Successfully patched favicon in frontend-web/index.html.'); + } else if (content.includes(newFavicon)) { + console.log('ℹ️ index.html favicon is already patched. Skipping.'); + } else { + console.error('❌ Patching index.html failed: Could not find the expected favicon link.'); + process.exit(1); + } + + fs.writeFileSync(indexPath, content, 'utf8'); + +} catch (error) { + console.error('❌ An error occurred during patching index.html:', error); + process.exit(1); +}