From c24ef878c4c2e1625a3cb8dbe31f8db7188d2af0 Mon Sep 17 00:00:00 2001 From: cutls Date: Sat, 8 Feb 2020 00:59:56 +0900 Subject: [PATCH] PWA: modal platform --- app/js/common/version.js | 91 +++++++++++++++++++++++++--------------- 1 file changed, 58 insertions(+), 33 deletions(-) diff --git a/app/js/common/version.js b/app/js/common/version.js index 2358175e..45527d7e 100644 --- a/app/js/common/version.js +++ b/app/js/common/version.js @@ -329,43 +329,68 @@ function storeDialog(platform, ver) { var mes = lang.lang_version_platform_linux } else if (platform == 'darwin') { var mes = lang.lang_version_platform_mac + } else { + var mes = false } - Swal.fire({ - title: 'Select your platform', - text: mes, - type: 'info', - showCancelButton: true, - confirmButtonColor: '#3085d6', - cancelButtonColor: '#3085d6', - confirmButtonText: lang.lang_no, - cancelButtonText: lang.lang_yesno - }).then(result => { - //逆にしてる - if (!result.value) { - localStorage.setItem('winstore', 'winstore') - } else { - localStorage.setItem('winstore', 'localinstall') - } - localStorage.setItem('ver', ver) - show = true - console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;') - $(document).ready(function() { - $('#releasenote').modal('open') - verp = ver.replace('(', '') - verp = verp.replace('.', '-') - verp = verp.replace('.', '-') - verp = verp.replace('[', '-') - verp = verp.replace(']', '') - verp = verp.replace(')', '') - verp = verp.replace(' ', '_') - console.log('%c ' + verp, 'color: red;font-size:200%;') - if (lang.language == 'ja') { - $('#release-' + verp).show() + if (mes) { + Swal.fire({ + title: 'Select your platform', + text: mes, + type: 'info', + showCancelButton: true, + confirmButtonColor: '#3085d6', + cancelButtonColor: '#3085d6', + confirmButtonText: lang.lang_no, + cancelButtonText: lang.lang_yesno + }).then(result => { + //逆にしてる + if (!result.value) { + localStorage.setItem('winstore', 'winstore') } else { - $('#release-en').show() + localStorage.setItem('winstore', 'localinstall') } + localStorage.setItem('ver', ver) + show = true + console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;') + $(document).ready(function() { + $('#releasenote').modal('open') + verp = ver.replace('(', '') + verp = verp.replace('.', '-') + verp = verp.replace('.', '-') + verp = verp.replace('[', '-') + verp = verp.replace(']', '') + verp = verp.replace(')', '') + verp = verp.replace(' ', '_') + console.log('%c ' + verp, 'color: red;font-size:200%;') + if (lang.language == 'ja') { + $('#release-' + verp).show() + } else { + $('#release-en').show() + } + }) }) - }) + } else { + localStorage.setItem('ver', ver) + show = true + console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;') + $(document).ready(function() { + $('#releasenote').modal('open') + verp = ver.replace('(', '') + verp = verp.replace('.', '-') + verp = verp.replace('.', '-') + verp = verp.replace('[', '-') + verp = verp.replace(']', '') + verp = verp.replace(')', '') + verp = verp.replace(' ', '_') + console.log('%c ' + verp, 'color: red;font-size:200%;') + if (lang.language == 'ja') { + $('#release-' + verp).show() + } else { + $('#release-en').show() + } + }) + } + } function closeStart() { $('#start').css('display', 'none')