Files
Krow-workspace/scripts/patch-index-html.js
bwnyasse b7477944bc 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.
2025-11-14 09:06:30 -05:00

42 lines
1.5 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const fs = require('fs');
const path = require('path');
const projectRoot = path.resolve(__dirname, '..');
const indexPath = path.join(projectRoot, 'frontend-web', 'index.html');
const oldTitle = '<title>Base44 APP</title>';
const newTitle = '<title>KROW</title>';
const oldFavicon = '<link rel="icon" type="image/svg+xml" href="https://base44.com/logo_v2.svg" />';
const newFavicon = '<link rel="icon" type="image/svg+xml" href="https://krow-workforce-dev-launchpad.web.app/favicon.svg" />';
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);
}