chore: remove devv-app and external static.devv.ai references; no external data fetch

This commit is contained in:
Chenwei Jiang 2025-08-21 17:28:35 +08:00
parent 5a111a3d3e
commit 7bead3709a
Signed by: cheverjohn
GPG key ID: ADC4815BFE960182
3 changed files with 6 additions and 34 deletions

View file

@ -9,15 +9,7 @@
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<!-- IMPORTANT: Load external tool via runtime injection to avoid Vite resolving at build time -->
<script>
(function() {
var s = document.createElement('script');
s.type = 'module';
s.src = '/devv-app.js';
document.head.appendChild(s);
})();
</script>
<script type="module" src="/src/main.tsx"></script> <script type="module" src="/src/main.tsx"></script>
</body> </body>
</html> </html>

View file

@ -61,22 +61,7 @@ app.get('/health', (_req, res) => {
res.json({ ok: true }); res.json({ ok: true });
}); });
// Proxy external devv-app.js to avoid browser CORS for module scripts
app.get('/devv-app.js', async (_req, res) => {
try {
const response = await fetch('https://static.devv.ai/devv-app.js');
if (!response.ok) {
res.status(response.status).type('text/plain').send('');
return;
}
res.setHeader('Content-Type', 'application/javascript; charset=utf-8');
res.setHeader('Cache-Control', 'public, max-age=3600');
const bodyText = await response.text();
res.send(bodyText);
} catch (error) {
res.status(502).type('application/javascript').send('// proxy error');
}
});
type DbRow = { type DbRow = {
id: string; id: string;

View file

@ -3,10 +3,9 @@ import { Card, CardContent } from "@/components/ui/card";
export function DogMotivation() { export function DogMotivation() {
return ( return (
<div className="mb-6 print-hide relative overflow-hidden dog-motivation-ribbon"> <div className="mb-6 print-hide relative overflow-hidden dog-motivation-ribbon">
{/* Blurred background dog image */} {/* Soft gradient background (no external images) */}
<div <div
className="absolute inset-0 bg-cover bg-center opacity-10 blur-sm" className="absolute inset-0 opacity-10 blur-sm bg-gradient-to-br from-purple-100 via-blue-100 to-pink-100"
style={{ backgroundImage: 'url("https://static.devv.ai/evjz3wqmtuyo.JPG")' }}
/> />
{/* Decorative ribbons with gradient */} {/* Decorative ribbons with gradient */}
@ -17,12 +16,8 @@ export function DogMotivation() {
<CardContent className="p-4"> <CardContent className="p-4">
<div className="flex items-center gap-4"> <div className="flex items-center gap-4">
{/* Original image in proper size */} {/* Original image in proper size */}
<div className="shrink-0 w-32 h-32 overflow-hidden rounded-md border border-slate-200 shadow-sm"> <div className="shrink-0 w-32 h-32 overflow-hidden rounded-md border border-slate-200 shadow-sm flex items-center justify-center bg-white">
<img <span className="text-5xl" role="img" aria-label="dog">🐶</span>
src="https://static.devv.ai/evjz3wqmtuyo.JPG"
alt="有决心的狗狗"
className="w-full h-full object-cover"
/>
</div> </div>
<div className="flex flex-col"> <div className="flex flex-col">