From 2041020d9763ddad3cc5b6d34b193c12e8edccc1 Mon Sep 17 00:00:00 2001 From: mtsgi Date: Mon, 29 Jul 2019 23:52:15 +0900 Subject: [PATCH] Add Backup-File Generate System of app/bandr [0.2.0] --- app/bandr/b.html | 4 ++++ app/bandr/bandr.js | 15 ++++++++++++++- app/bandr/default.html | 4 ++-- app/bandr/r.html | 6 ++++++ 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 app/bandr/b.html create mode 100644 app/bandr/r.html diff --git a/app/bandr/b.html b/app/bandr/b.html new file mode 100644 index 0000000..8564619 --- /dev/null +++ b/app/bandr/b.html @@ -0,0 +1,4 @@ +戻る +バックアップ +
 クリックするとバックアップファイルの生成が開始されます。
+
バックアップを開始
\ No newline at end of file diff --git a/app/bandr/bandr.js b/app/bandr/bandr.js index d3c766a..d13ddb4 100644 --- a/app/bandr/bandr.js +++ b/app/bandr/bandr.js @@ -1,3 +1,16 @@ ((_pid) => { - + App.event(_pid, "b", ()=>{ + let _export = encodeURI(JSON.stringify(localStorage)); + let _blob = new Blob([_export], { type: "application/json" }); + const a = document.createElement('a'); + a.download = new Date().toISOString() + '.json'; + a.href = URL.createObjectURL(_blob); + a.click(); + a.parentNode.removeChild(a); + }); + App.event(_pid, "r", ()=>{ + //System.dialog("復元の確認", "本当に現在のプロファイルを破棄して復元を実行しますか?", ()=>{ + // Notification.push( S.dom(_pid, "#bandr-file").val() ); + //}); + }); })(pid); \ No newline at end of file diff --git a/app/bandr/default.html b/app/bandr/default.html index 120555f..4a14778 100644 --- a/app/bandr/default.html +++ b/app/bandr/default.html @@ -1,5 +1,5 @@ バックアップと復元ウィザードでは、kit環境のバックアップ・復元を簡単な手順で行います。
-
バックアップ
-
リストア
+
バックアップ
+
リストア
\ No newline at end of file diff --git a/app/bandr/r.html b/app/bandr/r.html new file mode 100644 index 0000000..0e66806 --- /dev/null +++ b/app/bandr/r.html @@ -0,0 +1,6 @@ +戻る +リストア +
 ファイルを読み込んでリストアを実行できます。バックアップと復元アプリケーションで作成したバックアップファイルを選択してください。
+ +
 「復元を開始」を押下すると、現在のkitデータは失われます。異なるプロファイルを復元しようとしている場合は必ず現在のプロファイルのバックアップファイルを保存してから復元を行ってください。
+
復元を開始
\ No newline at end of file -- 2.11.0