rename: Minuteur Dragodinde → Obsidienne

- Renommage complet dans package.json, main.ts, UI, tray, notifications
- GUID NSIS fixe pour mise à jour propre (pas de doublon d'installation)
- Migration automatique des données depuis %APPDATA%\Minuteur Dragodinde\
- Rétrocompatibilité import : backups 'minuteur-dragodinde' toujours acceptés
- Mise à jour README changelog, CLAUDE.md, docs, maquettes, page ntfy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-06 07:34:07 +02:00
parent 8af626dd66
commit 0c3b5e27a7
14 changed files with 60 additions and 37 deletions

View File

@@ -14,10 +14,10 @@ import fs from 'fs';
import { autoUpdater } from 'electron-updater';
// ─── NOM DE L'APPLICATION ─────────────────────────────────────────────────────
app.setName('Minuteur Dragodinde');
app.setName('Obsidienne');
// Windows utilise l'AppUserModelId pour le nom affiché dans les notifications
if (process.platform === 'win32') {
app.setAppUserModelId('Minuteur Dragodinde');
app.setAppUserModelId('Obsidienne');
}
// ─── MODE DEV / E2E ────────────────────────────<E29480><E29480>─────────────────────────────
@@ -26,7 +26,23 @@ if (process.env.ELECTRON_USER_DATA_DIR) {
app.setPath('userData', process.env.ELECTRON_USER_DATA_DIR);
} else if (!app.isPackaged) {
// En dev (npm start), les données sont isolées de l'app installée
app.setPath('userData', path.join(app.getPath('appData'), 'MinuteurDragodinde-DEV'));
app.setPath('userData', path.join(app.getPath('appData'), 'Obsidienne-DEV'));
}
// ─── MIGRATION DONNÉES (ancien nom → Obsidienne) ────────────────────────────
// Les utilisateurs de "Minuteur Dragodinde" conservent leurs données après le renommage
if (app.isPackaged) {
const oldDataFile = path.join(app.getPath('appData'), 'Minuteur Dragodinde', 'dd-timer-data.json');
const newDataFile = path.join(app.getPath('userData'), 'dd-timer-data.json');
if (!fs.existsSync(newDataFile) && fs.existsSync(oldDataFile)) {
try {
fs.mkdirSync(path.dirname(newDataFile), { recursive: true });
fs.copyFileSync(oldDataFile, newDataFile);
console.log('Migration données: Minuteur Dragodinde → Obsidienne OK');
} catch (e: unknown) {
console.error('Migration données échouée:', (e as Error).message);
}
}
}
// ─── CONFIG GITEA ─────────────────────────────────────────────────────────────
@@ -59,7 +75,7 @@ function getAppIcon(): Electron.NativeImage {
function createWindow(): void {
mainWindow = new BrowserWindow({
width: 1280, height: 900, minWidth: 960, minHeight: 650,
title: 'Minuteur Dragodinde - Dofus 3',
title: 'Obsidienne - Dofus 3',
icon: getAppIcon(),
backgroundColor: '#0b0b14',
webPreferences: {
@@ -85,7 +101,7 @@ function createWindow(): void {
buttons: ['Minimiser', 'Quitter'],
defaultId: 0,
cancelId: 0,
title: 'Minuteur Dragodinde',
title: 'Obsidienne',
message: 'Que souhaites-tu faire ?',
detail: 'Minimiser garde l\'app en arriere-plan.\nLes alarmes continueront de sonner.',
});
@@ -127,7 +143,7 @@ function createWindow(): void {
// ─── TRAY ─────────────────────────────────────────────────────────────────────
function createTray(): void {
tray = new Tray(getAppIcon());
tray.setToolTip(`Minuteur Dragodinde v${CURRENT_VERSION}`);
tray.setToolTip(`Obsidienne v${CURRENT_VERSION}`);
rebuildTrayMenu();
tray.on('double-click', () => { mainWindow!.show(); mainWindow!.focus(); });
}
@@ -135,7 +151,7 @@ function createTray(): void {
function rebuildTrayMenu(): void {
if (!tray) return;
const items: Electron.MenuItemConstructorOptions[] = [
{ label: `Minuteur Dragodinde v${CURRENT_VERSION}`, enabled: false },
{ label: `Obsidienne v${CURRENT_VERSION}`, enabled: false },
{ type: 'separator' },
{ label: 'Ouvrir', click: () => { mainWindow!.show(); mainWindow!.focus(); } },
];
@@ -361,7 +377,7 @@ function checkForUpdates(silent = false): void {
path: `/api/v1/repos/${GITEA_USER}/${GITEA_REPO}/releases?limit=1`,
method: 'GET',
headers: {
'User-Agent': `MinuteurDragodinde/${CURRENT_VERSION}`,
'User-Agent': `Obsidienne/${CURRENT_VERSION}`,
'Accept': 'application/json',
},
};

View File

@@ -56,7 +56,7 @@ export class App {
<header class="app-header">
<button class="app-hamburger" id="hamburger-btn">&#9776;</button>
<div class="app-header-text">
<h1 class="app-title"><span class="app-title-icon">&#x2694;</span> Minuteur Dragodinde</h1>
<h1 class="app-title"><span class="app-title-icon">&#x2694;</span> Obsidienne</h1>
<p class="app-subtitle">Dofus 3 &middot; Gestion multi-enclos en temps r&eacute;el</p>
</div>
<div class="app-hamburger" style="visibility:hidden;pointer-events:none;" aria-hidden="true"></div>

View File

@@ -301,7 +301,7 @@ export class ParametresView {
const { ntfyTopic } = this.getSettings();
if (!ntfyTopic) return;
const url = `${NTFY_BASE}/${ntfyTopic}`;
(window as any).electronAPI?.sendNtfy?.(url, 'Test alarme', 'Ceci est un test de la notification mobile Minuteur Dragodinde !');
(window as any).electronAPI?.sendNtfy?.(url, 'Test alarme', 'Ceci est un test de la notification mobile Obsidienne !');
}
/* ══ Backup / Restore ══ */
@@ -319,7 +319,7 @@ export class ParametresView {
const version = await api.getVersion?.() ?? 'unknown';
const backup = {
app: 'minuteur-dragodinde',
app: 'obsidienne',
version,
exportedAt: new Date().toISOString(),
data: JSON.parse(raw),
@@ -366,7 +366,7 @@ export class ParametresView {
};
// Validation du format backup
if (parsed.app === 'minuteur-dragodinde' && parsed.data && typeof parsed.data === 'object' && parsed.data !== null) {
if ((parsed.app === 'obsidienne' || parsed.app === 'minuteur-dragodinde') && parsed.data && typeof parsed.data === 'object' && parsed.data !== null) {
if (!validateEnclosData(parsed.data)) {
Toast.show('error', 'Le backup contient des données corrompues ou incomplètes.');
return;