Add: boost with visibility
This commit is contained in:
parent
8f76c9b09d
commit
52c65afce6
|
@ -50,7 +50,7 @@ function fav(id, acct_id, remote) {
|
|||
}
|
||||
|
||||
//ブースト
|
||||
function rt(id, acct_id, remote) {
|
||||
function rt(id, acct_id, remote, vis) {
|
||||
if ($("#pub_" + id).hasClass("rted")) {
|
||||
var flag = "unreblog";
|
||||
} else {
|
||||
|
@ -64,7 +64,11 @@ function rt(id, acct_id, remote) {
|
|||
httpreq.setRequestHeader('Content-Type', 'application/json');
|
||||
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
|
||||
httpreq.responseType = "json";
|
||||
httpreq.send();
|
||||
if(vis){
|
||||
httpreq.send(JSON.stringify({visibility: vis}));
|
||||
}else{
|
||||
httpreq.send();
|
||||
}
|
||||
httpreq.onreadystatechange = function () {
|
||||
if (httpreq.readyState === 4) {
|
||||
var json = httpreq.response;
|
||||
|
@ -95,6 +99,11 @@ function rt(id, acct_id, remote) {
|
|||
}
|
||||
}
|
||||
}
|
||||
function boostWith(vis){
|
||||
var id = $("#tootmodal").attr("data-id");
|
||||
var acct_id = $("#tootmodal").attr("data-acct");
|
||||
rt(id, acct_id, false, vis)
|
||||
}
|
||||
|
||||
//フォロー
|
||||
function follow(acct_id, remote) {
|
||||
|
|
|
@ -77,6 +77,7 @@ function details(id, acct_id, tlid, mode) {
|
|||
$("#toot-this .rt_ct").text(json.reblogs_count);
|
||||
$("#tootmodal").attr("data-url", url);
|
||||
$("#tootmodal").attr("data-id", json.id);
|
||||
$("#tootmodal").attr("data-acct", acct_id);
|
||||
if (local) {
|
||||
$("#tootmodal").attr("data-user", scn + "@" + domain);
|
||||
} else {
|
||||
|
|
|
@ -656,7 +656,8 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
|||
} else if (visen == "private") {
|
||||
var vis =
|
||||
'<i class="text-darken-3 material-icons orange-text vis-data pointer" title="' + lang.lang_parse_private + '(' + lang.lang_parse_clickcopy + ')" data-vis="private" onclick="staCopy(\'' + id + '\')">lock</i>';
|
||||
var can_rt = "unvisible";
|
||||
|
||||
var can_rt = "unvisible";
|
||||
} else if (visen == "direct") {
|
||||
var vis =
|
||||
'<i class="text-darken-3 material-icons red-text vis-data pointer" title="' + lang.lang_parse_direct + '(' + lang.lang_parse_clickcopy + ')" data-vis="direct" onclick="staCopy(\'' + id + '\')">mail</i>';
|
||||
|
@ -665,6 +666,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
|||
if (toot.account.acct == localStorage.getItem("user_" + acct_id)) {
|
||||
var if_mine = "";
|
||||
var mine_via = "type-b";
|
||||
var can_rt = "";
|
||||
} else {
|
||||
var if_mine = "hide";
|
||||
var mine_via = "";
|
||||
|
|
|
@ -38,34 +38,39 @@
|
|||
<!--TL-->
|
||||
<!--スターター-->
|
||||
<div id="start">
|
||||
<div id="start-content"><h3 class="center">@@demoBottomBtns@@</h3>
|
||||
<div id="start-content">
|
||||
<h3 class="center">@@demoBottomBtns@@</h3>
|
||||
@@lookAtBottom@@
|
||||
<div id="demobottom">
|
||||
<button class="btn waves-effect"
|
||||
<button class="btn waves-effect"
|
||||
style="width: 300px;height: 2.5rem;line-height: 0;margin: 0; background-color: var(--accentbtn);">
|
||||
<i class="material-icons"
|
||||
style="position: relative; top: 5px; font-size: 1.5rem; text-align: center; margin-right: 10px;">edit</i>@@toot@@
|
||||
</button>
|
||||
<div class="leftside reverse" id="demogroup">
|
||||
<div class="btnsgroup" style="margin-left: 5px;">
|
||||
<a href="#" class="nex waves-effect">
|
||||
<i class="material-icons nex big-icon" title="@@acctMan@@(Ctrl+Shift+M)">account_circle</i>
|
||||
</a>
|
||||
<a href="#" class="nex waves-effect">
|
||||
<i class="material-icons nex" title="@@setting@@(Ctrl+Shift+S)">settings</i>
|
||||
</a>
|
||||
<a class="nex waves-effect">
|
||||
<i class="material-icons" title="@@nanoDes@@TheDesk Nano">remove_from_queue</i>
|
||||
</a>
|
||||
<aside class="nex waves-effect" id="list-tgl">
|
||||
<i class="material-icons" title="@@menu@@">apps</i>
|
||||
</a>
|
||||
<div class="leftside reverse" id="demogroup">
|
||||
<div class="btnsgroup" style="margin-left: 5px;">
|
||||
<a href="#" class="nex waves-effect">
|
||||
<i class="material-icons nex big-icon"
|
||||
title="@@acctMan@@(Ctrl+Shift+M)">account_circle</i>
|
||||
</a>
|
||||
<a href="#" class="nex waves-effect">
|
||||
<i class="material-icons nex" title="@@setting@@(Ctrl+Shift+S)">settings</i>
|
||||
</a>
|
||||
<a class="nex waves-effect">
|
||||
<i class="material-icons" title="@@nanoDes@@TheDesk Nano">remove_from_queue</i>
|
||||
</a>
|
||||
<aside class="nex waves-effect" id="list-tgl">
|
||||
<i class="material-icons" title="@@menu@@">apps</i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><br>
|
||||
<i class="material-icons nex big-icon">account_circle</i>: @@acctMan@@<br> @@acctManDesc@@<hr>
|
||||
<i class="material-icons nex">settings</i>: @@setting@@<br> @@settingDesc@@<hr>
|
||||
<i class="material-icons nex">remove_from_queue</i>: TheDesk Nano @@nanoDes@@<br> @@nanoDescPlus@@<hr>
|
||||
<i class="material-icons nex big-icon">account_circle</i>: @@acctMan@@<br> @@acctManDesc@@
|
||||
<hr>
|
||||
<i class="material-icons nex">settings</i>: @@setting@@<br> @@settingDesc@@
|
||||
<hr>
|
||||
<i class="material-icons nex">remove_from_queue</i>: TheDesk Nano @@nanoDes@@<br> @@nanoDescPlus@@
|
||||
<hr>
|
||||
<i class="material-icons nex">apps</i>: @@menu@@<br> @@menuDesc@@<br>
|
||||
<br>
|
||||
<button class="btn waves-effect" onclick="closeStart()" style="width: 300px;">@@close@@</button>
|
||||
|
@ -438,6 +443,10 @@
|
|||
onclick="staEx('fav')"><i class="fas fa-star"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
@@btWithVis@@<br>
|
||||
<button class="btn waves-effect darken-3 toot-btn-group purple" onclick="boostWith('public')"><i class="material-icons">public</i></button>
|
||||
<button class="btn waves-effect darken-3 toot-btn-group blue" onclick="boostWith('unlisted')"><i class="material-icons">lock_open</i></button>
|
||||
<button class="btn waves-effect darken-3 toot-btn-group orange" onclick="boostWith('private')"><i class="material-icons">lock</i></button>
|
||||
<div id="toot-tools">
|
||||
</div>
|
||||
<div id="toot-after">
|
||||
|
@ -806,8 +815,7 @@
|
|||
<div><i class="material-icons">people_outline</i></div><span>@@local@@</span>
|
||||
</div>
|
||||
<div class="type waves-effect" data-type="local-media">
|
||||
<div><i
|
||||
class="material-icons">perm_media</i>
|
||||
<div><i class="material-icons">perm_media</i>
|
||||
</div><span>@@localMedia@@</span>
|
||||
</div>
|
||||
<div class="type waves-effect" data-type="home">
|
||||
|
@ -817,8 +825,7 @@
|
|||
<div><i class="material-icons">language</i></div><span>@@fed@@</span>
|
||||
</div>
|
||||
<div class="type waves-effect" data-type="pub-media">
|
||||
<div><i
|
||||
class="material-icons">perm_media</i></div>
|
||||
<div><i class="material-icons">perm_media</i></div>
|
||||
<span>@@fedMedia@@</span>
|
||||
</div>
|
||||
<div class="type waves-effect" data-type="dm">
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
"btedPeople":"People who boosted it",
|
||||
"useOtherAcct1":"Use other account",
|
||||
"useOtherAcct2":":unfav and unBT are disabled.",
|
||||
"btWithVis": "Boost with visibility",
|
||||
"reply":"Reply",
|
||||
"bt":"Boost",
|
||||
"favRegist":"Favourite",
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
"btedPeople":"このトゥートをブーストした人",
|
||||
"useOtherAcct1":"他のアカウントを使用",
|
||||
"useOtherAcct2":"の解除はできません",
|
||||
"btWithVis": "公開範囲を指定してブースト",
|
||||
"reply":"返信",
|
||||
"bt":"ブースト",
|
||||
"favRegist":"お気に入り",
|
||||
|
|
Loading…
Reference in New Issue
Block a user