diff --git a/app/js/platform/preload.js b/app/js/platform/preload.js index 8d96cdaa..024d7314 100644 --- a/app/js/platform/preload.js +++ b/app/js/platform/preload.js @@ -116,6 +116,9 @@ ipc.on('langres', function (event, arg) { ipc.on('exportSettingsFile', function (event, arg) { postMessage(["exportSettingsCore", arg], "*") }); +ipc.on('exportAllComplete', function (event, arg) { + postMessage(["alert", "Complete"], "*") +}); ipc.on('config', function (event, arg) { postMessage(["importSettingsCore", arg], "*") }); diff --git a/app/js/ui/settings.js b/app/js/ui/settings.js index 99bbc28e..fb01fcbe 100644 --- a/app/js/ui/settings.js +++ b/app/js/ui/settings.js @@ -121,9 +121,9 @@ function load() { } else { ls = tlView.config[i].data for (var j = 0; j < ls.length; j++) { - if(localStorage.getItem(tlView.config[i].data[j].storage)){ + if (localStorage.getItem(tlView.config[i].data[j].storage)) { tlView.config[i].data[j].setValue = localStorage.getItem(tlView.config[i].data[j].storage) - } + } } } } @@ -323,7 +323,11 @@ function exportSettingsCore() { var tagarr = localStorage.getItem("tag"); var favtag = JSON.parse(tagarr); exp.favoriteTags = favtag; - exp.version = "2.1" + exp.revisons = 2.1 + exp.meta = {} + exp.meta.date = new Date() + exp.meta.thedesk = localStorage.getItem("ver") + exp.meta.platform = localStorage.getItem("platform") return exp; } function importSettings() { diff --git a/app/main/system.js b/app/main/system.js index 560cabe1..f59a2f7b 100644 --- a/app/main/system.js +++ b/app/main/system.js @@ -196,6 +196,7 @@ function system(mainWindow, dir, lang, dirname) { ipc.on('export', (e, args) => { fs.writeFileSync(args[0], JSON5.stringify(args[1])); + e.sender.webContents.send('exportAllComplete', ""); }); //フォント function object_array_sort(data, key, order, fn) {