TheDesk Riina (ver.6)

This commit is contained in:
cutls 2018-02-25 16:21:13 +09:00
parent 5624266f30
commit 6d31d2e3c4
15 changed files with 74 additions and 63 deletions

2
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,2 @@
{
}

View File

@ -1,17 +1,15 @@
## For Markdown-supporting Instances ## For Markdown-supporting Instances
[TheDesk](https://thedesk.top) :thedesk: Riina (ver.5) [TheDesk](https://thedesk.top) :thedesk: Riina (ver.6)
・デザイン修正 ・デザイン修正
・コンパクトな設定画面 ・ちょっとしたシャドウ
・ちょっとしたアニメーション
・バグ修正 ・バグ修正
:github: [cutls/TheDesk](https://github.com/cutls/TheDesk) #Desk #DeskUpdate :github: [cutls/TheDesk](https://github.com/cutls/TheDesk) #Desk #DeskUpdate
## For Vanilla Instances ## For Vanilla Instances
WindowsクライアントTheDesk Riina (ver.5)リリース WindowsクライアントTheDesk Riina (ver.6)リリース
・デザイン修正 ・デザイン修正
・コンパクトな設定画面 ・ちょっとしたシャドウ
・ちょっとしたアニメーション
・バグ修正 ・バグ修正
https://thedesk.top https://thedesk.top

View File

@ -1,5 +1,5 @@
/*共通CSS*/ /*共通CSS*/
body{overflow:hidden;} body{overflow:hidden; user-select: none; cursor:default;}
.btn { .btn {
margin: 5px; margin: 5px;
text-transform: none; text-transform: none;

View File

@ -26,8 +26,10 @@ iframe {
min-width: 300px; min-width: 300px;
height: 100vh; height: 100vh;
flex: 1; flex: 1;
border: thin solid gray;
} }
.user{ .user{
cursor:text;
font-size:1.2rem; font-size:1.2rem;
} }
.tl-box{ height:calc(100% - 40px); overflow-y:scroll; overflow-x:hidden } .tl-box{ height:calc(100% - 40px); overflow-y:scroll; overflow-x:hidden }
@ -43,7 +45,6 @@ iframe {
padding-right: 2px; padding-right: 2px;
word-break: break-all; word-break: break-all;
width: 100%; width: 100%;
height: 100%;
display: grid; display: grid;
grid-template-columns: 43px 2fr 1fr; grid-template-columns: 43px 2fr 1fr;
grid-template-areas: 'notice notice notice' 'icon display_name acct' 'icon toot toot' 'icon additional additional' 'actions actions date_via'; grid-template-areas: 'notice notice notice' 'icon display_name acct' 'icon toot toot' 'icon additional additional' 'actions actions date_via';
@ -61,6 +62,7 @@ grid-area: icon;
} }
.area-display_name { .area-display_name {
user-select: auto;
height:1.5em; height:1.5em;
margin:2px; margin:2px;
overflow:hidden; overflow:hidden;
@ -79,6 +81,8 @@ text-overflow: ellipsis;
} }
.area-toot { .area-toot {
cursor:text;
user-select: auto;
margin:2px; margin:2px;
grid-area: toot; grid-area: toot;
} }
@ -89,6 +93,8 @@ grid-area: toot;
} }
.area-additional { .area-additional {
cursor:text;
user-select: auto;
grid-area: additional; grid-area: additional;
} }

View File

