TheDesk Akane (16.0.10)

This commit is contained in:
cutls 2018-08-24 00:15:57 +09:00
parent 8ed7796556
commit 8439aa3e05
15 changed files with 418 additions and 110 deletions

View File

@ -26,7 +26,7 @@
<script type="text/javascript" src="./js/common/modal.js"></script> <script type="text/javascript" src="./js/common/modal.js"></script>
<script type="text/javascript" src="./js/ui/jquery-ui.min.js"></script> <script type="text/javascript" src="./js/ui/jquery-ui.min.js"></script>
<script> <script>
var ver="Akane (16.0.9)"; var ver="Akane (16.0.10)";
//betaを入れるとバージョンチェックしない //betaを入れるとバージョンチェックしない
//GitHubに上げるときはindex.htmlをちゃんとする。(index.start.html) //GitHubに上げるときはindex.htmlをちゃんとする。(index.start.html)
//var ver="beta"; //var ver="beta";
@ -522,21 +522,16 @@ var lang="{{lang}}";
<a href="https://thedesk.top" target="_blank">HP</a><br> <a href="https://thedesk.top" target="_blank">HP</a><br>
<a href="https://github.com/cutls/TheDesk" target="_blank">GitHub</a><br> <a href="https://github.com/cutls/TheDesk" target="_blank">GitHub</a><br>
<br> <br>
<div id="release-Akane_16-0-9" style="display:none"> <div id="release-Akane_16-0-10" style="display:none">
<a href="https://code.cutls.com/thedesk-log/" target="_blank">開発の経緯</a><br> <a href="https://code.cutls.com/thedesk-log/" target="_blank">開発の経緯</a><br>
<a href="https://ja.mstdn.wiki/TheDesk" target="_blank">機能一覧</a><br> <a href="https://ja.mstdn.wiki/TheDesk" target="_blank">機能一覧</a><br>
Entyでは支援者様限定で様々なTheDeskに関する記事をご覧いただけます。 Entyでは支援者様限定で様々なTheDeskに関する記事をご覧いただけます。
<h5>Release Note Akane (16.0.9)</h5> <h5>Release Note Akane (16.0.10)</h5>
16.0.9<br> 16.0.9<br>
<ul> <ul>
<li>ログインできない問題を修正</li> <li>自動CWに関する不具合</li>
<li>ストリーミングが切れることがある不具合を修正</li> <li>アップデートに関する不具合</li>
<li>長文投稿時にCWが簡単に付く機能</li> <li>MisskeyのURLコピーに関する不具合</li>
<li>誰が通知アクションをしたかのミニアイコンを表示</li>
<li>クリップボードへ複数枚の貼り付けに対応</li>
<li>全てのMisskeyに全てのOSからログイン可能に</li>
<li>friends.nicoのユーザー絵文字に対応</li>
<li>バグ修正</li>
</ul> </ul>
</div> </div>
<br><br> <br><br>

View File

