2018-01-28 23:22:43 +11:00
|
|
|
<!doctype html>
|
|
|
|
<html lang="ja">
|
|
|
|
<head>
|
|
|
|
<title>Update - TheDesk</title>
|
|
|
|
<link href="./css/materialize.css" type="text/css" rel="stylesheet">
|
|
|
|
<link href="./css/master.css" type="text/css" rel="stylesheet">
|
|
|
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300" rel="stylesheet">
|
|
|
|
<meta charset="utf-8">
|
|
|
|
</head>
|
|
|
|
<body>
|
2018-03-18 02:00:53 +11:00
|
|
|
<style>
|
|
|
|
body{
|
|
|
|
font-family:'Open Sans';
|
|
|
|
-webkit-app-region: drag;
|
|
|
|
cursor: move;
|
2018-03-31 13:39:06 +11:00
|
|
|
padding:10px;
|
2018-03-18 02:00:53 +11:00
|
|
|
}
|
|
|
|
a,button{
|
|
|
|
-webkit-app-region: no-drag;
|
|
|
|
}</style>
|
2018-01-28 23:22:43 +11:00
|
|
|
<script type="text/javascript" src="./js/common/jquery.js"></script>
|
|
|
|
<script type="text/javascript" src="./js/platform/first.js"></script>
|
|
|
|
<script type="text/javascript" src="./js/common/materialize.js"></script>
|
|
|
|
<h5>アップデートがあります[TheDesk <span id="ver"></span>]</h5>
|
|
|
|
<span id="det"></span><br>
|
|
|
|
現在のバージョン<span id="now"></span><br>
|
2018-02-18 03:44:03 +11:00
|
|
|
ダウンロード後は選択したフォルダが開きソフトは閉じられます。<br>
|
2018-01-28 23:22:43 +11:00
|
|
|
<button id="update" class="waves-effect btn" onclick="update('true')">ダウンロード</button>
|
|
|
|
<p id="prog"></p>
|
|
|
|
<div class="progress">
|
|
|
|
<div class="determinate" style="width: 0%"></div>
|
|
|
|
</div><br>
|
|
|
|
アップデートはセキュアかつ高速なAmazon CloudFront CDNを通じて提供されます。<br>
|
2018-02-18 16:43:11 +11:00
|
|
|
アップデート内容の詳細は<a href="https://github.com/cutls/TheDesk/blob/master/LATEST.md">GitHub</a>をご覧ください。<br><br>
|
2018-03-13 04:41:38 +11:00
|
|
|
<a onclick="window.close();" class="pointer">このアップデートを飛ばす</a>(次回TL表示時まで有効)<br><a onclick="quit()" class="pointer">このソフトを終了</a><br>
|
2018-03-31 13:39:06 +11:00
|
|
|
<a onclick="about()" class="pointer">このソフトについて</a><br>
|
|
|
|
アップデートに問題が生じる場合は<a href="https://thedesk.top">TheDesk HP</a>からのダウンロードをおためしください。
|
2018-01-28 23:22:43 +11:00
|
|
|
<script type="text/javascript" src="./js/common/about.js"></script>
|
2018-02-18 16:43:11 +11:00
|
|
|
<script type="text/javascript" src="./js/platform/end.js"></script>
|
2018-01-28 23:22:43 +11:00
|
|
|
<script>
|
|
|
|
var electron = require("electron");
|
|
|
|
var ipc = electron.ipcRenderer;
|
|
|
|
verck();
|
|
|
|
function update(sel){
|
|
|
|
$("#prog").text("");
|
2018-03-13 04:41:38 +11:00
|
|
|
ipc.send('download-btn', [sel,enc(localStorage.getItem("next-ver"))]);
|
2018-01-28 23:22:43 +11:00
|
|
|
}
|
|
|
|
function quit(){
|
|
|
|
ipc.send('quit', 'go');
|
|
|
|
}
|
|
|
|
ipc.on('prog', function (event, arg) {
|
|
|
|
console.log(arg);
|
2018-04-09 00:17:33 +10:00
|
|
|
$(".determinate").css('width',arg*100+"%");
|
|
|
|
$("#prog").text("ダウンロード中:"+Math.floor(arg*100)+"%");
|
2018-01-28 23:22:43 +11:00
|
|
|
})
|
|
|
|
ipc.on('mess', function (event, arg) {
|
2018-04-09 00:17:33 +10:00
|
|
|
console.log(arg);
|
2018-01-28 23:22:43 +11:00
|
|
|
$("#prog").text(arg);
|
|
|
|
})
|
|
|
|
function verck(){
|
2018-03-14 05:31:31 +11:00
|
|
|
var start="https://thedesk.top/ver.json";
|
2018-01-28 23:22:43 +11:00
|
|
|
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);
|
2018-03-13 04:41:38 +11:00
|
|
|
$("#ver").text(json.desk);
|
|
|
|
localStorage.setItem("next-ver",json.desk);
|
2018-01-28 23:22:43 +11:00
|
|
|
$("#det").text(json.detail);
|
|
|
|
$("#now").text(localStorage.getItem("ver"));
|
|
|
|
});
|
|
|
|
}
|
2018-03-13 04:41:38 +11:00
|
|
|
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;
|
|
|
|
}
|
2018-01-28 23:22:43 +11:00
|
|
|
</script>
|