@ -23,7 +23,7 @@
<script type="text/javascript" src="./js/common/keyshortcut.js"></script> <script type="text/javascript" src="./js/common/keyshortcut.js"></script>
<script type="text/javascript" src="./js/common/modal.js"></script> <script type="text/javascript" src="./js/common/modal.js"></script>
<script> <script>
var ver="Riina (ver.5)"; var ver="Riina (ver.6)";
//betaを入れるとバージョンチェックしない //betaを入れるとバージョンチェックしない
//var ver="beta"; //var ver="beta";
var acct_id=0; var acct_id=0;
@ -56,7 +56,7 @@ var tlid=0;
<!--ドラッグハンドラ--> <!--ドラッグハンドラ-->
<div id="drag"><div id="drag-content">ここにドラッグして添付(ドラッグと同時にアップロードされます)<br><button class="btn waves-effect" onclick="closedrop()">閉じる</button></div></div> <div id="drag"><div id="drag-content">ここにドラッグして添付(ドラッグと同時にアップロードされます)<br><button class="btn waves-effect" onclick="closedrop()">閉じる</button></div></div>
<!--アカウント追加--> <!--アカウント追加-->
<div id="add-box" class="hide"> <div id="add-box" class="hide z-depth-4">
<div class="input-field"> <div class="input-field">
アカウント選択<br> アカウント選択<br>
<select id="add-acct-sel" class="acct-sel" style="color:black"> <select id="add-acct-sel" class="acct-sel" style="color:black">
@ -78,7 +78,7 @@ var tlid=0;
<button class="btn waves-effect orange " style="width:calc( 100% - 10px);" onclick="addToggle()"><i class="material-icons left">close</i>閉じる</button> <button class="btn waves-effect orange " style="width:calc( 100% - 10px);" onclick="addToggle()"><i class="material-icons left">close</i>閉じる</button>
</div> </div>
<!--検索--> <!--検索-->
<div id="src-box" class="hide notf-box"> <div id="src-box" class="hide notf-box z-depth-4">
<div class="input-field"> <div class="input-field">
<i class="material-icons prefix">search</i> <i class="material-icons prefix">search</i>
<input id="src" type="text" class="validate" style="width:calc( 70% - 40px);"> <input id="src" type="text" class="validate" style="width:calc( 70% - 40px);">
@ -101,7 +101,7 @@ var tlid=0;
<!--TLのTL--> <!--TLのTL-->
<div id="timeline-container"> <div id="timeline-container">
</div> </div>
<div id="post-box"> <div id="post-box" class="z-depth-3">
<!--トゥートボックス--> <!--トゥートボックス-->
<span class="cancel"> <span class="cancel">
<i class="material-icons" onclick="hide()" title="このボックスを閉じる(X)">cancel</i> <i class="material-icons" onclick="hide()" title="このボックスを閉じる(X)">cancel</i>

View File

