From 1e0ebe9b7f277cf8f1a0af8c0901386c4bf32f02 Mon Sep 17 00:00:00 2001 From: cutls Date: Sun, 20 Oct 2019 13:11:03 +0900 Subject: [PATCH] Improve: profile --- app/css/userdata.css | 31 +++++++++++++++++-- app/js/userdata/showOnTL.js | 55 ++++++++++++++++++--------------- app/view/make/index.sample.html | 47 ++++++++++++++++++---------- 3 files changed, 88 insertions(+), 45 deletions(-) diff --git a/app/css/userdata.css b/app/css/userdata.css index af2b8422..3d8cc72c 100644 --- a/app/css/userdata.css +++ b/app/css/userdata.css @@ -4,6 +4,9 @@ background-image: url("../../loading.svg"); overflow-y: hidden; } +#his-data .btn .material-icons{ + float:left; +} #his-data-content { display: flex; justify-content: center; @@ -22,6 +25,7 @@ } #his-float-data { height: 100%; + overflow-y: hidden; } #his-leftside { width: 500px; @@ -60,10 +64,10 @@ padding: 0; padding-left: 5px; } -#his-data a span.ellipsis:after { +.his-var-content a span.ellipsis:after { content: "..."; } -#his-data a:not(.mention) span:last-of-type { +.his-var-content a:not(.mention) span:last-of-type { display: none; } #his-data a .rep_ct, @@ -99,7 +103,8 @@ width: 20px; } #his-plus-action .btn { - width: 170px; + padding-right: 5px; + padding-left: 5px; } .tabs { display: flex; @@ -107,10 +112,30 @@ .tabs .tab a { padding: 8px 12px; } +#his-des { + max-height: 250px; + overflow-y: scroll; +} +#his-sign-action { + border: 1px solid; + border-radius: 5px; + display: flex; + align-items: center; + padding-left: 10px; + padding-right: 10px; + flex-wrap: wrap; +} +#his-sign-action .btn { + flex-basis: 31.2%; +} #his-des .mention { color: #039be5; cursor: pointer; } +#his-table{ + max-height: 150px; + overflow-y: scroll; +} #his-float-blocked { display: flex; justify-content: center; diff --git a/app/js/userdata/showOnTL.js b/app/js/userdata/showOnTL.js index 0746a993..2da0b6a9 100644 --- a/app/js/userdata/showOnTL.js +++ b/app/js/userdata/showOnTL.js @@ -139,8 +139,10 @@ function udg(user, acct_id) { $("#his-since").text(crat(json.created_at)); $("#his-openin").attr("data-href", json.url); if (json.fields) { + var table ="" if (json.fields.length > 0) { - note = note + '' + $("#his-des").css("max-height", "250px"); + table = '
' for (var i = 0; i < json.fields.length; i++) { var fname = json.fields[i].name; var fval = json.fields[i].value; @@ -151,16 +153,18 @@ function udg(user, acct_id) { var when = ""; var color = "inherit" } - note = note + ''; + table = table + ''; } - note = note + '
' + twemoji.parse(escapeHTML(fname)) + '' + twemoji.parse(fval) + '
' + escapeHTML(fname) + '' + fval + '
' + table = table + '' $("#his-des").html(twemoji.parse(note)); } else { - $("#his-des").html(twemoji.parse(note)); + $("#his-des").css("max-height", "400px"); } - } else { - $("#his-des").html(twemoji.parse(note)); + $("#his-table").html(twemoji.parse(table)); + }else { + $("#his-des").css("max-height", "400px"); } + $("#his-des").html(twemoji.parse(note)); if (json.bot) { $("#his-bot").html(lang.lang_showontl_botacct); } @@ -305,10 +309,10 @@ function misskeyUdg(user, acct_id) { if (json.isFollowing) { //自分がフォローしている $("#his-data").addClass("following"); - $("#his-follow-btn").text(lang.lang_status_unfollow); + $("#his-follow-btn-text").text(lang.lang_status_unfollow); hisList(user, acct_id); } else { - $("#his-follow-btn").text(lang.lang_status_follow); + $("#his-follow-btn-text").text(lang.lang_status_follow); } if (json.isFollowed) { //フォローされてる @@ -317,9 +321,9 @@ function misskeyUdg(user, acct_id) { $("#his-block-btn").hide(); if (json.isMuted) { $("#his-data").addClass("muting"); - $("#his-mute-btn").text(lang.lang_status_unmute); + $("#his-mute-btn-text").text(lang.lang_status_unmute); } else { - $("#his-mute-btn").text(lang.lang_status_mute); + $("#his-mute-btn-text").text(lang.lang_status_mute); } $(".only-my-data").hide(); $(".only-his-data").show(); @@ -362,10 +366,10 @@ function relations(user, acct_id) { if (json.following) { //自分がフォローしている $("#his-data").addClass("following"); - $("#his-follow-btn").text(lang.lang_status_unfollow); + $("#his-follow-btn-text").text(lang.lang_status_unfollow); hisList(user, acct_id); } else { - $("#his-follow-btn").text(lang.lang_status_follow); + $("#his-follow-btn-text").text(lang.lang_status_follow); } if (json.followed_by) { //フォローされてる @@ -373,35 +377,35 @@ function relations(user, acct_id) { } if (json.blocking) { $("#his-data").addClass("blocking"); - $("#his-block-btn").text(lang.lang_status_unblock); + $("#his-block-btn-text").text(lang.lang_status_unblock); } else { - $("#his-block-btn").text(lang.lang_status_block); + $("#his-block-btn-text").text(lang.lang_status_block); } if (json.muting) { $("#his-data").addClass("muting"); - $("#his-mute-btn").text(lang.lang_status_unmute); + $("#his-mute-btn-text").text(lang.lang_status_unmute); } else { - $("#his-mute-btn").text(lang.lang_status_mute); + $("#his-mute-btn-text").text(lang.lang_status_mute); } if (json.muting_notifications) { $("#his-data").addClass("mutingNotf"); - $("#his-notf-btn").text(lang.lang_showontl_notf + lang.lang_status_unmute); + $("#his-notf-btn-text").text(lang.lang_showontl_notf + lang.lang_status_unmute); } else { - $("#his-notf-btn").text(lang.lang_showontl_notf + lang.lang_status_mute); + $("#his-notf-btn-text").text(lang.lang_showontl_notf + lang.lang_status_mute); } if (json.domain_blocking) { $("#his-data").addClass("blockingDom"); - $("#his-domain-btn").text(lang.lang_showontl_domain + lang.lang_status_unblock); + $("#his-domain-btn-text").text(lang.lang_showontl_domain + lang.lang_status_unblock); } else { - $("#his-domain-btn").text(lang.lang_showontl_domain + lang.lang_status_block); + $("#his-domain-btn-text").text(lang.lang_showontl_domain + lang.lang_status_block); } //Endorsed if (json.endorsed) { $("#his-end-btn").addClass("endorsed"); - $("#his-end-btn").text(lang.lang_status_unendorse) + $("#his-end-btn-text").text(lang.lang_status_unendorse) } else { $("#his-end-btn").removeClass("endorsed"); - $("#his-end-btn").text(lang.lang_status_endorse) + $("#his-end-btn-text").text(lang.lang_status_endorse) } //Blocked if (json.blocked_by) { @@ -452,6 +456,7 @@ function reset() { $("#his-data").removeClass("mutingNotf"); $("#his-data").removeClass("blockingDom"); $("#his-end-btn").removeClass("endorsed"); + $("#his-des").css("max-height", "250px"); $("#his-bot").html(""); $("#his-follow-btn").show(); $("#his-block-btn").show(); @@ -459,9 +464,9 @@ function reset() { $("#his-notf-btn").show(); $("#his-domain-btn").show(); $("#his-emp-btn").show(); - $("#his-follow-btn").text(lang.lang_status_follow); - $("#his-mute-btn").text(lang.lang_status_mute); - $("#his-block-btn").text(lang.lang_status_block); + $("#his-follow-btn-text").text(lang.lang_status_follow); + $("#his-mute-btn-text").text(lang.lang_status_mute); + $("#his-block-btn-text").text(lang.lang_status_block); $("#his-notf-btn").text(lang.lang_showontl_notf + lang.lang_status_mute); $("#his-domain-btn").text(lang.lang_showontl_domain + lang.lang_status_block); $("#his-relation").text(""); diff --git a/app/view/make/index.sample.html b/app/view/make/index.sample.html index 852f57bc..91aca59f 100644 --- a/app/view/make/index.sample.html +++ b/app/view/make/index.sample.html @@ -489,17 +489,36 @@

-
- @@empUser@@ - @@endorse@@
- @@openinbrowser@@ - @@mainacct@@
-
+

+
+ people@@follow@@ + voice_over_off@@mute@@ + block@@block@@ + + more_vert@@more@@ +
+ +
@@ -661,12 +680,6 @@