Fix
This commit is contained in:
@@ -1012,6 +1012,26 @@ db.exec(`
|
||||
VALUES ('logo-app', 'app-logo.svg', 'Logo principal de la plateforme')
|
||||
`).run();
|
||||
}
|
||||
|
||||
// Génère le fichier app-logo.svg dans le dossier icons s'il est absent
|
||||
{
|
||||
const dataDir = process.env.DATA_DIR
|
||||
? path.resolve(process.env.DATA_DIR)
|
||||
: path.resolve(__dirname, '../../data');
|
||||
const logoPath = path.join(dataDir, 'icons', 'app-logo.svg');
|
||||
|
||||
if (!fs.existsSync(logoPath)) {
|
||||
fs.mkdirSync(path.dirname(logoPath), { recursive: true });
|
||||
fs.writeFileSync(logoPath, `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||
<rect width="100" height="100" rx="22" fill="#1e3a6e"/>
|
||||
<rect x="14" y="62" width="20" height="24" rx="3" fill="#4a7fc1" opacity="0.85"/>
|
||||
<rect x="40" y="46" width="20" height="40" rx="3" fill="#6a9fd8" opacity="0.9"/>
|
||||
<rect x="66" y="30" width="20" height="56" rx="3" fill="#8ab8e8"/>
|
||||
<polygon points="76,8 90,28 82,28 82,36 70,36 70,28 62,28" fill="#22c55e"/>
|
||||
</svg>`, 'utf8');
|
||||
console.log('[DB] app-logo.svg généré dans', path.dirname(logoPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ── Migration : compte_id sur investissements ────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user