diff --git a/app/js/lang/lang.en.js b/app/js/lang/lang.en.js index bbd91190..16a9858c 100644 --- a/app/js/lang/lang.en.js +++ b/app/js/lang/lang.en.js @@ -21,9 +21,9 @@ var lang = { //common/version.js "lang_version_usever": "No update is found({{ver}})", "lang_version_skipver": "Update was ignored.", - "lang_version_platform": "Was this software installed at Microsoft Store? Most users select 'No' since they installed from the website. When select 'yes', any update was ignored.", - "lang_version_platform_linux": "Was this software installed at Snapcraft(snapd)? Most users select 'No' since they installed from the website. When select 'yes', any update was ignored.", - "lang_version_platform_mac": "Was this software installed at Homebrew Cask? Most users select 'No' since they installed from the website. When select 'yes', any update was ignored.", + "lang_version_platform": "Do you want auto-updates?(users installed on Microsoft Store select 'No')", + "lang_version_platform_linux": "Do you want auto-updates?(users installed on Snapcraft select 'No')", + "lang_version_platform_mac": "Do you want auto-updates?(Homebrew Cask users select 'No')", //login //login/login.js "lang_login_noauth": "Show TL of unlogined accounts", @@ -111,6 +111,8 @@ var lang = { //tl/tl.js "lang_tl_media": "Media", "lang_tl_reconnect": "Reconnect to streaming API", + //ui/img.js + "lang_img_DLDone": "Downloaded:", //ui/layout.js "lang_layout_gotop": "Go top of this column. When icon is red, this column cannot connect straming API. Please reload.", "lang_layout_thisacct": "{{notf}} of this account", @@ -129,6 +131,8 @@ var lang = { "lang_layout_excludingbt": "Show BT mode(OFF/Exclude BT/Only BT)", "lang_layout_leftFold": "Stack to the left", "lang_layout_leftUnfold": "Dock on the right", + "lang_layout_deleteColumn":"Delete this column", + "lang_layout_deleteColumnDesc":"Delete this column", //ui/sort.js "lang_sort_gothis": "Go to this column", "lang_sort_remthis": "Delete this column", diff --git a/app/js/lang/lang.ja.js b/app/js/lang/lang.ja.js index 55fe6ec0..d5e6775e 100644 --- a/app/js/lang/lang.ja.js +++ b/app/js/lang/lang.ja.js @@ -131,6 +131,8 @@ var lang = { "lang_layout_excludingbt": "BT表示(OFF/BT除外/BTのみ)", "lang_layout_leftFold": "左へ重ねる", "lang_layout_leftUnfold": "右へ出す", + "lang_layout_deleteColumn":"カラム削除", + "lang_layout_deleteColumnDesc":"カラムを削除しますか?", //ui/sort.js "lang_sort_gothis": "このカラムへ", "lang_sort_remthis": "このカラムを削除", diff --git a/app/js/platform/end.js b/app/js/platform/end.js index 66cc8437..41358f6c 100644 --- a/app/js/platform/end.js +++ b/app/js/platform/end.js @@ -136,8 +136,6 @@ onmessage = function (e) { M.toast({ html: lang.lang_img_DLDone + e.data[1][0] + '', displayLength: 5000 }) } else if (e.data[0] == "parseColumn") { parseColumn() - } else if (e.data[0] == "sortload") { - sortload() } else if (e.data[0] == "exportSettingsCore") { exportSettingsCore() } else if (e.data[0] == "fontList") { diff --git a/app/js/platform/preload.js b/app/js/platform/preload.js index fc1373ae..1d19401e 100644 --- a/app/js/platform/preload.js +++ b/app/js/platform/preload.js @@ -111,23 +111,6 @@ ipc.on('general-dl-message', function (event, arg) { console.log("saved") postMessage(["toastSaved", [arg, argC]], "*") }) -//layout.js -ipc.on('column-del-reply', function (event, args) { - if (args[0] === 1) { - var multi = localStorage.getItem("column"); - var obj = JSON.parse(multi); - localStorage.removeItem("card_" + args[1]); - obj.splice(args[1], 1); - for (var i = 0; i < obj.length; i++) { - localStorage.setItem("card_" + i, "true"); - localStorage.removeItem("catch_" + i); - } - var json = JSON.stringify(obj); - localStorage.setItem("column", json); - postMessage(["parseColumn", ""], "*") - postMessage(["sortload", ""], "*") - } -}) //setting.js ipc.on('langres', function (event, arg) { location.href = "../" + lang + "/setting.html" diff --git a/app/js/ui/layout.js b/app/js/ui/layout.js index 640ffa0a..f23d7427 100644 --- a/app/js/ui/layout.js +++ b/app/js/ui/layout.js @@ -364,8 +364,26 @@ function addselCk() { function removeColumn(tlid) { $("#sort-box").addClass("hide"); $("#sort-box").removeClass("show"); - //聞く - postMessage(["columnDel", tlid], "*") + Swal.fire({ + title: lang.lang_layout_deleteColumn, + text: lang.lang_layout_deleteColumnDesc, + type: 'warning', + showCancelButton: true, + confirmButtonColor: '#3085d6', + cancelButtonColor: '#d33', + confirmButtonText: lang.lang_yesno, + cancelButtonText: lang.lang_no + }).then((result) => { + if (result.value) { + var multi = localStorage.getItem("column"); + var obj = JSON.parse(multi); + obj.splice(tlid, 1); + var json = JSON.stringify(obj); + localStorage.setItem("column", json); + parseColumn() + sortLoad() + } + }); } //設定トグル diff --git a/app/main/language.js b/app/main/language.js index 22e50afa..833d9d6b 100644 --- a/app/main/language.js +++ b/app/main/language.js @@ -146,33 +146,5 @@ function templete(lang, mainWindow, packaged, dir) { ]; return menu; } -function delsel(lang) { - const dict = { - "delete": { - "ja": "カラム削除", - "en": "Delete this column" - }, - "mess": { - "ja": "カラムを削除しますか?(すべてのカラムのリンク解析がOFFになります。)", - "en": "Delete this column(URL analyzes of all windows will be disabled.)" - }, - "yes": { - "ja": "はい", - "en": "Yes" - }, - "no": { - "ja": "いいえ", - "en": "No" - } - } - const options = { - type: 'info', - title: dict.delete[lang], - message: dict.mess[lang], - buttons: [dict.no[lang], dict.yes[lang]] - } - return options; -} -exports.template = templete; -exports.delsel = delsel; \ No newline at end of file +exports.template = templete; \ No newline at end of file diff --git a/app/main/system.js b/app/main/system.js index 9805d088..c9d255bc 100644 --- a/app/main/system.js +++ b/app/main/system.js @@ -136,13 +136,6 @@ function system(mainWindow, dir, lang, dirname) { window.loadURL(dir + '/about.html?ver=' + ver); return "true" } - ipc.on('column-del', (e, tlid) => { - console.log(tlid); - var options = language.delsel(lang) - dialog.showMessageBox(options, function (index) { - e.sender.webContents.send('column-del-reply', [index, tlid]); - }) - }); ipc.on('nano', function (e, x, y) { var nano_info_path = join(app.getPath("userData"),