Add: follow request auth/reject
This commit is contained in:
parent
e9024312a7
commit
a636c745e4
|
@ -872,6 +872,7 @@ function userparse(obj, auth, acct_id, tlid, popup) {
|
||||||
var datetype = localStorage.getItem("datetype");
|
var datetype = localStorage.getItem("datetype");
|
||||||
Object.keys(obj).forEach(function(key) {
|
Object.keys(obj).forEach(function(key) {
|
||||||
var toot = obj[key];
|
var toot = obj[key];
|
||||||
|
console.log(toot)
|
||||||
if(!toot.username){
|
if(!toot.username){
|
||||||
var raw=toot;
|
var raw=toot;
|
||||||
toot=toot.account;
|
toot=toot.account;
|
||||||
|
@ -885,10 +886,11 @@ function userparse(obj, auth, acct_id, tlid, popup) {
|
||||||
var locked = "";
|
var locked = "";
|
||||||
}
|
}
|
||||||
if (auth) {
|
if (auth) {
|
||||||
var auth = '<i class="material-icons gray pointer" onclick="request(\'' +
|
var authhtml = '<i class="material-icons gray pointer" onclick="request(\'' +
|
||||||
toot.id + '\',\'authorize\',' + acct_id + ')">person_add</i>';
|
toot.id + '\',\'authorize\',' + acct_id + ')">person_add</i> <i class="material-icons gray pointer" onclick="request(\'' +
|
||||||
|
toot.id + '\',\'reject\',' + acct_id + ')">person_add_disabled</i>';
|
||||||
} else {
|
} else {
|
||||||
var auth = "";
|
var authhtml = "";
|
||||||
}
|
}
|
||||||
var ftxt=lang.lang_parse_followed;
|
var ftxt=lang.lang_parse_followed;
|
||||||
if(!locale && localStorage.getItem("followlocale_" + acct_id)){
|
if(!locale && localStorage.getItem("followlocale_" + acct_id)){
|
||||||
|
@ -974,13 +976,13 @@ function userparse(obj, auth, acct_id, tlid, popup) {
|
||||||
'<div class="area-display_name"><div class="flex-name"><span class="user">' +
|
'<div class="area-display_name"><div class="flex-name"><span class="user">' +
|
||||||
dis_name + '</span>' +
|
dis_name + '</span>' +
|
||||||
'<span class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;user-select:auto; cursor:text;"> @' +
|
'<span class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;user-select:auto; cursor:text;"> @' +
|
||||||
toot.acct + locked + auth +'</span>' +
|
toot.acct + locked +'</span>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div style="justify-content:space-around" class="area-toot"> <div class="cbadge" style="width:100px;">Follows:' +
|
'<div style="justify-content:space-around" class="area-toot"> <div class="cbadge" style="width:100px;">Follows:' +
|
||||||
toot.following_count +
|
toot.following_count +
|
||||||
'</div><div class="cbadge" style="width:100px;">Followers:' + toot.followers_count +
|
'</div><div class="cbadge" style="width:100px;">Followers:' + toot.followers_count +
|
||||||
'</div>' +
|
'</div>' + authhtml+
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
|
|
|
@ -438,10 +438,11 @@ function showReq(more, acct_id) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
if(localStorage.getItem("mode_" + domain)=="misskey"){
|
|
||||||
var templete = userparse(json, 'true',acct_id);
|
if(localStorage.getItem("mode_" + domain)!="misskey"){
|
||||||
|
var templete = userparse(json, true,acct_id);
|
||||||
}else{
|
}else{
|
||||||
var templete = misskeyUserparse(json, 'true',acct_id);
|
var templete = misskeyUserparse(json, true,acct_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!json[0]){
|
if(!json[0]){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user