feat: ajout des fonctionnalités de téléchargement et de masquage des chapitres, avec mise à jour des composants et de l'API pour gérer ces actions.
This commit is contained in:
parent
8692fa14c6
commit
17f9feea7b
@@ -209,6 +209,28 @@ export const useMangaStore = defineStore('manga', {
|
||||
console.error('Erreur lors de la suppression du chapitre:', error);
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
|
||||
// --- Download Chapter Action ---
|
||||
async downloadChapter(chapterId) {
|
||||
try {
|
||||
await mangaRepository.downloadChapter(chapterId);
|
||||
} catch (error) {
|
||||
console.error('Erreur lors du téléchargement du chapitre:', error);
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
|
||||
// --- Hide Chapter Action ---
|
||||
async hideChapter(chapterId, mangaId) {
|
||||
try {
|
||||
await mangaRepository.hideChapter(chapterId);
|
||||
// Recharger la liste des chapitres depuis l'API
|
||||
await this.loadChapters(mangaId);
|
||||
} catch (error) {
|
||||
console.error('Erreur lors du masquage du chapitre:', error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user