@ -65,4 +65,117 @@ function verck(ver) {
} }
} }
}); });
if(!localStorage.getItem("last-notice-id")){
localStorage.setItem("last-notice-id",0)
}
console.log(localStorage.getItem("last-notice-id"))
var start = "https://thedesk.top/notice?since_id="+localStorage.getItem("last-notice-id");
console.log(start);
fetch(start, {
method: 'GET'
}).then(function(response) {
return response.json();
}).catch(function(error) {
todo(error);
console.error(error);
}).then(function(mess) {
console.log(mess.length);
if(mess.length<1){
return false;
}else{
var last=localStorage.getItem("last-notice-id")
localStorage.setItem("last-notice-id",mess[0].ID)
for(i=0;i<mess.length;i++){
var obj=mess[i];
if(obj.ID*1<=last){
break;
}else{
var show=true;
if(obj.Toot!=""){
var toot='<button class="btn-flat toast-action" onclick="detEx(\''+obj.Toot+'\',\'main\')">Show</button>';
}else{
var toot="";
}
if(obj.Ver!=""){
if(obj.Ver==ver){
show=true;
}else{
show=false;
}
}
if(obj.Domain!=""){
var multi = localStorage.getItem("multi");
if (multi) {
show=false;
var accts = JSON.parse(multi);
Object.keys(accts).forEach(function(key) {
var acct = accts[key];
if(acct.domain==obj.Domain){
show=true;
}
});
}
}
if(show){
Materialize.toast(obj.Text+toot+'<span class="sml grey-text">(スライドして消去)</span>', 86400);
}
}
}
}
});
infows = new WebSocket("wss://thedesk.top/ws/");
infows.onopen = function(mess) {
console.log(tlid + ":Connect Streaming Info:");
console.log(mess);
}
infows.onmessage = function(mess) {
console.log(":Receive Streaming:");
console.log(JSON.parse(mess.data));
var obj=JSON.parse(mess.data);
if(obj.type!="counter"){
if(obj.id*1<=localStorage.getItem("last-notice-id")){
}else{
localStorage.setItem("last-notice-id",obj.id)
var show=true;
if(obj.toot!=""){
var toot='<button class="btn-flat toast-action" onclick="detEx(\''+obj.toot+'\',\'main\')">Show</button>';
}else{
var toot="";
}
if(obj.ver!=""){
if(obj.ver==ver){
show=true;
}else{
show=false;
}
}
if(obj.domain!=""){
var multi = localStorage.getItem("multi");
if (multi) {
show=false;
var accts = JSON.parse(multi);
Object.keys(accts).forEach(function(key) {
var acct = accts[key];
if(acct.domain==obj.domain){
show=true;
}
});
}
}
if(show){
Materialize.toast(obj.text+toot+'<span class="sml grey-text">(スライドして消去)</span>', 86400);
}
}
}
}
infows.onerror = function(error) {
console.error("Error closing:info");
console.error(error);
return false;
};
infows.onclose = function() {
console.error("Closing:info");
};
} }

View File

