mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-18 12:49:29 +02:00
Feature: Support multi-images, Google Calendar et correction RTL
Images multiples : - Ajout table note_images dans la base de données - Routes POST/GET/DELETE /api/notes/:id/images - Dossier uploads/images séparé pour les images - Support de plusieurs images par note Google Calendar : - Ajout table calendar_events - Routes /api/calendar pour sync et récupération des événements - Box Rendez-vous dans l'interface avec affichage des événements à venir - Configuration Google Calendar dans l'admin (API key et Calendar ID) - Synchronisation manuelle avec Google Calendar API - Installation package googleapis Corrections : - Fix RichTextEditor: ajout dir="ltr" pour empêcher l'écriture RTL - Fix Image type conflict (lucide-react vs Note interface) - Ajout original_name à l'interface Image pour compatibilité Interface : - Box Rendez-vous empilée avec Todos et RSS dans la colonne droite - Nouvel onglet Google Calendar dans l'administration - Bouton "Synchroniser" pour rafraîchir les événements
This commit is contained in:
10 files changed
+946
-5
No files matched your search
@@ -74,6 +74,18 @@ function initDatabase() {
|
||||
)
|
||||
`);
|
||||
|
||||
// Table note_images (images attachées aux notes)
|
||||
db.run(`
|
||||
CREATE TABLE IF NOT EXISTS note_images (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
note_id INTEGER NOT NULL,
|
||||
filename TEXT NOT NULL,
|
||||
original_name TEXT,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE
|
||||
)
|
||||
`);
|
||||
|
||||
// Table note_files (fichiers attachés aux notes)
|
||||
db.run(`
|
||||
CREATE TABLE IF NOT EXISTS note_files (
|
||||
@@ -137,14 +149,35 @@ function initDatabase() {
|
||||
)
|
||||
`);
|
||||
|
||||
// Table calendar_events (événements Google Calendar)
|
||||
db.run(`
|
||||
CREATE TABLE IF NOT EXISTS calendar_events (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
google_event_id TEXT UNIQUE NOT NULL,
|
||||
user_id INTEGER NOT NULL,
|
||||
title TEXT NOT NULL,
|
||||
description TEXT,
|
||||
start_time DATETIME NOT NULL,
|
||||
end_time DATETIME NOT NULL,
|
||||
location TEXT,
|
||||
color_id TEXT,
|
||||
html_link TEXT,
|
||||
synced_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
||||
)
|
||||
`);
|
||||
|
||||
// Créer les index pour la performance
|
||||
db.run('CREATE INDEX IF NOT EXISTS idx_notes_user ON notes(user_id)');
|
||||
db.run('CREATE INDEX IF NOT EXISTS idx_note_todos ON note_todos(note_id)');
|
||||
db.run('CREATE INDEX IF NOT EXISTS idx_global_todos_user ON global_todos(user_id)');
|
||||
db.run('CREATE INDEX IF NOT EXISTS idx_note_images ON note_images(note_id)');
|
||||
db.run('CREATE INDEX IF NOT EXISTS idx_note_files ON note_files(note_id)');
|
||||
db.run('CREATE INDEX IF NOT EXISTS idx_settings_key ON settings(key)');
|
||||
db.run('CREATE INDEX IF NOT EXISTS idx_rss_articles_feed ON rss_articles(feed_id)');
|
||||
db.run('CREATE INDEX IF NOT EXISTS idx_rss_articles_date ON rss_articles(pub_date)');
|
||||
db.run('CREATE INDEX IF NOT EXISTS idx_calendar_events_user ON calendar_events(user_id)');
|
||||
db.run('CREATE INDEX IF NOT EXISTS idx_calendar_events_start ON calendar_events(start_time)');
|
||||
|
||||
logger.info('✓ Tables de base de données créées avec succès');
|
||||
|
||||
|
||||
Reference in new issue
Block a user