notes and started on persistent journal...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-02-08 00:52:39 +03:00
parent f3f6c820db
commit 67e246e14a
2 changed files with 33 additions and 2 deletions

View File

@ -1934,8 +1934,8 @@ module.Timers = ImageGridFeatures.Feature({
// //
// XXX need a mechanism to store the journal in sync (localStorage/fs) // XXX need a mechanism to store the journal in sync (localStorage/fs)
// and be able to execute the journal from last save position if // and be able to execute the journal from a save position (which one?)
// recovering from close/crash... // if recovering from close/crash...
// XXX should this be a separate feature??? // XXX should this be a separate feature???
// //
// XXX would be great to add a mechanism define how to reverse actions... // XXX would be great to add a mechanism define how to reverse actions...
@ -2192,6 +2192,36 @@ module.Journal = ImageGridFeatures.Feature({
}) })
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// XXX persistent journal...
// - save journal to localStorage
// - save journal to file (auto-save)
// ...fs???
// - on load -> load journal after last save
// XXX need to revise journaling actions before shipping this...
// XXX EXPERIMENTAL...
var PersistentJournalActions = actions.Actions({
// XXX
})
var PersistentJournal =
module.PersistentJournal = ImageGridFeatures.Feature({
title: 'Action persistent Journal',
tag: 'persistent-journal',
depends: [
'journal',
],
actions: PersistentJournalActions,
handlers: [
// XXX
],
})
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// Changes... // Changes...

View File

@ -871,6 +871,7 @@ var SharpActions = actions.Actions({
}) })
// read the metadata... // read the metadata...
// XXX this can err on some images, need to handle this...
var exif = metadata.exif var exif = metadata.exif
&& exifReader(metadata.exif) && exifReader(metadata.exif)
exif exif