@ -5,6 +5,7 @@
localStorage.removeItem("kirishima") localStorage.removeItem("kirishima")
localStorage.removeItem("imas") localStorage.removeItem("imas")
localStorage.removeItem("image"); localStorage.removeItem("image");
localStorage.setItem("mode_misskey.xyz","misskey")
function ck() { function ck() {
var main = localStorage.getItem("main"); var main = localStorage.getItem("main");
if(!main){ if(!main){

View File

@ -132,6 +132,7 @@ function icon(type) {
} }
function todo(){} function todo(){}
function todc(){} function todc(){}
function hide(){}
$(function($) { $(function($) {
//キーボードショートカット //キーボードショートカット
$(window).keydown(function(e) { $(window).keydown(function(e) {

View File

@ -26,7 +26,17 @@ function post(mode) {
} }
} }
} }
if(mode!="pass" && !$("#cw").hasClass("cw-avail") && (str.length>localStorage.getItem("cw_sentence") || (str.split("\n").length - 1)>localStorage.getItem("cw_letters"))){ if(!localStorage.getItem("cw_sentence")){
var cw_sent=500;
}else{
var cw_sent=localStorage.getItem("cw_sentence");
}
if(!localStorage.getItem("cw_letters")){
var cw_ltres=500;
}else{
var cw_ltres=localStorage.getItem("cw_letters");
}
if(mode!="pass" && !$("#cw").hasClass("cw-avail") && (str.length>cw_sent || (str.split("\n").length - 1)>cw_ltres)){
var electron = require("electron"); var electron = require("electron");
var remote=electron.remote; var remote=electron.remote;
var dialog=remote.dialog; var dialog=remote.dialog;

View File

@ -640,8 +640,8 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
dis_name + dis_name +
'</span><span class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; cursor:text;"> @' + '</span><span class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; cursor:text;"> @' +
toot.user.username + '</span></div>' + toot.user.username + '</span></div>' +
'<div class="flex-time"><span class="cbadge cbadge-hover pointer waves-effect" onclick="tootUriCopy(\'' + '<div class="flex-time"><span class="cbadge cbadge-hover pointer waves-effect" onclick="tootUriCopy(\'https://' +domain+"/notes/"+
toot.url + '\');" title="' + date(toot.createdAt, 'absolute') + toot.id + '\');" title="' + date(toot.createdAt, 'absolute') +
'('+lang_parse_clickcopyurl[lang]+')"><i class="fa fa-clock-o"></i>' + '('+lang_parse_clickcopyurl[lang]+')"><i class="fa fa-clock-o"></i>' +
date(toot.createdAt, datetype) + '</span>' + date(toot.createdAt, datetype) + '</span>' +
'</div></div>' + '</div></div>' +

View File

@ -31,9 +31,6 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
var type = "local"; var type = "local";
} }
} }
/*
*/
if (type == "mix" && localStorage.getItem("mode_" + domain)!="misskey") { if (type == "mix" && localStorage.getItem("mode_" + domain)!="misskey") {
//Integratedなら飛ばす //Integratedなら飛ばす
$("#notice_" + tlid).text("Integrated TL(" + localStorage.getItem( $("#notice_" + tlid).text("Integrated TL(" + localStorage.getItem(

View File

@ -1,17 +1,15 @@
{ {
"updatehere":"Latest TheDesk", "updatehere":"Get latest TheDesk",
"nowver":"Current version", "download":"Start",
"afterdl":"TheDesk will be quit TheDesk after downloading.", "plusunzip":"Unzip(for Win)",
"download":"Download", "winzip":"Durling unzippng, TheDesk may freeze. It takes several seconds.",
"winzip":"On Windows, TheDesk will self-unzip and launch the latest file. Durling unzippng, TheDesk may freeze. It takes several seconds.", "unrewrite":"Not rewrite",
"releasenote1":"Visit a releasenote of ", "sureupd":"You may lose a cool experience!",
"releasenote2":"", "skipupd":"Skip this update",
"skipupd":"Skip this uodate", "nexttl":"Until next TL loading",
"nexttl":"until next TL loading", "nextver":"Until next version",
"nextver":"until next version", "problem1":"Some problems?",
"endthedesk":"Quit", "problem2":"Please download on <a href=\"https://thedesk.top\">Oficial HP</a>.",
"about":"About TheDesk", "continue":"Continue updating",
"problem1":"Some problems? Please download on ", "dlnow":"Downloading..."
"problem2":"",
"dlnow":"Downloading"
} }

View File

@ -1,17 +1,15 @@
{ {
"updatehere":"アップデートがあります", "updatehere":"アップデートがあります",
"nowver":"現在のバージョン", "download":"開始",
"afterdl":"ダウンロード後は選択したフォルダが開きソフトは閉じられます。", "plusunzip":"解凍も行う",
"download":"ダウンロード", "winzip":"zip展開時にTheDeskが固まることがありますが、しばらくお待ち下さい。",
"winzip":"Windows環境の場合、自動で展開され起動します。展開時にTheDeskが固まることがありますが、しばらくお待ち下さい。", "unrewrite":"上書きしない",
"releasenote1":"アップデート内容の詳細は", "sureupd":"アップデートは必ず行ってください",
"releasenote2":"をご覧ください。", "skipupd":"アップデートをスキップする",
"skipupd":"このアップデートを飛ばす",
"nexttl":"次回TL表示時まで", "nexttl":"次回TL表示時まで",
"nextver":"次のバージョンが出るまで", "nextver":"次のバージョンが出るまで",
"endthedesk":"このソフトを終了", "problem1":"問題が発生しますか?",
"about":"このソフトについて", "problem2":"<a href=\"https://thedesk.top\">公式HP</a>からダウンロードをお試しください。",
"problem1":"アップデートに問題が生じる場合は", "continue":"アップデートを続行",
"problem2":"からのダウンロードをおためしください。",
"dlnow":"ダウンロード中" "dlnow":"ダウンロード中"
} }

View File

@ -296,6 +296,7 @@ ipc.on('shot-img-dl', (e, args) => {
ipc.on('download-btn', (e, args) => { ipc.on('download-btn', (e, args) => {
var platform=process.platform; var platform=process.platform;
var bit=process.arch; var bit=process.arch;
var versioning=args[3];
if(platform=="win32" || platform=="linux" || platform=="darwin" ){ if(platform=="win32" || platform=="linux" || platform=="darwin" ){
if(platform=="win32" && bit=="x64"){ if(platform=="win32" && bit=="x64"){
var zip="TheDesk-win32-x64.zip"; var zip="TheDesk-win32-x64.zip";
@ -308,7 +309,10 @@ ipc.on('download-btn', (e, args) => {
}else if(platform=="darwin"){ }else if(platform=="darwin"){
var zip="TheDesk-darwin-x64.zip"; var zip="TheDesk-darwin-x64.zip";
}else{ }else{
retrun; return;
}
if(versioning){
zip=zip.replace(".zip","."+args[1]+".zip");
} }
}else{ }else{
const options = { const options = {
@ -328,6 +332,8 @@ ipc.on('download-btn', (e, args) => {
} }
} }
var ver=args[1]; var ver=args[1];
var unzipper=args[2];
console.log(zip); console.log(zip);
if(args[0]=="true"){ if(args[0]=="true"){
dialog.showSaveDialog(null, { dialog.showSaveDialog(null, {
@ -350,10 +356,10 @@ ipc.on('download-btn', (e, args) => {
fs.unlink(savedFiles); fs.unlink(savedFiles);
} }
console.log(m[1]+":"+savedFiles) console.log(m[1]+":"+savedFiles)
dl(ver,m[1],savedFiles); dl(unzipper,ver,m[1],savedFiles);
}); });
}else{ }else{
dl(ver); dl(unzipper,ver);
} }
}); });
@ -365,7 +371,7 @@ function isExistFile(file) {
if(err.code === 'ENOENT') return false if(err.code === 'ENOENT') return false
} }
} }
function dl(ver,files,fullname){ function dl(unzipper,ver,files,fullname){
console.log(files); console.log(files);
var platform=process.platform; var platform=process.platform;
var bit=process.arch; var bit=process.arch;
@ -409,7 +415,7 @@ function dl(ver,files,fullname){
'https://dl.thedesk.top/'+zip, opts) 'https://dl.thedesk.top/'+zip, opts)
.then(dl => { .then(dl => {
updatewin.webContents.send('mess', "ダウンロードが完了しました。"); updatewin.webContents.send('mess', "ダウンロードが完了しました。");
if(platform=="win32"){ if(unzipper && platform=="win32"){
mainWindow.webContents.send('mess', "unzip"); mainWindow.webContents.send('mess', "unzip");
console.log(files+"/"+zip); console.log(files+"/"+zip);
fs.rename(files+"/"+zip, app.getPath("userData")+"/TheDesk-temp.zip", function (err) { fs.rename(files+"/"+zip, app.getPath("userData")+"/TheDesk-temp.zip", function (err) {

View File

@ -85,9 +85,18 @@ textarea {
<input type="hidden" id="reply"> <input type="hidden" id="reply">
<input type="hidden" id="media"> <input type="hidden" id="media">
<button class="btn" onclick="post()">Post</button> <button class="btn" onclick="post()">Post</button>
<script>
if(localStorage.getItem("lang")){
var lang=localStorage.getItem("lang");
}else{
var lang="ja";
}
</script>
<script type="text/javascript" src="./js/lang/lang.js"></script>
<script type="text/javascript" src="./js/lang/parse.lang.js"></script>
<script src="https://twemoji.maxcdn.com/2/twemoji.min.js?2.7"></script> <script src="https://twemoji.maxcdn.com/2/twemoji.min.js?2.7"></script>
<script type="text/javascript" src="./js/post/post.js"></script> <script type="text/javascript" src="./js/post/post.js"></script>
<script type="text/javascript" src="./js/post/reply.js"></script> <script type="text/javascript" src="./js/post/use-txtbox.js"></script>
<script type="text/javascript" src="./js/tl/parse.js"></script> <script type="text/javascript" src="./js/tl/parse.js"></script>
<script type="text/javascript" src="./js/ui/theme.js"></script> <script type="text/javascript" src="./js/ui/theme.js"></script>
<script type="text/javascript" src="./js/tl/date.js"></script> <script type="text/javascript" src="./js/tl/date.js"></script>
@ -124,4 +133,10 @@ var multi = localStorage.getItem("multi");
'</option>'; '</option>';
$("#post-acct-sel").append(templete); $("#post-acct-sel").append(templete);
}); });
function mov(){
return false;
}
function resetmv(){
return false;
}
</script> </script>

View File

@ -1,6 +1,6 @@
{ {
"name": "thedesk", "name": "thedesk",
"version": "16.0.9", "version": "16.0.10",
"description": "TheDesk is a Mastodon client for PC.", "description": "TheDesk is a Mastodon client for PC.",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {

View File

@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html lang="ja"> <html lang="en">
<head> <head>
<title>Update - TheDesk</title> <title>Update - TheDesk</title>
<link href="./css/materialize.css" type="text/css" rel="stylesheet"> <link href="./css/materialize.css" type="text/css" rel="stylesheet">
@ -8,57 +8,144 @@
<meta charset="utf-8"> <meta charset="utf-8">
</head> </head>
<body> <body>
<style> <style>
body{ body{
font-family:'Open Sans'; font-family:'Open Sans';
-webkit-app-region: drag; -webkit-app-region: drag;
cursor: move; cursor: move;
padding:10px; padding:10px;
text-align:right;
} }
a,button{ #start{
display: flex;
justify-content: center;
align-items: center;
width:100vw;
height: calc(100vh - 2.5rem);
text-align:center;
}
#checkbox{
text-align:left;
}
a,button,input,label,i{
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
}</style> }
#updskip{
display: flex;
justify-content: center;
align-items: center;
}
.skipbtn{
display:block;
float:left;
width:200px;
height:200px;
border:1px solid;
margin-left:5px;
display: flex;
justify-content: center;
align-items: center;
border: 1px solid;
overflow: hidden;
}
.skipbtn:hover{
background-color: #b3e5fc;
transition: all 0.3s ease-in-out;
}
#prog{
font-size:200%;
}
</style>
<script type="text/javascript" src="./js/common/jquery.js"></script> <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/platform/first.js"></script>
<script type="text/javascript" src="./js/common/materialize.js"></script> <script type="text/javascript" src="./js/common/materialize.js"></script>
<h5>アップデートがあります[TheDesk <span id="ver"></span>]</h5> <i class="material-icons pointer waves-effect" onclick="about();">info</i>
<span id="det"></span><br> <i class="material-icons pointer waves-effect" onclick="skipper();">clear</i>
現在のバージョン<span id="now"></span><br> <!--a href="update.html">Reload</a-->
ダウンロード後は選択したフォルダが開きソフトは閉じられます。<br> <div id="start">
<button id="update" class="waves-effect btn" onclick="update('true')">ダウンロード</button> <div id="box" class="show">
<p id="prog"></p> <h2>TheDesk</h2>
<div class="progress"> <p>アップデートがあります</p>
<div class="determinate" style="width: 0%"></div> <span id="now"></span><b id="ver"></b><br>
</div><br> <span id="det"></span><br>
<b>Windows環境の場合、自動で展開され起動します。展開時にTheDeskが固まることがありますが、しばらくお待ち下さい。</b><br> <button id="update" class="waves-effect btn" onclick="update('true')" style="margin-left:15px;">開始</button>
アップデート内容の詳細は<a href="https://github.com/cutls/TheDesk/blob/master/LATEST.md">GitHub</a>をご覧ください。<br><br> <div id="checkbox">
このアップデートを飛ばす(<a onclick="window.close();" class="pointer">次回TL表示時まで</a>/<a onclick="nextv();" class="pointer">次のバージョンが出るまで</a>)<br> Options:<br>
<a onclick="quit()" class="pointer">このソフトを終了</a><br> <input type="checkbox" class="filled-in" id="updator" value="true" onchange="alert('zip展開時にTheDeskが固まることがありますが、しばらくお待ち下さい。')" />
<a onclick="about()" class="pointer">このソフトについて</a><br> <label for="updator">解凍も行う</label><br>
アップデートに問題が生じる場合は<a href="https://thedesk.top">TheDesk HP</a>からのダウンロードをおためしください。 <input type="checkbox" class="filled-in" id="rewrite" value="true" />
<script type="text/javascript" src="./js/common/about.js"></script> <label for="rewrite">上書きしない</label><br>
</div>
問題が発生しますか?<br><a href="https://thedesk.top">公式HP</a>からダウンロードをお試しください。
</div>
<div id="skipper" class="hide">
<h4>アップデートは必ず行ってください</h4>
アップデートをスキップする<br>
<div id="updskip">
<a onclick="window.close();" class="pointer skipbtn waves-effect waves-light"><div>次回TL表示時まで</div></a>
<a onclick="nextv();" class="pointer skipbtn waves-effect waves-light"><div>次のバージョンが出るまで</div></a>
</div>
<a class="pointer waves-effect" onclick="skipper();" style="margin-top:5px">アップデートを続行</a>
</div>
<div id="dlnow" class="hide">
<h4>ダウンロード中</h4>
<h4 id="prog"></h4>
</div>
</div>
<script type="text/javascript" src="./js/common/about.js"></script>
<script type="text/javascript" src="./js/platform/end.js"></script> <script type="text/javascript" src="./js/platform/end.js"></script>
<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");
}
}
var electron = require("electron"); var electron = require("electron");
var ipc = electron.ipcRenderer; var ipc = electron.ipcRenderer;
verck(); verck();
function update(sel){ function update(sel){
$("#prog").text(""); $("#box").toggleClass("show");
ipc.send('download-btn', [sel,enc(localStorage.getItem("next-ver"))]); $("#box").toggleClass("hide");
$("#dlnow").toggleClass("hide");
$("#dlnow").toggleClass("show");
$("#prog").text("");
if($('#rewrite:checked').val()=="true"){
var versioning=true;
}else{
var versioning=false;
} }
if($('#updator:checked').val()=="true"){
var zip=true;
}else{
var zip=false;
}
ipc.send('download-btn', [sel,enc(localStorage.getItem("next-ver")),zip,versioning]);
}
function quit(){ function quit(){
ipc.send('quit', 'go'); ipc.send('quit', 'go');
} }
ipc.on('prog', function (event, arg) { ipc.on('prog', function (event, arg) {
console.log(arg); console.log(arg);
$(".determinate").css('width',arg*100+"%"); $("body").css('background','linear-gradient(#fff 0%,#fff '+(1-arg)*100+'%, #d7ccc8 '+(1-arg)*100+'%, #d7ccc8 100%)');
$("#prog").text("ダウンロード中:"+Math.floor(arg*100)+"%"); $("#prog").text(Math.floor(arg*100)+"%");
}) })
ipc.on('mess', function (event, arg) { ipc.on('mess', function (event, arg) {
console.log(arg); console.log(arg);
$("#prog").text(arg); $("#prog").text(arg);
}) })
function verck(){ function verck(){
var remote=electron.remote;
var platform=remote.process.platform;
if(platform!="win32"){
$('#updator').prop("disabled",true)
}
var start="https://thedesk.top/ver.json"; var start="https://thedesk.top/ver.json";
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
@ -69,10 +156,10 @@ function verck(){
todo(error); todo(error);
console.error(error); console.error(error);
}).then(function(json) { }).then(function(json) {
console.log(json); console.log(json);
$("#ver").text(json.desk); $("#ver").text(json.desk);
localStorage.setItem("next-ver",json.desk); localStorage.setItem("next-ver",json.desk);
$("#det").text(json.detail); $("#det").html(json.detail);
$("#now").text(localStorage.getItem("ver")); $("#now").text(localStorage.getItem("ver"));
}); });
} }

View File

@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html lang="{{lang}}"> <html lang="en">
<head> <head>
<title>Update - TheDesk</title> <title>Update - TheDesk</title>
<link href="./css/materialize.css" type="text/css" rel="stylesheet"> <link href="./css/materialize.css" type="text/css" rel="stylesheet">
@ -8,57 +8,144 @@
<meta charset="utf-8"> <meta charset="utf-8">
</head> </head>
<body> <body>
<style> <style>
body{ body{
font-family:'Open Sans'; font-family:'Open Sans';
-webkit-app-region: drag; -webkit-app-region: drag;
cursor: move; cursor: move;
padding:10px; padding:10px;
text-align:right;
} }
a,button{ #start{
display: flex;
justify-content: center;
align-items: center;
width:100vw;
height: calc(100vh - 2.5rem);
text-align:center;
}
#checkbox{
text-align:left;
}
a,button,input,label,i{
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
}</style> }
#updskip{
display: flex;
justify-content: center;
align-items: center;
}
.skipbtn{
display:block;
float:left;
width:200px;
height:200px;
border:1px solid;
margin-left:5px;
display: flex;
justify-content: center;
align-items: center;
border: 1px solid;
overflow: hidden;
}
.skipbtn:hover{
background-color: #b3e5fc;
transition: all 0.3s ease-in-out;
}
#prog{
font-size:200%;
}
</style>
<script type="text/javascript" src="./js/common/jquery.js"></script> <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/platform/first.js"></script>
<script type="text/javascript" src="./js/common/materialize.js"></script> <script type="text/javascript" src="./js/common/materialize.js"></script>
<h5>{{updatehere}}[TheDesk <span id="ver"></span>]</h5> <i class="material-icons pointer waves-effect" onclick="about();">info</i>
<span id="det"></span><br> <i class="material-icons pointer waves-effect" onclick="skipper();">clear</i>
{{nowver}}<span id="now"></span><br> <!--a href="update.html">Reload</a-->
{{afterdl}}<br> <div id="start">
<button id="update" class="waves-effect btn" onclick="update('true')">{{download}}</button> <div id="box" class="show">
<p id="prog"></p> <h2>TheDesk</h2>
<div class="progress"> <p>{{updatehere}}</p>
<div class="determinate" style="width: 0%"></div> <span id="now"></span><b id="ver"></b><br>
</div><br> <span id="det"></span><br>
<b>{{winzip}}</b><br> <button id="update" class="waves-effect btn" onclick="update('true')" style="margin-left:15px;">{{download}}</button>
{{releasenote1}}<a href="https://github.com/cutls/TheDesk/blob/master/LATEST.md">GitHub</a>{{releasenote2}}<br><br> <div id="checkbox">
{{skipupd}}(<a onclick="window.close();" class="pointer">{{nexttl}}</a>/<a onclick="nextv();" class="pointer">{{nextver}}</a>)<br> Options:<br>
<a onclick="quit()" class="pointer">{{endthedesk}}</a><br> <input type="checkbox" class="filled-in" id="updator" value="true" onchange="alert('{{winzip}}')" />
<a onclick="about()" class="pointer">{{about}}</a><br> <label for="updator">{{plusunzip}}</label><br>
{{problem1}}<a href="https://thedesk.top">TheDesk HP</a>{{problem2}} <input type="checkbox" class="filled-in" id="rewrite" value="true" />
<script type="text/javascript" src="./js/common/about.js"></script> <label for="rewrite">{{unrewrite}}</label><br>
</div>
{{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>
</div>
<script type="text/javascript" src="./js/common/about.js"></script>
<script type="text/javascript" src="./js/platform/end.js"></script> <script type="text/javascript" src="./js/platform/end.js"></script>
<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");
}
}
var electron = require("electron"); var electron = require("electron");
var ipc = electron.ipcRenderer; var ipc = electron.ipcRenderer;
verck(); verck();
function update(sel){ function update(sel){
$("#prog").text(""); $("#box").toggleClass("show");
ipc.send('download-btn', [sel,enc(localStorage.getItem("next-ver"))]); $("#box").toggleClass("hide");
$("#dlnow").toggleClass("hide");
$("#dlnow").toggleClass("show");
$("#prog").text("");
if($('#rewrite:checked').val()=="true"){
var versioning=true;
}else{
var versioning=false;
} }
if($('#updator:checked').val()=="true"){
var zip=true;
}else{
var zip=false;
}
ipc.send('download-btn', [sel,enc(localStorage.getItem("next-ver")),zip,versioning]);
}
function quit(){ function quit(){
ipc.send('quit', 'go'); ipc.send('quit', 'go');
} }
ipc.on('prog', function (event, arg) { ipc.on('prog', function (event, arg) {
console.log(arg); console.log(arg);
$(".determinate").css('width',arg*100+"%"); $("body").css('background','linear-gradient(#fff 0%,#fff '+(1-arg)*100+'%, #d7ccc8 '+(1-arg)*100+'%, #d7ccc8 100%)');
$("#prog").text("{{dlnow}}:"+Math.floor(arg*100)+"%"); $("#prog").text(Math.floor(arg*100)+"%");
}) })
ipc.on('mess', function (event, arg) { ipc.on('mess', function (event, arg) {
console.log(arg); console.log(arg);
$("#prog").text(arg); $("#prog").text(arg);
}) })
function verck(){ function verck(){
var remote=electron.remote;
var platform=remote.process.platform;
if(platform!="win32"){
$('#updator').prop("disabled",true)
}
var start="https://thedesk.top/ver.json"; var start="https://thedesk.top/ver.json";
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',

View File

@ -1 +1 @@
{"warn":"これはGCPにアップして下さい","warn2":"これはGCPにアップして下さい","warn3":"これはGCPにアップして下さい","desk":"Mio (15.9.1)","desk_mac":"Mio (15.9.1)","date":"2018-06-17","detail":"複数アカウント、フォントなど。バグ修正多数。アプデ後のアプリ内リリースノートなどで。"} {"warn":"これはGCPにアップして下さい","warn2":"これはGCPにアップして下さい","warn3":"これはGCPにアップして下さい","desk":"Akane (16.0.9)","desk_mac":"Akane (16.0.8)","date":"2018-08-17","detail":"ストリーミング接続改善、Auto CW他不具合修正"}