Improve: profile
This commit is contained in:
parent
9a315c241c
commit
1e0ebe9b7f
|
@ -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;
|
||||
|
|
|
@ -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 + '<table id="his-field">'
|
||||
$("#his-des").css("max-height", "250px");
|
||||
table = '<table id="his-field">'
|
||||
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 + '<tr><td class="his-field-title">' + twemoji.parse(escapeHTML(fname)) + '</td><td class="his-field-content" title="' + when + '" style="background-color:' + color + '">' + twemoji.parse(fval) + '</td></tr>';
|
||||
table = table + '<tr><td class="his-field-title">' + escapeHTML(fname) + '</td><td class="his-field-content" title="' + when + '" style="background-color:' + color + '">' + fval + '</td></tr>';
|
||||
}
|
||||
note = note + '</table>'
|
||||
table = 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("");
|
||||
|
|
|
@ -489,17 +489,36 @@
|
|||
<div id="his-proof-prof"></div>
|
||||
</div>
|
||||
<div id="his-des" data-acct=""></div><br>
|
||||
<div id="his-plus-action">
|
||||
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-emp-btn"
|
||||
onclick="empUser()">@@empUser@@</a>
|
||||
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat only-his-data"
|
||||
id="his-end-btn" onclick="pinUser()">@@endorse@@</a><br>
|
||||
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-openin"
|
||||
onclick="profbrws()">@@openinbrowser@@</a>
|
||||
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat only-my-data"
|
||||
id="his-main-acct" onclick="setMain()"
|
||||
style="width: calc(100% - 10px)">@@mainacct@@</a><br>
|
||||
<div id="his-table"></div><br>
|
||||
<div id="his-sign-action">
|
||||
<a href="#!" class="waves-effect waves-green btn"
|
||||
onclick="follow()" style="flex-basis: 100%" id="his-follow-btn"><i class="material-icons">people</i><span id="his-follow-btn-text">@@follow@@</span></a>
|
||||
<a href="#!" class="waves-effect waves-green btn blue"
|
||||
onclick="muteDo()" id="his-mute-btn"><i class="material-icons">voice_over_off</i><span id="his-mute-btn-text">@@mute@@</span></a>
|
||||
<a href="#!" class="waves-effect waves-g
|
||||
reen btn red"
|
||||
onclick="block()" id="his-block-btn"><i class="material-icons ">block</i><span id="his-block-btn-text">@@block@@</span></a>
|
||||
<a class="dropdown-trigger btn waves-effect grey" href="#" data-target="actiondropdown">
|
||||
<i class="material-icons">more_vert</i>@@more@@</a>
|
||||
</div>
|
||||
<!-- Dropdown Structure -->
|
||||
<ul id="actiondropdown" class="dropdown-content">
|
||||
<li onclick="empUser()">
|
||||
<a title="@@empUser@@"><i class="material-icons">highlight</i>@@empUser@@</a>
|
||||
</li>
|
||||
<li onclick="pinUser()" class="only-his-data">
|
||||
<a title="@@endorse@@"><i
|
||||
class="material-icons">thumb_up</i>@@endorse@@</a>
|
||||
</li>
|
||||
<li onclick="profbrws()" id="his-openin">
|
||||
<a title="@@openinbrowser@@"><i
|
||||
class="material-icons">open_in_browser</i>@@openinbrowser@@</a>
|
||||
</li>
|
||||
<li onclick="setMain()" class="only-my-data" id="his-main-acct">
|
||||
<a title="@@mainacct@@"><i
|
||||
class="material-icons">grade</i>@@mainacct@@</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="his-float" id="his-float-timeline">
|
||||
|
@ -661,12 +680,6 @@
|
|||
<div class="modal-footer">
|
||||
<button class="modal-action waves-effect waves-green btn-flat" id="his-history-btn"
|
||||
onclick="historyShow()">@@historyBack@@</button>
|
||||
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-follow-btn"
|
||||
onclick="follow()">@@follow@@</a>
|
||||
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-mute-btn"
|
||||
onclick="muteDo()">@@mute@@</a>
|
||||
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-block-btn"
|
||||
onclick="block()">@@block@@</a>
|
||||
<a href="#!" class="modal-action waves-effect waves-green btn-flat" onclick="hisclose()">@@close@@</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user