From af42745aa73d2fb0b72c98d6ce77b5271422ddb3 Mon Sep 17 00:00:00 2001 From: cutls Date: Sun, 25 Feb 2018 17:41:34 +0900 Subject: [PATCH] TheDesk Riina (ver.6[fixed]) --- LATEST.md | 12 +++++--- app/index.html | 3 +- app/js/common/version.js | 1 + app/js/login/login.js | 61 +++++++++++++++++++++++++++++----------- app/js/platform/end.js | 17 ++--------- app/js/tl/datails.js | 6 ++-- app/js/tl/mix.js | 29 ++++++++----------- app/js/tl/tl.js | 3 +- app/package.json | 2 +- ver.json | 2 +- 10 files changed, 79 insertions(+), 57 deletions(-) diff --git a/LATEST.md b/LATEST.md index 28c883dc..6ec4a61d 100644 --- a/LATEST.md +++ b/LATEST.md @@ -1,15 +1,19 @@ ## For Markdown-supporting Instances [TheDesk](https://thedesk.top) :thedesk: Riina (ver.6) -・デザイン修正 -・ちょっとしたシャドウ ・バグ修正 +トゥートを削除できないバグ +Integrated TLの順番がおかしいバグ +スクロールしても読み込まれないバグ +URLコピー等が効かないバグ :github: [cutls/TheDesk](https://github.com/cutls/TheDesk) #Desk #DeskUpdate ## For Vanilla Instances WindowsクライアントTheDesk Riina (ver.6)リリース -・デザイン修正 -・ちょっとしたシャドウ ・バグ修正 +トゥートを削除できないバグ +Integrated TLの順番がおかしいバグ +スクロールしても読み込まれないバグ +URLコピー等が効かないバグ https://thedesk.top \ No newline at end of file diff --git a/app/index.html b/app/index.html index 0d4162f2..9a8ae6af 100644 --- a/app/index.html +++ b/app/index.html @@ -23,13 +23,14 @@ +
ログインしたいインスタンスのアドレス
diff --git a/app/js/common/version.js b/app/js/common/version.js index 7c175c1f..7cd9675a 100644 --- a/app/js/common/version.js +++ b/app/js/common/version.js @@ -16,6 +16,7 @@ function verck(ver) { todo("お使いのバージョン" + mess.desk + "は最新です。"); //betaならアプデチェックしない } else if (ver != "beta") { + localStorage.removeItem("instance") var electron = require("electron"); var ipc = electron.ipcRenderer; ipc.send('update', "true"); diff --git a/app/js/login/login.js b/app/js/login/login.js index 2c9ce4f2..d82e6c3c 100644 --- a/app/js/login/login.js +++ b/app/js/login/login.js @@ -221,20 +221,8 @@ function ckdb(acct_id) { var at = localStorage.getItem(domain + "_at"); var bbcode = domain + "_bbcode"; var letters = domain + "_letters"; - var start = "https://dl.thedesk.top/mastodon_data.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); - console.log(json[letters]); + if(localStorage.getItem("instance")){ + var json=JSON.parse(localStorage.getItem("instance")); if (json[bbcode]) { if (json[bbcode] == "enabled") { localStorage.setItem("bb_" + acct_id, "true"); @@ -259,8 +247,49 @@ function ckdb(acct_id) { }else{ localStorage.removeItem("bb_" + acct_id); } - - }); + }else{ + var start = "https://dl.thedesk.top/mastodon_data.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); + localStorage.setItem("instance", JSON.stringify(json)); + if (json[bbcode]) { + if (json[bbcode] == "enabled") { + localStorage.setItem("bb_" + acct_id, "true"); + } else { + localStorage.removeItem("bb_" + acct_id); + $("[data-activates='bbcode']").addClass("disabled"); + $("[data-activates='bbcode']").prop("disabled", true); + } + } else { + localStorage.removeItem("bb_" + acct_id); + $("[data-activates='bbcode']").addClass("disabled"); + $("[data-activates='bbcode']").addClass("disabled", true); + } + if (json[letters]) { + if($("#textarea").attr("data-length") 0) { - var pool = localStorage.getItem("pool"); - if (pool) { - pool = templete + pool; - } else { - pool = templete - } - localStorage.setItem("pool", pool); + if (obj.visibility != "public" || obj.account.acct != obj.account.username) { + var pool = localStorage.getItem("pool_" + tlid); + if (pool) { + pool = templete + pool; } else { - $("#timeline_" + tlid).before(templete); + pool = templete } + localStorage.setItem("pool_" + tlid, pool); + scrollck(); additional(acct_id, tlid); jQuery("time.timeago").timeago(); } @@ -231,4 +226,4 @@ function mixmore(tlid) { }); }); -} +} \ No newline at end of file diff --git a/app/js/tl/tl.js b/app/js/tl/tl.js index eb8df014..f06d8069 100644 --- a/app/js/tl/tl.js +++ b/app/js/tl/tl.js @@ -110,7 +110,8 @@ function reload(type, cc, acct_id, tlid, data) { var typeA = JSON.parse(mess.data).event; if (typeA == "delete") { var obj = JSON.parse(mess.data).payload; - $("[toot-id=" + obj + "]").hide(); + $("[toot-id=" + JSON.parse(mess.data).payload + "]").hide(); + $("[toot-id=" + JSON.parse(mess.data).payload + "]").remove(); } else if (typeA == "update") { var obj = JSON.parse(JSON.parse(mess.data).payload); console.log(obj); diff --git a/app/package.json b/app/package.json index 3ba3563e..5bd18709 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "TheDesk", - "version": "12.6.0", + "version": "12.6.1", "description": "TheDesk on Mastodonはシンプルと多機能を両立したデスクトップ向けクライアントです", "main": "main.js", "scripts": { diff --git a/ver.json b/ver.json index f4c4709a..8f8e9399 100644 --- a/ver.json +++ b/ver.json @@ -1 +1 @@ -{"desk":"Riina (ver.6)","date":"2018-02-25","detail":"内部V:12.5.0|デザインとバグ修正。詳しくはGitHub参照"} \ No newline at end of file +{"desk":"Riina (ver.6[fixed])","date":"2018-02-25","detail":"内部V:12.6.1|バグ修正。詳しくはGitHub参照"} \ No newline at end of file