From eb86966d33dc1a1b89bfcf722c5cbedd6b71a1e7 Mon Sep 17 00:00:00 2001 From: kPherox Date: Thu, 21 Mar 2019 17:01:55 +0900 Subject: [PATCH] Ignore update for homebrew cask --- app/js/common/version.js | 21 ++++++++++++++++++++- app/js/lang/lang.en.js | 1 + app/js/lang/lang.ja.js | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/app/js/common/version.js b/app/js/common/version.js index 317b89f1..d0575e33 100644 --- a/app/js/common/version.js +++ b/app/js/common/version.js @@ -62,10 +62,29 @@ function verck(ver) { } }); } + }else if(platform=="darwin"){ + if(localStorage.getItem("winstore")=="unix"){ + localStorage.removeItem("winstore") + } + if(!localStorage.getItem("winstore")){ + const options = { + type: 'info', + title: "Select your platform", + message: lang.lang_version_platform_mac, + buttons: [lang.lang_no,lang.lang_yesno] + } + dialog.showMessageBox(options, function(arg) { + if(arg==1){ + localStorage.setItem("winstore","brewcask") + }else{ + localStorage.setItem("winstore","localinstall") + } + }); + } }else{ localStorage.setItem("winstore","unix") } - if(localStorage.getItem("winstore")=="snapcraft" || localStorage.getItem("winstore")=="winstore"){ + if(localStorage.getItem("winstore")=="brewcask" || localStorage.getItem("winstore")=="snapcraft" || localStorage.getItem("winstore")=="winstore"){ var winstore=true; }else{ var winstore=false; diff --git a/app/js/lang/lang.en.js b/app/js/lang/lang.en.js index a7fb96ce..56ec973a 100644 --- a/app/js/lang/lang.en.js +++ b/app/js/lang/lang.en.js @@ -23,6 +23,7 @@ var lang={ "lang_version_skipver":"Update was ignored.", "lang_version_platform":"Was this software installed at Microsoft Store? When select 'yes', any update was ignored.", "lang_version_platform_linux":"Was this software installed at Snapcraft(snapd)? When select 'yes', any update was ignored.", + "lang_version_platform_mac":"Was this software installed at Homebrew Cask? When select 'yes', any update was ignored.", //login //login/login.js "lang_login_noauth":"Show TL of unlogined accounts", diff --git a/app/js/lang/lang.ja.js b/app/js/lang/lang.ja.js index 6b35ed78..8d12d44e 100644 --- a/app/js/lang/lang.ja.js +++ b/app/js/lang/lang.ja.js @@ -23,6 +23,7 @@ var lang={ "lang_version_skipver":"アップデートはスキップされました。", "lang_version_platform":"このソフトウェアはMicrosoft Storeからダウンロードされましたか?(「はい」を選択すると次回からアップデート通知を無視します。)", "lang_version_platform_linux":"このソフトウェアはSnapcraft(snapd)からインストールしましたか?(「はい」を選択すると次回からアップデート通知を無視します。)", + "lang_version_platform_mac":"このソフトウェアはHomebrew Caskからインストールしましたか?(「はい」を選択すると次回からアップデート通知を無視します。)", //login //login/login.js "lang_login_noauth":"認証せずに見る",