From 18ce8cf2f4e512a063901a82d205f5de67a78845 Mon Sep 17 00:00:00 2001 From: Cutls Date: Sat, 31 Aug 2019 00:09:37 +0900 Subject: [PATCH] Add: show note and last-status on acct --- app/css/master.css | 1 + app/css/tl.css | 12 ++++++++++++ app/js/tl/parse.js | 35 +++++++++++++++++++---------------- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/app/css/master.css b/app/css/master.css index ea11f10d..0f80f059 100644 --- a/app/css/master.css +++ b/app/css/master.css @@ -338,6 +338,7 @@ blockquote:before, margin-left: -5px; display: flex; height: calc(100% - 3.5rem); + overflow: hidden; } #left-menu { width: 230px; diff --git a/app/css/tl.css b/app/css/tl.css index 525151bc..abfb79ea 100644 --- a/app/css/tl.css +++ b/app/css/tl.css @@ -280,6 +280,17 @@ iframe, white-space: nowrap; text-overflow: ellipsis; } +.acct-note p{ + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.area-additional.acct-note p:not(:first-child) { + display: none; +} +.area-additional.acct-note p:first-child:after { + content: "..."; +} .area-actions { padding: 0; @@ -386,6 +397,7 @@ iframe, white-space: nowrap; text-overflow: ellipsis; height: calc(0.8em + 8px); + user-select: none; } .cbadge-hover { color: var(--color); diff --git a/app/js/tl/parse.js b/app/js/tl/parse.js index 203be604..c08a3240 100644 --- a/app/js/tl/parse.js +++ b/app/js/tl/parse.js @@ -376,7 +376,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) { var uniqueid = toot.id; var toot = toot.reblog; var dis_name = escapeHTML(toot.account.display_name); - if(!dis_name){ + if (!dis_name) { dis_name = toot.account.acct } if (toot.account.emojis) { @@ -545,7 +545,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) { '">' + ended + ''; } - + var mediack = toot.media_attachments[0]; //メディアがあれば var media_ids = ""; @@ -624,9 +624,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) { } else { var to_mention = [toot.account.acct]; //メンションじゃなくてもlang_parse_thread - if(toot.in_reply_to_id){ + if (toot.in_reply_to_id) { mentions = '
' + lang.lang_parse_thread + '
'; + ',\'' + tlid + '\')" class="pointer waves-effect">' + lang.lang_parse_thread + ''; } } var tagck = toot.tags[0]; @@ -1014,16 +1014,18 @@ function userparse(obj, auth, acct_id, tlid, popup) { } else { var avatar = "../../img/missing.svg"; } - if(tlid == "dir" && acct_id == "noauth"){ - var udg ='' - }else{ - var udg ='' + if (tlid == "dir" && acct_id == "noauth") { + var udg = '' + } else { + var udg = '' } - if(tlid == "dir"){ - var latest = date(toot.last_status_at, "relative"); - var authhtml = '
Last: ' + latest + - '
'; + var latest = date(toot.last_status_at, "relative"); + if(toot.last_status_at){ + var latesthtml = '
Last: ' + latest + + '
' + }else{ + var latesthtml = "" } templete = templete + '
' + @@ -1037,10 +1039,11 @@ function userparse(obj, auth, acct_id, tlid, popup) { toot.acct + locked + '' + '
' + '
' + - '
Follows:' + + '
' + toot.note.replace(/.+/g, "...") + '
' + + '
' + lang.lang_status_follow + ':' + toot.following_count + - '
Followers:' + toot.followers_count + - '
' + authhtml + + '
' + lang.lang_status_followers + ':' + toot.followers_count + + '
' + latesthtml + authhtml + '
' + '
'; }