improve: update
This commit is contained in:
parent
0677c24887
commit
bb08ec2435
|
@ -2,15 +2,18 @@
|
||||||
"updatehere":"Get latest TheDesk",
|
"updatehere":"Get latest TheDesk",
|
||||||
"download":"Start",
|
"download":"Start",
|
||||||
"portable":"Portable ver.",
|
"portable":"Portable ver.",
|
||||||
"installer":"Installer ver.",
|
"installer":"Installer(Recommended)",
|
||||||
"snap":"Snap ver may be on Snapcraft",
|
"linux":"zip",
|
||||||
"unrewrite":"Not rewrite",
|
"linuxdeb":"deb(Recommended on buntu, Debian)",
|
||||||
|
"linuxsnap":"snap",
|
||||||
|
"snap":"Get it on Snapcraft",
|
||||||
"sureupd":"You may lose a cool experience!",
|
"sureupd":"You may lose a cool experience!",
|
||||||
"skipupd":"Skip this update",
|
"skipupd":"Skip this update",
|
||||||
"nexttl":"Until next TL loading",
|
"nexttl":"Hidden until next TL loading",
|
||||||
"nextver":"Until next version",
|
"nextver":"Hidden until next version",
|
||||||
"problem1":"Some problems?",
|
"problem1":"Some problems?",
|
||||||
"problem2":"Please download on <a href='https://thedesk.top'>Oficial HP</a>.",
|
"problem2":"Please download on <a href='https://thedesk.top'>Oficial HP</a>.",
|
||||||
"continue":"Continue updating",
|
"continue":"Continue updating",
|
||||||
"dlnow":"Downloading..."
|
"dlnow":"Downloading...",
|
||||||
|
"checkWhatIsNew": "What is new?"
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
"snap":"snap版はSnapcraft等よりDLしてください。",
|
"snap":"snap版はSnapcraft等よりDLしてください。",
|
||||||
"sureupd":"アップデートは必ず行ってください",
|
"sureupd":"アップデートは必ず行ってください",
|
||||||
"skipupd":"アップデートをスキップする",
|
"skipupd":"アップデートをスキップする",
|
||||||
"nexttl":"次回TL表示時まで",
|
"nexttl":"次回TL表示時までスキップ",
|
||||||
"nextver":"次のバージョンが出るまで",
|
"nextver":"次のバージョンが出るまでスキップ",
|
||||||
"problem1":"問題が発生しますか?",
|
"problem1":"問題が発生しますか?",
|
||||||
"problem2":"<a href='https://thedesk.top'>公式HP</a>からダウンロードをお試しください。",
|
"problem2":"<a href='https://thedesk.top'>公式HP</a>からダウンロードをお試しください。",
|
||||||
"continue":"アップデートを続行",
|
"continue":"アップデートを続行",
|
||||||
"dlnow":"ダウンロード中"
|
"dlnow":"ダウンロード中",
|
||||||
|
"checkWhatIsNew": "アップデート内容"
|
||||||
}
|
}
|
|
@ -380,10 +380,10 @@
|
||||||
onclick="spotifyAuth()" class="btn waves-effect" style="width:100px;">@@set@@</button></div>
|
onclick="spotifyAuth()" class="btn waves-effect" style="width:100px;">@@set@@</button></div>
|
||||||
<a onclick="spotifyConnect()" class="btn waves-effect nex"
|
<a onclick="spotifyConnect()" class="btn waves-effect nex"
|
||||||
style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-enable"><i
|
style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-enable"><i
|
||||||
class="fa fa-spotify left"></i>@@connect@@</a>
|
class="fab fa-spotify left"></i>@@connect@@</a>
|
||||||
<a onclick="spotifyDisconnect()" class="btn waves-effect nex disabled"
|
<a onclick="spotifyDisconnect()" class="btn waves-effect nex disabled"
|
||||||
style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-disable"><i
|
style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-disable"><i
|
||||||
class="fa fa-spotify left"></i>@@disconnect@@</a>
|
class="fab fa-spotify left"></i>@@disconnect@@</a>
|
||||||
<h5>@@templateedit@@</h5>
|
<h5>@@templateedit@@</h5>
|
||||||
@@templateeditwarn@@<br>
|
@@templateeditwarn@@<br>
|
||||||
<textarea id="np-temp" class="materialize-textarea" data-length="500">#NowPlaying {song} / {album} / {artist}
|
<textarea id="np-temp" class="materialize-textarea" data-length="500">#NowPlaying {song} / {album} / {artist}
|
||||||
|
|
|
@ -1,262 +1,259 @@
|
||||||
<!doctype html>
|
<!DOCTYPE html>
|
||||||
<html lang="@@lang@@">
|
<html lang="@@lang@@">
|
||||||
|
<head>
|
||||||
|
<title>Update - TheDesk</title>
|
||||||
|
<link href="../../node_modules/materialize-css/dist/css/materialize.css" type="text/css" rel="stylesheet" />
|
||||||
|
<link href="../../css/master.css" type="text/css" rel="stylesheet" />
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
@@comment-start@@
|
||||||
|
<script type="text/javascript">
|
||||||
|
var _jipt = [];
|
||||||
|
_jipt.push(["project", "thedesk"]);
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
|
||||||
|
@@comment-end@@
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: "Open Sans";
|
||||||
|
-webkit-app-region: drag;
|
||||||
|
cursor: move;
|
||||||
|
padding: 10px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
<head>
|
#start {
|
||||||
<title>Update - TheDesk</title>
|
display: flex;
|
||||||
<link href="../../node_modules/materialize-css/dist/css/materialize.css" type="text/css" rel="stylesheet">
|
justify-content: center;
|
||||||
<link href="../../css/master.css" type="text/css" rel="stylesheet">
|
align-items: center;
|
||||||
<meta charset="utf-8">
|
width: 100vw;
|
||||||
@@comment-start@@
|
height: calc(100vh - 2.5rem);
|
||||||
<script type="text/javascript">
|
text-align: center;
|
||||||
var _jipt = [];
|
}
|
||||||
_jipt.push(['project', 'thedesk']);
|
|
||||||
</script>
|
|
||||||
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
|
|
||||||
@@comment-end@@
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
#checkbox {
|
||||||
<style>
|
text-align: left;
|
||||||
body {
|
}
|
||||||
font-family: 'Open Sans';
|
|
||||||
-webkit-app-region: drag;
|
|
||||||
cursor: move;
|
|
||||||
padding: 10px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
#start {
|
a,
|
||||||
display: flex;
|
button,
|
||||||
justify-content: center;
|
input,
|
||||||
align-items: center;
|
label,
|
||||||
width: 100vw;
|
i {
|
||||||
height: calc(100vh - 2.5rem);
|
-webkit-app-region: no-drag;
|
||||||
text-align: center;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#checkbox {
|
#updskip {
|
||||||
text-align: left;
|
display: flex;
|
||||||
}
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
a,
|
.skipbtn {
|
||||||
button,
|
display: block;
|
||||||
input,
|
float: left;
|
||||||
label,
|
width: 250px;
|
||||||
i {
|
height: 200px;
|
||||||
-webkit-app-region: no-drag;
|
border: 1px solid;
|
||||||
}
|
margin-left: 5px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
border: 1px solid #c26363;
|
||||||
|
overflow: hidden;
|
||||||
|
color: #c26363
|
||||||
|
}
|
||||||
|
|
||||||
#updskip {
|
.skipbtn:hover {
|
||||||
display: flex;
|
background-color: #c26363;
|
||||||
justify-content: center;
|
transition: all 0.3s ease-in-out;
|
||||||
align-items: center;
|
color:white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skipbtn {
|
#prog {
|
||||||
display: block;
|
font-size: 200%;
|
||||||
float: left;
|
}
|
||||||
width: 200px;
|
</style>
|
||||||
height: 200px;
|
<link href="../../node_modules/@fortawesome/fontawesome-free/css/all.min.css" type="text/css" rel="stylesheet" />
|
||||||
border: 1px solid;
|
</head>
|
||||||
margin-left: 5px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
border: 1px solid;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skipbtn:hover {
|
<body>
|
||||||
background-color: #b3e5fc;
|
<script type="text/javascript" src="../../node_modules/jquery/dist/jquery.js"></script>
|
||||||
transition: all 0.3s ease-in-out;
|
<script type="text/javascript" src="../../js/platform/first.js"></script>
|
||||||
}
|
<script type="text/javascript" src="../../node_modules/materialize-css/dist/js/materialize.js"></script>
|
||||||
|
<i class="material-icons pointer waves-effect" onclick="about();">info</i>
|
||||||
|
<i class="material-icons pointer waves-effect" onclick="skipper();">clear</i>
|
||||||
|
<!--a href="update.html">Reload</a-->
|
||||||
|
<div id="start">
|
||||||
|
<div id="box" class="show">
|
||||||
|
<h2>TheDesk</h2>
|
||||||
|
<p>@@updatehere@@</p>
|
||||||
|
<span id="now"></span>→<b id="ver"></b><br />
|
||||||
|
<a href="" id="github" class="btn waves-effect grey darken-1"><i class="fab fa-github left"></i>@@checkWhatIsNew@@</a><br />
|
||||||
|
<button class="waves-effect btn windows hide" onclick="update('install')" style="margin-left:15px;">@@installer@@</button>
|
||||||
|
<button class="waves-effect btn windows hide" onclick="update('portable')" style="margin-left:15px;">@@portable@@</button>
|
||||||
|
<button class="waves-effect btn linux hide" onclick="update('linux')" style="margin-left:15px;">@@linux@@</button>
|
||||||
|
<button class="waves-effect btn linux hide" onclick="update('linuxdeb')" style="margin-left:15px;">@@linuxdeb@@</button>
|
||||||
|
<button class="waves-effect btn linux hide" onclick="update('linuxsnap')" style="margin-left:15px;">@@linuxsnap@@</button>
|
||||||
|
<button class="waves-effect btn mac hide" onclick="update('mac')" style="margin-left:15px;">@@download@@</button>
|
||||||
|
<br />
|
||||||
|
@@problem1@@<br />@@problem2@@
|
||||||
|
</div>
|
||||||
|
<div id="skipper" class="hide">
|
||||||
|
<h4>@@skipupd@@</h4>
|
||||||
|
@@sureupd@@<br />
|
||||||
|
<div id="updskip">
|
||||||
|
<a onclick="window.close();" class="pointer skipbtn waves-effect waves-light">
|
||||||
|
<div>@@nexttl@@</div>
|
||||||
|
</a>
|
||||||
|
<a onclick="nextv();" class="pointer skipbtn waves-effect waves-light">
|
||||||
|
<div>@@nextver@@</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<a class="pointer waves-effect" onclick="skipper();" style="margin-top:5px">@@continue@@</a>
|
||||||
|
</div>
|
||||||
|
<div id="dlnow" class="hide">
|
||||||
|
<h4>@@dlnow@@</h4>
|
||||||
|
<h4 id="prog"></h4>
|
||||||
|
<div class="progress">
|
||||||
|
<div class="determinate" style="width: 0%"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="../../js/common/about.js"></script>
|
||||||
|
<script type="text/javascript" src="../../js/platform/end.js"></script>
|
||||||
|
<script>
|
||||||
|
function skipper() {
|
||||||
|
$("#dlnow").addClass("hide");
|
||||||
|
$("#box").toggleClass("show");
|
||||||
|
if ($("#box").hasClass("hide") && $("#skipper").hasClass("hide")) {
|
||||||
|
$("#skipper").removeClass("hide");
|
||||||
|
$("#skipper").addClass("show");
|
||||||
|
} else {
|
||||||
|
$("#box").toggleClass("hide");
|
||||||
|
$("#skipper").toggleClass("hide");
|
||||||
|
$("#skipper").toggleClass("show");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
verck();
|
||||||
|
function update(sel) {
|
||||||
|
$("#box").toggleClass("show");
|
||||||
|
$("#box").toggleClass("hide");
|
||||||
|
$("#dlnow").toggleClass("hide");
|
||||||
|
$("#dlnow").toggleClass("show");
|
||||||
|
$("#prog").text("");
|
||||||
|
var bit = localStorage.getItem("bit");
|
||||||
|
var start = "https://thedesk.top/ver.json";
|
||||||
|
fetch(start, {
|
||||||
|
method: "GET",
|
||||||
|
headers: { "content-type": "application/json" }
|
||||||
|
})
|
||||||
|
.then(function(response) {
|
||||||
|
return response.json();
|
||||||
|
})
|
||||||
|
.catch(function(error) {
|
||||||
|
todo(error);
|
||||||
|
console.error(error);
|
||||||
|
})
|
||||||
|
.then(function(json) {
|
||||||
|
if (sel == "install") {
|
||||||
|
if (bit == "x64") {
|
||||||
|
var url = json["winx64"];
|
||||||
|
var file = "TheDesk-setup.exe";
|
||||||
|
} else if (bit == "ia32") {
|
||||||
|
var url = json["winia32"];
|
||||||
|
var file = "TheDesk-setup-ia32.exe";
|
||||||
|
}
|
||||||
|
} else if (sel == "portable") {
|
||||||
|
if (bit == "x64") {
|
||||||
|
var url = json["winx64p"];
|
||||||
|
var file = "TheDesk.exe";
|
||||||
|
} else if (bit == "ia32") {
|
||||||
|
var url = json["winia32p"];
|
||||||
|
var file = "TheDesk-ia32.exe";
|
||||||
|
}
|
||||||
|
} else if (sel == "linux") {
|
||||||
|
var url = json["linuxx64"];
|
||||||
|
var file = "thedesk.zip";
|
||||||
|
} else if (sel == "linuxdeb") {
|
||||||
|
var url = json["linuxdeb"];
|
||||||
|
var file = "thedesk_" + json.unique_linux + "_amd64.deb";
|
||||||
|
} else if (sel == "linuxsnap") {
|
||||||
|
var url = json["linuxsnap"];
|
||||||
|
var file = "thedesk_" + json.unique_linux + "_amd64.snap";
|
||||||
|
} else if (sel == "mac") {
|
||||||
|
var url = json["mac"];
|
||||||
|
var file = "TheDesk-" + json.unique_mac + ".dmg";
|
||||||
|
}
|
||||||
|
postMessage(["downloadButton", [url, file]], "*");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function quit() {
|
||||||
|
postMessage(["sendSinmpleIpc", "quit"], "*");
|
||||||
|
}
|
||||||
|
function updateProg(arg) {
|
||||||
|
console.log(arg);
|
||||||
|
$(".determinate").css("width", arg * 100 + "%");
|
||||||
|
$("#prog").text(Math.floor(arg * 100) + "%");
|
||||||
|
}
|
||||||
|
function updateMess(arg) {
|
||||||
|
console.log(arg);
|
||||||
|
$("#prog").text(arg);
|
||||||
|
}
|
||||||
|
function verck() {
|
||||||
|
var platform = localStorage.getItem("platform");
|
||||||
|
var bit = localStorage.getItem("bit");
|
||||||
|
if (platform == "win32") {
|
||||||
|
$(".windows").removeClass("hide");
|
||||||
|
} else if (platform == "linux") {
|
||||||
|
$(".linux").removeClass("hide");
|
||||||
|
} else if (platform == "darwin") {
|
||||||
|
$(".mac").removeClass("hide");
|
||||||
|
}
|
||||||
|
var start = "https://thedesk.top/ver.json";
|
||||||
|
fetch(start, {
|
||||||
|
method: "GET",
|
||||||
|
headers: { "content-type": "application/json" }
|
||||||
|
})
|
||||||
|
.then(function(response) {
|
||||||
|
return response.json();
|
||||||
|
})
|
||||||
|
.catch(function(error) {
|
||||||
|
todo(error);
|
||||||
|
console.error(error);
|
||||||
|
})
|
||||||
|
.then(function(json) {
|
||||||
|
console.log(json);
|
||||||
|
if (platform == "win32") {
|
||||||
|
$("#ver").text(json.desk);
|
||||||
|
localStorage.setItem("next-ver", json.desk);
|
||||||
|
var url = "https://github.com/cutls/TheDesk/releases/tag/v" + json.unique;
|
||||||
|
} else if (platform == "linux") {
|
||||||
|
$("#ver").text(json.desk_linux);
|
||||||
|
localStorage.setItem("next-ver", json.desk_linux);
|
||||||
|
var url = "https://github.com/cutls/TheDesk/releases/tag/v" + json.unique_linux;
|
||||||
|
} else if (platform == "darwin") {
|
||||||
|
$("#ver").text(json.desk_mac);
|
||||||
|
localStorage.setItem("next-ver", json.desk_mac);
|
||||||
|
var url = "https://github.com/cutls/TheDesk/releases/tag/v" + json.unique_mac;
|
||||||
|
}
|
||||||
|
|
||||||
#prog {
|
$("#github").attr("href", url);
|
||||||
font-size: 200%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script type="text/javascript" src="../../node_modules/jquery/dist/jquery.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/platform/first.js"></script>
|
|
||||||
<script type="text/javascript" src="../../node_modules/materialize-css/dist/js/materialize.js"></script>
|
|
||||||
<i class="material-icons pointer waves-effect" onclick="about();">info</i>
|
|
||||||
<i class="material-icons pointer waves-effect" onclick="skipper();">clear</i>
|
|
||||||
<!--a href="update.html">Reload</a-->
|
|
||||||
<div id="start">
|
|
||||||
<div id="box" class="show">
|
|
||||||
<h2>TheDesk</h2>
|
|
||||||
<p>@@updatehere@@</p>
|
|
||||||
<span id="now"></span>→<b id="ver"></b><br>
|
|
||||||
<span id="det"></span><br>
|
|
||||||
<button class="waves-effect btn windows hide" onclick="update('install')"
|
|
||||||
style="margin-left:15px;">@@installer@@</button>
|
|
||||||
<button class="waves-effect btn windows hide" onclick="update('portable')"
|
|
||||||
style="margin-left:15px;">@@portable@@</button>
|
|
||||||
<button class="waves-effect btn linux hide" onclick="update('linux')"
|
|
||||||
style="margin-left:15px;">@@linux@@</button>
|
|
||||||
<button class="waves-effect btn linux hide" onclick="update('linuxdeb')"
|
|
||||||
style="margin-left:15px;">@@linuxdeb@@</button>
|
|
||||||
<button class="waves-effect btn linux hide" onclick="update('linuxsnap')"
|
|
||||||
style="margin-left:15px;">@@linuxsnap@@</button>
|
|
||||||
<button class="waves-effect btn mac hide" onclick="update('mac')"
|
|
||||||
style="margin-left:15px;">@@download@@</button>
|
|
||||||
<br>
|
|
||||||
@@problem1@@<br>@@problem2@@
|
|
||||||
</div>
|
|
||||||
<div id="skipper" class="hide">
|
|
||||||
<h4>@@sureupd@@</h4>
|
|
||||||
@@skipupd@@<br>
|
|
||||||
<div id="updskip">
|
|
||||||
<a onclick="window.close();" class="pointer skipbtn waves-effect waves-light">
|
|
||||||
<div>@@nexttl@@</div>
|
|
||||||
</a>
|
|
||||||
<a onclick="nextv();" class="pointer skipbtn waves-effect waves-light">
|
|
||||||
<div>@@nextver@@</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<a class="pointer waves-effect" onclick="skipper();" style="margin-top:5px">@@continue@@</a>
|
|
||||||
</div>
|
|
||||||
<div id="dlnow" class="hide">
|
|
||||||
<h4>@@dlnow@@</h4>
|
|
||||||
<h4 id="prog"></h4>
|
|
||||||
<div class="progress">
|
|
||||||
<div class="determinate" style="width: 0%"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script type="text/javascript" src="../../js/common/about.js"></script>
|
|
||||||
<script type="text/javascript" src="../../js/platform/end.js"></script>
|
|
||||||
<script>
|
|
||||||
function skipper() {
|
|
||||||
$("#dlnow").addClass("hide");
|
|
||||||
$("#box").toggleClass("show");
|
|
||||||
if ($("#box").hasClass("hide") && $("#skipper").hasClass("hide")) {
|
|
||||||
$("#skipper").removeClass("hide");
|
|
||||||
$("#skipper").addClass("show");
|
|
||||||
} else {
|
|
||||||
$("#box").toggleClass("hide");
|
|
||||||
$("#skipper").toggleClass("hide");
|
|
||||||
$("#skipper").toggleClass("show");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
verck();
|
|
||||||
function update(sel) {
|
|
||||||
$("#box").toggleClass("show");
|
|
||||||
$("#box").toggleClass("hide");
|
|
||||||
$("#dlnow").toggleClass("hide");
|
|
||||||
$("#dlnow").toggleClass("show");
|
|
||||||
$("#prog").text("");
|
|
||||||
var bit = localStorage.getItem("bit");
|
|
||||||
var start = "https://thedesk.top/ver.json";
|
|
||||||
fetch(start, {
|
|
||||||
method: 'GET',
|
|
||||||
headers: { 'content-type': 'application/json' },
|
|
||||||
}).then(function (response) {
|
|
||||||
return response.json();
|
|
||||||
}).catch(function (error) {
|
|
||||||
todo(error);
|
|
||||||
console.error(error);
|
|
||||||
}).then(function (json) {
|
|
||||||
if (sel == "install") {
|
|
||||||
if (bit == "x64") {
|
|
||||||
var url = json["winx64"];
|
|
||||||
var file = "TheDesk-setup.exe";
|
|
||||||
} else if (bit == "ia32") {
|
|
||||||
var url = json["winia32"];
|
|
||||||
var file = "TheDesk-setup-ia32.exe";
|
|
||||||
}
|
|
||||||
} else if (sel == "portable") {
|
|
||||||
if (bit == "x64") {
|
|
||||||
var url = json["winx64p"];
|
|
||||||
var file = "TheDesk.exe";
|
|
||||||
} else if (bit == "ia32") {
|
|
||||||
var url = json["winia32p"];
|
|
||||||
var file = "TheDesk-ia32.exe";
|
|
||||||
}
|
|
||||||
} else if (sel == "linux") {
|
|
||||||
var url = json["linuxx64"];
|
|
||||||
var file = "thedesk.zip";
|
|
||||||
} else if (sel == "linuxdeb") {
|
|
||||||
var url = json["linuxdeb"];
|
|
||||||
var url = json["mac"];
|
|
||||||
postMessage(["openUrl", url], "*")
|
|
||||||
return false;
|
|
||||||
} else if (sel == "linuxsnap") {
|
|
||||||
var url = json["linuxsnap"];
|
|
||||||
postMessage(["openUrl", url], "*")
|
|
||||||
return false;
|
|
||||||
} else if (sel == "mac") {
|
|
||||||
var url = json["mac"];
|
|
||||||
postMessage(["openUrl", url], "*")
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
postMessage(["downloadButton", [url, file]], "*")
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
$("#now").text(localStorage.getItem("ver"));
|
||||||
function quit() {
|
});
|
||||||
postMessage(["sendSinmpleIpc", "quit"], "*")
|
}
|
||||||
}
|
function nextv() {
|
||||||
function updateProg(arg) {
|
localStorage.setItem("new-ver-skip", "true");
|
||||||
console.log(arg);
|
window.close();
|
||||||
$(".determinate").css("width", arg * 100 + "%");
|
}
|
||||||
$("#prog").text(Math.floor(arg * 100) + "%");
|
function enc(ver) {
|
||||||
}
|
var ver = ver.replace(/\s/g, "");
|
||||||
function updateMess(arg) {
|
var ver = ver.replace(/\(/g, "-");
|
||||||
console.log(arg);
|
var ver = ver.replace(/\)/g, "");
|
||||||
$("#prog").text(arg);
|
var ver = ver.replace(/\[/g, "_");
|
||||||
}
|
var ver = ver.replace(/\]/g, "");
|
||||||
function verck() {
|
return ver;
|
||||||
var platform = localStorage.getItem("platform");
|
}
|
||||||
var bit = localStorage.getItem("bit");
|
</script>
|
||||||
if (platform == "win32") {
|
</body>
|
||||||
$('.windows').removeClass("hide")
|
</html>
|
||||||
} else if (platform == "linux") {
|
|
||||||
$('.linux').removeClass("hide")
|
|
||||||
} else if (platform == "darwin") {
|
|
||||||
$('.mac').removeClass("hide")
|
|
||||||
}
|
|
||||||
var start = "https://thedesk.top/ver.json";
|
|
||||||
fetch(start, {
|
|
||||||
method: 'GET',
|
|
||||||
headers: { 'content-type': 'application/json' },
|
|
||||||
}).then(function (response) {
|
|
||||||
return response.json();
|
|
||||||
}).catch(function (error) {
|
|
||||||
todo(error);
|
|
||||||
console.error(error);
|
|
||||||
}).then(function (json) {
|
|
||||||
console.log(json);
|
|
||||||
if (platform == "win32") {
|
|
||||||
$("#ver").text(json.desk);
|
|
||||||
localStorage.setItem("next-ver", json.desk);
|
|
||||||
} else if (platform == "linux") {
|
|
||||||
$("#ver").text(json.desk_linux);
|
|
||||||
localStorage.setItem("next-ver", json.desk_linux);
|
|
||||||
} else if (platform == "darwin") {
|
|
||||||
$("#ver").text(json.desk_mac);
|
|
||||||
localStorage.setItem("next-ver", json.desk_mac);
|
|
||||||
}
|
|
||||||
var lang = "@@lang@@";
|
|
||||||
if (lang == "ja") {
|
|
||||||
$("#det").html(json.detail);
|
|
||||||
} else {
|
|
||||||
$("#det").html(json.detail_en);
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#now").text(localStorage.getItem("ver"));
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function nextv() {
|
|
||||||
localStorage.setItem("new-ver-skip", "true");
|
|
||||||
window.close();
|
|
||||||
}
|
|
||||||
function enc(ver) {
|
|
||||||
var ver = ver.replace(/\s/g, "");
|
|
||||||
var ver = ver.replace(/\(/g, "-");
|
|
||||||
var ver = ver.replace(/\)/g, "");
|
|
||||||
var ver = ver.replace(/\[/g, "_");
|
|
||||||
var ver = ver.replace(/\]/g, "");
|
|
||||||
return ver;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user