mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
now export history items are unique...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
42ead16808
commit
06244ddbbe
@ -3507,20 +3507,37 @@ var FileSystemWriterUIActions = actions.Actions({
|
|||||||
|
|
||||||
exportHistoryPush: ['- File/',
|
exportHistoryPush: ['- File/',
|
||||||
function(settings){
|
function(settings){
|
||||||
settings = settings
|
//settings = settings
|
||||||
|| this.config['export-settings']
|
// || this.config['export-settings']
|
||||||
var l = this.config['export-history-length'] || 50
|
var l = this.config['export-history-length'] || 50
|
||||||
var history =
|
var history =
|
||||||
this.config['export-history'] =
|
this.config['export-history'] =
|
||||||
this.config['export-history'] || []
|
this.config['export-history'] || []
|
||||||
// add...
|
// add...
|
||||||
settings
|
if(settings){
|
||||||
&& history.push(Object.assign(
|
// set .date...
|
||||||
|
settings = Object.assign(
|
||||||
JSON.parse(JSON.stringify( settings )),
|
JSON.parse(JSON.stringify( settings )),
|
||||||
{
|
{ date: Date.timeStamp(true) })
|
||||||
date: Date.timeStamp(true),
|
// remove all identical settings from history...
|
||||||
}))
|
var keys_l = Object.keys(settings).length
|
||||||
// trim the history...
|
for(var i=history.length-1; i >= 0; i--){
|
||||||
|
var item = history[i]
|
||||||
|
if(keys_l != Object.keys(item).length){
|
||||||
|
continue }
|
||||||
|
var match = true
|
||||||
|
for(var k in settings){
|
||||||
|
// ignore .date...
|
||||||
|
if(k == 'date'){
|
||||||
|
continue }
|
||||||
|
if(item[k] != settings[k]){
|
||||||
|
match = false
|
||||||
|
break } }
|
||||||
|
match
|
||||||
|
&& history.splice(i, 1) }
|
||||||
|
// add...
|
||||||
|
history.push(settings) }
|
||||||
|
// trim the history list to length...
|
||||||
history.length > l
|
history.length > l
|
||||||
&& history.splice(0, history.length - l) }],
|
&& history.splice(0, history.length - l) }],
|
||||||
clearExportHistory: ['- File/Clear export history',
|
clearExportHistory: ['- File/Clear export history',
|
||||||
|
|||||||
4
Viewer/package-lock.json
generated
4
Viewer/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ImageGrid.Viewer.g4",
|
"name": "ImageGrid.Viewer.g4",
|
||||||
"version": "4.0.11a",
|
"version": "4.0.13a",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ImageGrid.Viewer.g4",
|
"name": "ImageGrid.Viewer.g4",
|
||||||
"version": "4.0.11a",
|
"version": "4.0.13a",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"app-module-path": "*",
|
"app-module-path": "*",
|
||||||
"async-json": "0.0.2",
|
"async-json": "0.0.2",
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "ImageGrid.Viewer.g4",
|
"name": "ImageGrid.Viewer.g4",
|
||||||
"main": "index.html",
|
"main": "index.html",
|
||||||
"version": "4.0.12a",
|
"version": "4.0.13a",
|
||||||
"author": "Alex A. Naanou <alex.nanou@gmail.com> (https://github.com/flynx)",
|
"author": "Alex A. Naanou <alex.nanou@gmail.com> (https://github.com/flynx)",
|
||||||
"contributors": [],
|
"contributors": [],
|
||||||
"repository": "github:flynx/ImageGrid",
|
"repository": "github:flynx/ImageGrid",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user