@ -59,7 +59,7 @@ function crat(str) {
format_str = 'YYYY-MM-DD hh:mm:ss'; format_str = 'YYYY-MM-DD hh:mm:ss';
format_str = format_str.replace(/YYYY/g, date.getFullYear()); format_str = format_str.replace(/YYYY/g, date.getFullYear());
format_str = format_str.replace(/MM/g, date.getMonth()); format_str = format_str.replace(/MM/g, date.getMonth()+1);
format_str = format_str.replace(/DD/g, date.getDate()); format_str = format_str.replace(/DD/g, date.getDate());
format_str = format_str.replace(/hh/g, date.getHours()); format_str = format_str.replace(/hh/g, date.getHours());
format_str = format_str.replace(/mm/g, date.getMinutes()); format_str = format_str.replace(/mm/g, date.getMinutes());

View File

@ -145,7 +145,7 @@ function mixre(acct_id, tlid) {
} }
localStorage.setItem("pool", pool); localStorage.setItem("pool", pool);
} else { } else {
$("#timeline_" + tlid).prepend(templete); $("#timeline_" + tlid).before(templete);
} }
additional(acct_id, tlid); additional(acct_id, tlid);
jQuery("time.timeago").timeago(); jQuery("time.timeago").timeago();
@ -203,7 +203,7 @@ function mixmore(tlid) {
console.error(error); console.error(error);
}).then(function(obj) { }).then(function(obj) {
if (!$("[toot-id=" + obj[0].id + "]").length) { if (!$("[toot-id=" + obj[0].id + "]").length) {
$("#timeline_" + tlid + " .cvo").first().prepend(parse([obj[0]], 'home', $("#timeline_" + tlid + " .cvo").first().before(parse([obj[0]], 'home',
acct_id)); acct_id));
} }
Object.keys(obj).forEach(function(key) { Object.keys(obj).forEach(function(key) {
@ -217,7 +217,7 @@ function mixmore(tlid) {
if (!$("[toot-id=" + toot.id + "]").length) { if (!$("[toot-id=" + toot.id + "]").length) {
if (key2 > tarunix) { if (key2 > tarunix) {
var local = locals[key2]; var local = locals[key2];
$("[toot-id=" + local + "]").append(parse([toot], 'home', $("[toot-id=" + local + "]").after(parse([toot], 'home',
acct_id)); acct_id));
tarunix = 0; tarunix = 0;
} }

View File

@ -320,7 +320,7 @@ function parseNotf(obj, popup, tlid, acct_id) {
'"></a></div>' + '"></a></div>' +
'<div class="area-display_name"><span class="user">' + '<div class="area-display_name"><span class="user">' +
toot.account.display_name + toot.account.display_name +
'</span><span class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"> @' + '</span><span class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;cursor:text;"> @' +
toot.account.acct + locked + '</span></div>' + toot.account.acct + locked + '</span></div>' +
'<div class="area-acct"><div><span class="cbadge pointer" onclick="tootUriCopy(\'' + toot.url + '<div class="area-acct"><div><span class="cbadge pointer" onclick="tootUriCopy(\'' + toot.url +
'\');" title="' + date(toot.created_at, 'absolute') + '\');" title="' + date(toot.created_at, 'absolute') +

View File

@ -214,7 +214,7 @@ function parse(obj, mix, acct_id) {
'"></a></div>' + '"></a></div>' +
'<div class="area-display_name"><span class="user">' + '<div class="area-display_name"><span class="user">' +
toot.account.display_name + toot.account.display_name +
'</span><span class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"> @' + '</span><span class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; cursor:text;"> @' +
toot.account.acct + locked + '</span></div>' + toot.account.acct + locked + '</span></div>' +
'<div class="area-acct"><div><span class="cbadge pointer" onclick="tootUriCopy(\'' + '<div class="area-acct"><div><span class="cbadge pointer" onclick="tootUriCopy(\'' +
toot.url + '\');" title="' + date(toot.created_at, 'absolute') + toot.url + '\');" title="' + date(toot.created_at, 'absolute') +
@ -295,9 +295,9 @@ function userparse(obj, auth, acct_id, notf) {
acct_id + ');" user="' + toot.acct + '" class="udg">' + acct_id + ');" user="' + toot.acct + '" class="udg">' +
'<img src="' + toot.avatar + '" width="40" class="prof-img" user="' + toot '<img src="' + toot.avatar + '" width="40" class="prof-img" user="' + toot
.acct + '"></a></div>' + .acct + '"></a></div>' +
'<div style="flex-grow:3; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"><big>' + '<div style="flex-grow:3; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;user-select:auto; cursor:text;"><big>' +
toot.display_name + '</big></div>' + toot.display_name + '</big></div>' +
'<div class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"> @' + '<div class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;user-select:auto; cursor:text;"> @' +
toot.acct + locked + '</div>' + toot.acct + locked + '</div>' +
'</div>' + auth + '</div>' + auth +
'<div style="justify-content:space-around"> <div class="cbadge" style="width:100px;">Follows:' + '<div style="justify-content:space-around"> <div class="cbadge" style="width:100px;">Follows:' +

View File

@ -62,7 +62,7 @@
Object.keys(obj).forEach(function(key) { Object.keys(obj).forEach(function(key) {
var acct = obj[key]; var acct = obj[key];
var html = '<div class="box" id="timeline_box_' + key + '_box" tlid="' + key + var html = '<div class="box" id="timeline_box_' + key + '_box" tlid="' + key +
'"><div class="notice-box">'+ '"><div class="notice-box z-depth-2">'+
'<div class="area-notice"><i class="material-icons" id="notice_icon_' + key + '" style="font-size:40px; padding-top:25%;"></i></div>'+ '<div class="area-notice"><i class="material-icons" id="notice_icon_' + key + '" style="font-size:40px; padding-top:25%;"></i></div>'+
'<div class="area-notice_name"><span id="notice_' + key + '"" class="tl-title"></span></div>'+ '<div class="area-notice_name"><span id="notice_' + key + '"" class="tl-title"></span></div>'+
'<div class="area-a1"><a onclick="notfToggle(' + acct.domain + ',' + key + '<div class="area-a1"><a onclick="notfToggle(' + acct.domain + ',' + key +

View File

@ -25,9 +25,10 @@ function scrollck() {
} }
} }
//続きを読むトリガー //続きを読むトリガー
var scrt = $(this).find(".tl").height() - 1000; var scrt = $(this).find(".tl").height() - 1500;
var scr = $(this).scrollTop(); var scr = $(this).scrollTop();
if (scr > scrt) { if (scr > scrt) {
console.log("続き")
moreload('', tlid); moreload('', tlid);
} }
}); });

View File

@ -71,7 +71,7 @@ function flw(user, more, acct_id) {
todo(error); todo(error);
console.error(error); console.error(error);
}).then(function(json) { }).then(function(json) {
var templete = userparse(json); var templete = userparse(json,'',acct_id);
if (more) { if (more) {
$("#his-follow-list-contents").append(templete); $("#his-follow-list-contents").append(templete);
} else { } else {
@ -112,7 +112,7 @@ function fer(user, more, acct_id) {
todo(error); todo(error);
console.error(error); console.error(error);
}).then(function(json) { }).then(function(json) {
var templete = userparse(json); var templete = userparse(json,'',acct_id);
if (more) { if (more) {
$("#his-follower-list-contents").append(templete); $("#his-follower-list-contents").append(templete);
} else { } else {
@ -149,7 +149,7 @@ function showFav(more, acct_id) {
todo(error); todo(error);
console.error(error); console.error(error);
}).then(function(json) { }).then(function(json) {
var templete = parse(json); var templete = parse(json, '', acct_id);
if (more) { if (more) {
$("#his-fav-list-contents").append(templete); $("#his-fav-list-contents").append(templete);
} else { } else {
@ -185,7 +185,7 @@ function showMut(more, acct_id) {
todo(error); todo(error);
console.error(error); console.error(error);
}).then(function(json) { }).then(function(json) {
var templete = userparse(json); var templete = userparse(json,'',acct_id);
if (more) { if (more) {
$("#his-muting-list-contents").append(templete); $("#his-muting-list-contents").append(templete);
} else { } else {
@ -221,7 +221,7 @@ function showBlo(more, acct_id) {
todo(error); todo(error);
console.error(error); console.error(error);
}).then(function(json) { }).then(function(json) {
var templete = userparse(json); var templete = userparse(json,'',acct_id);
if (more) { if (more) {
$("#his-blocking-list-contents").append(templete); $("#his-blocking-list-contents").append(templete);
} else { } else {
@ -257,7 +257,7 @@ function showReq(more, acct_id) {
todo(error); todo(error);
console.error(error); console.error(error);
}).then(function(json) { }).then(function(json) {
var templete = userparse(json, 'true'); var templete = userparse(json, 'true',acct_id);
if (more) { if (more) {
$("#his-request-list-contents").append(templete); $("#his-request-list-contents").append(templete);
} else { } else {

View File

@ -10,6 +10,7 @@ if(location.search){
} }
} }
function udg(user, acct_id) { function udg(user, acct_id) {
reset();
if (!user) { if (!user) {
user = localStorage.getItem("user-id_"+acct_id); user = localStorage.getItem("user-id_"+acct_id);
console.log(user); console.log(user);
@ -18,6 +19,7 @@ function udg(user, acct_id) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem(domain + "_at"); var at = localStorage.getItem(domain + "_at");
var start = "https://" + domain + "/api/v1/accounts/" + user; var start = "https://" + domain + "/api/v1/accounts/" + user;
console.log(start);
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
@ -41,8 +43,9 @@ function udg(user, acct_id) {
if (json.moved) { if (json.moved) {
Materialize.toast( Materialize.toast(
'このアカウントは移行します<button class="btn-flat toast-action" onclick="udg(\"' + 'このアカウントは移行します<button class="btn-flat toast-action" onclick="udg(\"' +
json.moved + '\")">移行先を見る</button>', 4000) json.moved + ','+acct_id+'\")">移行先を見る</button>', 4000)
} else { } else {
$('#his-data').modal('open');
$('#his-data').attr("user-id", user); $('#his-data').attr("user-id", user);
$('#his-data').attr("use-acct", acct_id); $('#his-data').attr("use-acct", acct_id);
if(json.username!=json.acct){ if(json.username!=json.acct){
@ -51,6 +54,9 @@ function udg(user, acct_id) {
}else{ }else{
$('#his-data').attr("remote", "false"); $('#his-data').attr("remote", "false");
} }
utl(json.id, '', acct_id);
flw(json.id, '', acct_id);
fer(json.id, '', acct_id);
$("#his-name").text(json.display_name); $("#his-name").text(json.display_name);
$("#his-acct").text(json.acct); $("#his-acct").text(json.acct);
$("#his-prof").attr("src", json.avatar); $("#his-prof").attr("src", json.avatar);
@ -58,38 +64,33 @@ function udg(user, acct_id) {
$("#his-sta").text(json.statuses_count); $("#his-sta").text(json.statuses_count);
$("#his-follow").text(json.following_count); $("#his-follow").text(json.following_count);
$("#his-follower").text(json.followers_count); $("#his-follower").text(json.followers_count);
$("#his-des").html(json.note);
$('#his-data').modal('open');
utl(json.id, '', acct_id);
flw(json.id, '', acct_id);
fer(json.id, '', acct_id);
$('ul.tabs').tabs();
$('#his-data').css('background-size', 'cover');
$("#his-since").text(crat(json.created_at)); $("#his-since").text(crat(json.created_at));
$("#his-des").html(json.note);
$('#his-data').css('background-size', 'cover');
localStorage.setItem("history" , user); localStorage.setItem("history" , user);
} //自分の時
//自分の時 if (json.acct == localStorage.getItem("user_"+acct_id)) {
if (json.acct == localStorage.getItem("user_"+acct_id)) { showFav('', acct_id);
$("#his-name-val").val(json.display_name); showBlo('', acct_id);
var des = json.note; showMut('', acct_id);
des = des.replace(/<br \/>/g, "\n") showDom('', acct_id);
des = $.strip_tags(des); showReq('', acct_id);
$("#his-des-val").val(des); $("#his-name-val").val(json.display_name);
$("#his-follow-btn").hide(); var des = json.note;
$("#his-block-btn").hide(); des = des.replace(/<br \/>/g, "\n")
$("#his-mute-btn").hide(); des = $.strip_tags(des);
$("#his-notf-btn").hide(); $("#his-des-val").val(des);
$("#his-domain-btn").hide(); $("#his-follow-btn").hide();
$("#my-data-nav").show(); $("#his-block-btn").hide();
$("#his-data-nav").hide(); $("#his-mute-btn").hide();
$("#his-notf-btn").hide();
$("#his-domain-btn").hide();
$("#my-data-nav").show();
$("#his-data-nav").hide();
} else {
relations(user, acct_id);
}
$('ul.tabs').tabs('select_tab', 'his-tl'); $('ul.tabs').tabs('select_tab', 'his-tl');
showFav('', acct_id);
showBlo('', acct_id);
showMut('', acct_id);
showDom('', acct_id);
showReq('', acct_id);
} else {
relations(user, acct_id);
} }
todc(); todc();
}); });
@ -169,6 +170,11 @@ function relations(user, acct_id) {
//オールリセット //オールリセット
function hisclose() { function hisclose() {
$('#his-data').modal('close'); $('#his-data').modal('close');
reset();
$('#his-data').attr("history", "");
localStorage.removeItem("history");
}
function reset(){
$("#his-name").text("Loading"); $("#his-name").text("Loading");
$("#his-acct").text(""); $("#his-acct").text("");
$("#his-prof").attr("src", "./img/loading.svg"); $("#his-prof").attr("src", "./img/loading.svg");
@ -199,6 +205,4 @@ function hisclose() {
$("#his-data-nav").show(); $("#his-data-nav").show();
$(".cont-series").html(""); $(".cont-series").html("");
$("#domainblock").val(""); $("#domainblock").val("");
$('#his-data').attr("history", "");
localStorage.removeItem("history");
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "TheDesk", "name": "TheDesk",
"version": "12.5.0", "version": "12.6.0",
"description": "TheDesk on Mastodonはシンプルと多機能を両立したデスクトップ向けクライアントです", "description": "TheDesk on Mastodonはシンプルと多機能を両立したデスクトップ向けクライアントです",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {

View File

@ -1 +1 @@
{"desk":"Riina (ver.5)","date":"2018-02-25","detail":"内部V:12.5.0|デザインとバグ修正。詳しくはGitHub参照"} {"desk":"Riina (ver.6)","date":"2018-02-25","detail":"内部V:12.5.0|デザインとバグ修正。詳しくはGitHub参照"}