big big chungus big chungus big chungus
This commit is contained in:
parent
28b4fecf98
commit
e410bc879c
36 changed files with 373 additions and 352 deletions
|
@ -707,10 +707,6 @@ a.btn.disabled, fieldset:disabled a.btn {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
.btn-link:disabled, .btn-link.disabled {
|
|
||||||
color: #6c757d;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.btn-lg {
|
.btn-lg {
|
||||||
padding: 0.5rem 1rem;
|
padding: 0.5rem 1rem;
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
|
@ -1055,7 +1051,7 @@ input[type=submit].btn-block, input[type=reset].btn-block, input[type=button].bt
|
||||||
.nav-link:hover, .nav-link:focus {
|
.nav-link:hover, .nav-link:focus {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.nav-link.disabled {
|
.disabled {
|
||||||
color: #6c757d;
|
color: #6c757d;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
@ -1215,9 +1211,6 @@ input[type=submit].btn-block, input[type=reset].btn-block, input[type=button].bt
|
||||||
.navbar-light .navbar-nav .nav-link:hover, .navbar-light .navbar-nav .nav-link:focus {
|
.navbar-light .navbar-nav .nav-link:hover, .navbar-light .navbar-nav .nav-link:focus {
|
||||||
color: rgba(0, 0, 0, 0.7);
|
color: rgba(0, 0, 0, 0.7);
|
||||||
}
|
}
|
||||||
.navbar-light .navbar-nav .nav-link.disabled {
|
|
||||||
color: rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
.navbar-light .navbar-toggler {
|
.navbar-light .navbar-toggler {
|
||||||
color: rgba(0, 0, 0, 0.5);
|
color: rgba(0, 0, 0, 0.5);
|
||||||
border-color: rgba(0, 0, 0, 0.1);
|
border-color: rgba(0, 0, 0, 0.1);
|
||||||
|
@ -1237,9 +1230,6 @@ input[type=submit].btn-block, input[type=reset].btn-block, input[type=button].bt
|
||||||
.navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link:focus {
|
.navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link:focus {
|
||||||
color: rgba(255, 255, 255, 0.75);
|
color: rgba(255, 255, 255, 0.75);
|
||||||
}
|
}
|
||||||
.navbar-dark .navbar-nav .nav-link.disabled {
|
|
||||||
color: rgba(255, 255, 255, 0.25);
|
|
||||||
}
|
|
||||||
.navbar-dark .navbar-nav .show > .nav-link, .navbar-dark .navbar-nav .active > .nav-link, .navbar-dark .navbar-nav .nav-link.show, .navbar-dark .navbar-nav .nav-link.active {
|
.navbar-dark .navbar-nav .show > .nav-link, .navbar-dark .navbar-nav .active > .nav-link, .navbar-dark .navbar-nav .nav-link.show, .navbar-dark .navbar-nav .nav-link.active {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
@ -1577,9 +1567,6 @@ button.close {
|
||||||
border: 0;
|
border: 0;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
}
|
}
|
||||||
a.close.disabled {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.toast {
|
.toast {
|
||||||
max-width: 350px;
|
max-width: 350px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -7,7 +7,9 @@ function post(url) {
|
||||||
xhr.send(form);
|
xhr.send(form);
|
||||||
};
|
};
|
||||||
|
|
||||||
function post_toast3(url, button1, button2) {
|
function post_toast3(t, url, button1, button2) {
|
||||||
|
t.disabled=true;
|
||||||
|
t.classList.add("disabled");
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open("POST", url);
|
xhr.open("POST", url);
|
||||||
xhr.setRequestHeader('xhr', 'xhr');
|
xhr.setRequestHeader('xhr', 'xhr');
|
||||||
|
@ -39,6 +41,10 @@ function post_toast3(url, button1, button2) {
|
||||||
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
|
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
t.disabled = false;
|
||||||
|
t.classList.remove("disabled");
|
||||||
|
}, 500);
|
||||||
};
|
};
|
||||||
|
|
||||||
xhr.send(form);
|
xhr.send(form);
|
||||||
|
@ -127,6 +133,7 @@ function delete_commentModal(id) {
|
||||||
|
|
||||||
function post_reply(id){
|
function post_reply(id){
|
||||||
const btn = document.getElementById(`save-reply-to-${id}`)
|
const btn = document.getElementById(`save-reply-to-${id}`)
|
||||||
|
btn.disabled = true;
|
||||||
btn.classList.add('disabled');
|
btn.classList.add('disabled');
|
||||||
|
|
||||||
var form = new FormData();
|
var form = new FormData();
|
||||||
|
@ -150,13 +157,17 @@ function post_reply(id){
|
||||||
catch(e) {console.log(e)}
|
catch(e) {console.log(e)}
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
||||||
}
|
}
|
||||||
btn.classList.remove('disabled');
|
setTimeout(() => {
|
||||||
|
btn.disabled = false;
|
||||||
|
btn.classList.remove('disabled');
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
xhr.send(form)
|
xhr.send(form)
|
||||||
}
|
}
|
||||||
|
|
||||||
function comment_edit(id){
|
function comment_edit(id){
|
||||||
const btn = document.getElementById(`edit-btn-${id}`)
|
const btn = document.getElementById(`edit-btn-${id}`)
|
||||||
|
btn.disabled = true
|
||||||
btn.classList.add('disabled');
|
btn.classList.add('disabled');
|
||||||
|
|
||||||
var form = new FormData();
|
var form = new FormData();
|
||||||
|
@ -183,13 +194,17 @@ function comment_edit(id){
|
||||||
catch(e) {console.log(e)}
|
catch(e) {console.log(e)}
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
||||||
}
|
}
|
||||||
btn.classList.remove('disabled');
|
setTimeout(() => {
|
||||||
|
btn.disabled = false;
|
||||||
|
btn.classList.remove('disabled');
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
xhr.send(form)
|
xhr.send(form)
|
||||||
}
|
}
|
||||||
|
|
||||||
function post_comment(fullname){
|
function post_comment(fullname){
|
||||||
const btn = document.getElementById('save-reply-to-'+fullname)
|
const btn = document.getElementById('save-reply-to-'+fullname)
|
||||||
|
btn.disabled = true
|
||||||
btn.classList.add('disabled');
|
btn.classList.add('disabled');
|
||||||
|
|
||||||
var form = new FormData();
|
var form = new FormData();
|
||||||
|
@ -217,7 +232,10 @@ function post_comment(fullname){
|
||||||
catch(e) {console.log(e)}
|
catch(e) {console.log(e)}
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
||||||
}
|
}
|
||||||
btn.classList.remove('disabled');
|
setTimeout(() => {
|
||||||
|
btn.disabled = false;
|
||||||
|
btn.classList.remove('disabled');
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
xhr.send(form)
|
xhr.send(form)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
function removeFollower(event, username) {
|
function removeFollower(event, username) {
|
||||||
post_toast('/remove_follow/' + username);
|
post_toast(event.target,'/remove_follow/' + username);
|
||||||
let table = document.getElementById("followers-table");
|
let table = document.getElementById("followers-table");
|
||||||
table.removeChild(event.target.parentElement.parentElement);
|
table.removeChild(event.target.parentElement.parentElement);
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
function removeFollowing(event, username) {
|
function removeFollowing(event, username) {
|
||||||
post_toast('/unfollow/' + username);
|
post_toast(event.target,'/unfollow/' + username);
|
||||||
let table = document.getElementById("followers-table");
|
let table = document.getElementById("followers-table");
|
||||||
table.removeChild(event.target.parentElement.parentElement);
|
table.removeChild(event.target.parentElement.parentElement);
|
||||||
}
|
}
|
|
@ -9,7 +9,9 @@ tooltipTriggerList.map(function(element){
|
||||||
return bootstrap.Tooltip.getOrCreateInstance(element);
|
return bootstrap.Tooltip.getOrCreateInstance(element);
|
||||||
});
|
});
|
||||||
|
|
||||||
function post_toast(url, reload, data) {
|
function post_toast(t, url, reload, data) {
|
||||||
|
t.disabled = true;
|
||||||
|
t.classList.add("disabled");
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open("POST", url);
|
xhr.open("POST", url);
|
||||||
xhr.setRequestHeader('xhr', 'xhr');
|
xhr.setRequestHeader('xhr', 'xhr');
|
||||||
|
@ -35,6 +37,10 @@ function post_toast(url, reload, data) {
|
||||||
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
|
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
t.disabled = false;
|
||||||
|
t.classList.remove("disabled");
|
||||||
|
}, 500);
|
||||||
};
|
};
|
||||||
|
|
||||||
xhr.send(form);
|
xhr.send(form);
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
function post_toast2(url, button1, button2) {
|
function post_toast2(t, url, button1, button2) {
|
||||||
|
t.disabled=true;
|
||||||
|
t.classList.add("disabled");
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open("POST", url);
|
xhr.open("POST", url);
|
||||||
xhr.setRequestHeader('xhr', 'xhr');
|
xhr.setRequestHeader('xhr', 'xhr');
|
||||||
|
@ -30,6 +32,10 @@ function post_toast2(url, button1, button2) {
|
||||||
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
|
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
t.disabled = false;
|
||||||
|
t.classList.remove("disabled");
|
||||||
|
}, 500);
|
||||||
};
|
};
|
||||||
|
|
||||||
xhr.send(form);
|
xhr.send(form);
|
||||||
|
|
|
@ -24,7 +24,7 @@ class Badge(Base):
|
||||||
|
|
||||||
id = Column(Integer, primary_key=True)
|
id = Column(Integer, primary_key=True)
|
||||||
user_id = Column(Integer, ForeignKey('users.id'))
|
user_id = Column(Integer, ForeignKey('users.id'))
|
||||||
badge_id = Column(Integer)
|
badge_id = Column(Integer, ForeignKey('badge_defs.id'))
|
||||||
description = Column(String)
|
description = Column(String)
|
||||||
url = Column(String)
|
url = Column(String)
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ class Comment(Base):
|
||||||
id = Column(Integer, primary_key=True)
|
id = Column(Integer, primary_key=True)
|
||||||
author_id = Column(Integer, ForeignKey("users.id"))
|
author_id = Column(Integer, ForeignKey("users.id"))
|
||||||
parent_submission = Column(Integer, ForeignKey("submissions.id"))
|
parent_submission = Column(Integer, ForeignKey("submissions.id"))
|
||||||
created_utc = Column(Integer, default=0)
|
created_utc = Column(Integer)
|
||||||
edited_utc = Column(Integer, default=0)
|
edited_utc = Column(Integer, default=0)
|
||||||
is_banned = Column(Boolean, default=False)
|
is_banned = Column(Boolean, default=False)
|
||||||
ghost = Column(Boolean)
|
ghost = Column(Boolean)
|
||||||
|
|
|
@ -12,11 +12,11 @@ class ModAction(Base):
|
||||||
id = Column(Integer, primary_key=True)
|
id = Column(Integer, primary_key=True)
|
||||||
user_id = Column(Integer, ForeignKey("users.id"))
|
user_id = Column(Integer, ForeignKey("users.id"))
|
||||||
kind = Column(String)
|
kind = Column(String)
|
||||||
target_user_id = Column(Integer, ForeignKey("users.id"), default=0)
|
target_user_id = Column(Integer, ForeignKey("users.id"))
|
||||||
target_submission_id = Column(Integer, ForeignKey("submissions.id"), default=0)
|
target_submission_id = Column(Integer, ForeignKey("submissions.id"))
|
||||||
target_comment_id = Column(Integer, ForeignKey("comments.id"), default=0)
|
target_comment_id = Column(Integer, ForeignKey("comments.id"))
|
||||||
_note=Column(String)
|
_note=Column(String)
|
||||||
created_utc = Column(Integer, default=0)
|
created_utc = Column(Integer)
|
||||||
|
|
||||||
user = relationship("User", primaryjoin="User.id==ModAction.user_id", viewonly=True)
|
user = relationship("User", primaryjoin="User.id==ModAction.user_id", viewonly=True)
|
||||||
target_user = relationship("User", primaryjoin="User.id==ModAction.target_user_id", viewonly=True)
|
target_user = relationship("User", primaryjoin="User.id==ModAction.target_user_id", viewonly=True)
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Submission(Base):
|
||||||
id = Column(Integer, primary_key=True)
|
id = Column(Integer, primary_key=True)
|
||||||
author_id = Column(Integer, ForeignKey("users.id"))
|
author_id = Column(Integer, ForeignKey("users.id"))
|
||||||
edited_utc = Column(Integer, default=0)
|
edited_utc = Column(Integer, default=0)
|
||||||
created_utc = Column(Integer, default=0)
|
created_utc = Column(Integer)
|
||||||
thumburl = Column(String)
|
thumburl = Column(String)
|
||||||
is_banned = Column(Boolean, default=False)
|
is_banned = Column(Boolean, default=False)
|
||||||
bannedfor = Column(Boolean)
|
bannedfor = Column(Boolean)
|
||||||
|
@ -412,7 +412,7 @@ class Submission(Base):
|
||||||
body += '''<span class="cost"> (cost of entry: 200 coins)</span>'''
|
body += '''<span class="cost"> (cost of entry: 200 coins)</span>'''
|
||||||
body += "</label>"
|
body += "</label>"
|
||||||
if v and v.admin_level > 2:
|
if v and v.admin_level > 2:
|
||||||
body += f'''<button class="btn btn-primary px-2 mx-2" style="font-size:10px;padding:2px;margin-top:-5px" onclick="post_toast('/distribute/{c.id}')">Declare winner</button>'''
|
body += f'''<button class="btn btn-primary px-2 mx-2" style="font-size:10px;padding:2px;margin-top:-5px" onclick="post_toast(this,'/distribute/{c.id}')">Declare winner</button>'''
|
||||||
body += "</div>"
|
body += "</div>"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ class Subscription(Base):
|
||||||
__tablename__ = "subscriptions"
|
__tablename__ = "subscriptions"
|
||||||
id = Column(Integer, primary_key=True)
|
id = Column(Integer, primary_key=True)
|
||||||
user_id = Column(Integer, ForeignKey("users.id"))
|
user_id = Column(Integer, ForeignKey("users.id"))
|
||||||
submission_id = Column(Integer, default=0)
|
submission_id = Column(Integer, ForeignKey("submissions.id"))
|
||||||
|
|
||||||
user = relationship("User", uselist=False, viewonly=True)
|
user = relationship("User", uselist=False, viewonly=True)
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ class User(Base):
|
||||||
post_count = Column(Integer, default=0)
|
post_count = Column(Integer, default=0)
|
||||||
comment_count = Column(Integer, default=0)
|
comment_count = Column(Integer, default=0)
|
||||||
received_award_count = Column(Integer, default=0)
|
received_award_count = Column(Integer, default=0)
|
||||||
created_utc = Column(Integer, default=0)
|
created_utc = Column(Integer)
|
||||||
suicide_utc = Column(Integer, default=0)
|
suicide_utc = Column(Integer, default=0)
|
||||||
rent_utc = Column(Integer, default=0)
|
rent_utc = Column(Integer, default=0)
|
||||||
steal_utc = Column(Integer, default=0)
|
steal_utc = Column(Integer, default=0)
|
||||||
|
@ -107,7 +107,7 @@ class User(Base):
|
||||||
is_banned = Column(Integer, default=0)
|
is_banned = Column(Integer, default=0)
|
||||||
unban_utc = Column(Integer, default=0)
|
unban_utc = Column(Integer, default=0)
|
||||||
ban_reason = deferred(Column(String))
|
ban_reason = deferred(Column(String))
|
||||||
club_allowed = Column(Boolean, default=False)
|
club_allowed = Column(Boolean)
|
||||||
login_nonce = Column(Integer, default=0)
|
login_nonce = Column(Integer, default=0)
|
||||||
reserved = deferred(Column(String))
|
reserved = deferred(Column(String))
|
||||||
coins = Column(Integer, default=0)
|
coins = Column(Integer, default=0)
|
||||||
|
|
|
@ -79,7 +79,6 @@ SLURS = {
|
||||||
"mohammad": "Prophet Mohammad (PBUH)",
|
"mohammad": "Prophet Mohammad (PBUH)",
|
||||||
"muhammad": "Prophet Mohammad (PBUH)",
|
"muhammad": "Prophet Mohammad (PBUH)",
|
||||||
"i hate marsey": "i love marsey",
|
"i hate marsey": "i love marsey",
|
||||||
"billie eilish": "Billie Eilish (fat cow)",
|
|
||||||
"dancing israelis": "i love Israel",
|
"dancing israelis": "i love Israel",
|
||||||
"sodomite": "total dreamboat",
|
"sodomite": "total dreamboat",
|
||||||
"pajeet": "sexy Indian dude",
|
"pajeet": "sexy Indian dude",
|
||||||
|
|
|
@ -1262,21 +1262,23 @@ def unsticky_post(post_id, v):
|
||||||
def sticky_comment(cid, v):
|
def sticky_comment(cid, v):
|
||||||
|
|
||||||
comment = get_comment(cid, v=v)
|
comment = get_comment(cid, v=v)
|
||||||
comment.is_pinned = v.username
|
|
||||||
g.db.add(comment)
|
|
||||||
|
|
||||||
ma=ModAction(
|
if not comment.is_pinned:
|
||||||
kind="pin_comment",
|
comment.is_pinned = v.username
|
||||||
user_id=v.id,
|
g.db.add(comment)
|
||||||
target_comment_id=comment.id
|
|
||||||
)
|
|
||||||
g.db.add(ma)
|
|
||||||
|
|
||||||
if v.id != comment.author_id:
|
ma=ModAction(
|
||||||
message = f"@{v.username} has pinned your [comment]({comment.permalink})!"
|
kind="pin_comment",
|
||||||
send_repeatable_notification(comment.author_id, message)
|
user_id=v.id,
|
||||||
|
target_comment_id=comment.id
|
||||||
|
)
|
||||||
|
g.db.add(ma)
|
||||||
|
|
||||||
g.db.commit()
|
if v.id != comment.author_id:
|
||||||
|
message = f"@{v.username} has pinned your [comment]({comment.permalink})!"
|
||||||
|
send_repeatable_notification(comment.author_id, message)
|
||||||
|
|
||||||
|
g.db.commit()
|
||||||
return {"message": "Comment pinned!"}
|
return {"message": "Comment pinned!"}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1286,23 +1288,24 @@ def unsticky_comment(cid, v):
|
||||||
|
|
||||||
comment = get_comment(cid, v=v)
|
comment = get_comment(cid, v=v)
|
||||||
|
|
||||||
if comment.is_pinned.endswith("(pin award)"): return {"error": "Can't unpin award pins!"}, 403
|
if comment.is_pinned:
|
||||||
|
if comment.is_pinned.endswith("(pin award)"): return {"error": "Can't unpin award pins!"}, 403
|
||||||
|
|
||||||
comment.is_pinned = None
|
comment.is_pinned = None
|
||||||
g.db.add(comment)
|
g.db.add(comment)
|
||||||
|
|
||||||
ma=ModAction(
|
ma=ModAction(
|
||||||
kind="unpin_comment",
|
kind="unpin_comment",
|
||||||
user_id=v.id,
|
user_id=v.id,
|
||||||
target_comment_id=comment.id
|
target_comment_id=comment.id
|
||||||
)
|
)
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
|
|
||||||
if v.id != comment.author_id:
|
if v.id != comment.author_id:
|
||||||
message = f"@{v.username} has unpinned your [comment]({comment.permalink})!"
|
message = f"@{v.username} has unpinned your [comment]({comment.permalink})!"
|
||||||
send_repeatable_notification(comment.author_id, message)
|
send_repeatable_notification(comment.author_id, message)
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
return {"message": "Comment unpinned!"}
|
return {"message": "Comment unpinned!"}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -873,19 +873,19 @@ def edit_comment(cid, v):
|
||||||
@auth_required
|
@auth_required
|
||||||
def delete_comment(cid, v):
|
def delete_comment(cid, v):
|
||||||
|
|
||||||
c = g.db.query(Comment).filter_by(id=cid).one_or_none()
|
comment = get_comment(cid, v=v)
|
||||||
|
|
||||||
if not c: abort(404)
|
if not comment.deleted_utc:
|
||||||
|
|
||||||
if c.author_id != v.id: abort(403)
|
if c.author_id != v.id: abort(403)
|
||||||
|
|
||||||
c.deleted_utc = int(time.time())
|
c.deleted_utc = int(time.time())
|
||||||
|
|
||||||
g.db.add(c)
|
g.db.add(c)
|
||||||
|
|
||||||
cache.delete_memoized(comment_idlist)
|
cache.delete_memoized(comment_idlist)
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
return {"message": "Comment deleted!"}
|
return {"message": "Comment deleted!"}
|
||||||
|
|
||||||
|
@ -894,20 +894,18 @@ def delete_comment(cid, v):
|
||||||
@auth_required
|
@auth_required
|
||||||
def undelete_comment(cid, v):
|
def undelete_comment(cid, v):
|
||||||
|
|
||||||
c = g.db.query(Comment).filter_by(id=cid).one_or_none()
|
comment = get_comment(cid, v=v)
|
||||||
|
|
||||||
if not c: abort(404)
|
if comment.deleted_utc:
|
||||||
|
if c.author_id != v.id: abort(403)
|
||||||
|
|
||||||
if c.author_id != v.id:
|
c.deleted_utc = 0
|
||||||
abort(403)
|
|
||||||
|
|
||||||
c.deleted_utc = 0
|
g.db.add(c)
|
||||||
|
|
||||||
g.db.add(c)
|
cache.delete_memoized(comment_idlist)
|
||||||
|
|
||||||
cache.delete_memoized(comment_idlist)
|
g.db.commit()
|
||||||
|
|
||||||
g.db.commit()
|
|
||||||
|
|
||||||
return {"message": "Comment undeleted!"}
|
return {"message": "Comment undeleted!"}
|
||||||
|
|
||||||
|
@ -918,19 +916,18 @@ def pin_comment(cid, v):
|
||||||
|
|
||||||
comment = get_comment(cid, v=v)
|
comment = get_comment(cid, v=v)
|
||||||
|
|
||||||
if not comment: abort(404)
|
if not comment.is_pinned:
|
||||||
|
if v.id != comment.post.author_id: abort(403)
|
||||||
|
|
||||||
|
comment.is_pinned = v.username + " (OP)"
|
||||||
|
|
||||||
if v.id != comment.post.author_id: abort(403)
|
g.db.add(comment)
|
||||||
|
|
||||||
comment.is_pinned = v.username + " (OP)"
|
|
||||||
|
|
||||||
g.db.add(comment)
|
if v.id != comment.author_id:
|
||||||
|
message = f"@{v.username} (OP) has pinned your [comment]({comment.permalink})!"
|
||||||
|
send_repeatable_notification(comment.author_id, message)
|
||||||
|
|
||||||
if v.id != comment.author_id:
|
g.db.commit()
|
||||||
message = f"@{v.username} (OP) has pinned your [comment]({comment.permalink})!"
|
|
||||||
send_repeatable_notification(comment.author_id, message)
|
|
||||||
|
|
||||||
g.db.commit()
|
|
||||||
return {"message": "Comment pinned!"}
|
return {"message": "Comment pinned!"}
|
||||||
|
|
||||||
|
|
||||||
|
@ -940,20 +937,19 @@ def unpin_comment(cid, v):
|
||||||
|
|
||||||
comment = get_comment(cid, v=v)
|
comment = get_comment(cid, v=v)
|
||||||
|
|
||||||
if not comment: abort(404)
|
if comment.is_pinned:
|
||||||
|
if v.id != comment.post.author_id: abort(403)
|
||||||
|
|
||||||
if v.id != comment.post.author_id: abort(403)
|
if not comment.is_pinned.endswith(" (OP)"):
|
||||||
|
return {"error": "You can only unpin comments you have pinned!"}
|
||||||
|
|
||||||
if not comment.is_pinned.endswith(" (OP)"):
|
comment.is_pinned = None
|
||||||
return {"error": "You can only unpin comments you have pinned!"}
|
g.db.add(comment)
|
||||||
|
|
||||||
comment.is_pinned = None
|
if v.id != comment.author_id:
|
||||||
g.db.add(comment)
|
message = f"@{v.username} (OP) has unpinned your [comment]({comment.permalink})!"
|
||||||
|
send_repeatable_notification(comment.author_id, message)
|
||||||
if v.id != comment.author_id:
|
g.db.commit()
|
||||||
message = f"@{v.username} (OP) has unpinned your [comment]({comment.permalink})!"
|
|
||||||
send_repeatable_notification(comment.author_id, message)
|
|
||||||
g.db.commit()
|
|
||||||
return {"message": "Comment unpinned!"}
|
return {"message": "Comment unpinned!"}
|
||||||
|
|
||||||
|
|
||||||
|
@ -963,39 +959,37 @@ def mod_pin(cid, v):
|
||||||
|
|
||||||
comment = get_comment(cid, v=v)
|
comment = get_comment(cid, v=v)
|
||||||
|
|
||||||
if not comment: abort(404)
|
if not comment.is_pinned:
|
||||||
|
if not (comment.post.sub and v.mods(comment.post.sub)): abort(403)
|
||||||
|
|
||||||
|
comment.is_pinned = v.username + " (Mod)"
|
||||||
|
|
||||||
if not (comment.post.sub and v.mods(comment.post.sub)): abort(403)
|
g.db.add(comment)
|
||||||
|
|
||||||
comment.is_pinned = v.username + " (Mod)"
|
|
||||||
|
|
||||||
g.db.add(comment)
|
if v.id != comment.author_id:
|
||||||
|
message = f"@{v.username} (Mod) has pinned your [comment]({comment.permalink})!"
|
||||||
|
send_repeatable_notification(comment.author_id, message)
|
||||||
|
|
||||||
if v.id != comment.author_id:
|
g.db.commit()
|
||||||
message = f"@{v.username} (Mod) has pinned your [comment]({comment.permalink})!"
|
|
||||||
send_repeatable_notification(comment.author_id, message)
|
|
||||||
|
|
||||||
g.db.commit()
|
|
||||||
return {"message": "Comment pinned!"}
|
return {"message": "Comment pinned!"}
|
||||||
|
|
||||||
|
|
||||||
@app.post("/mod_unpin/<cid>")
|
@app.post("/unmod_pin/<cid>")
|
||||||
@auth_required
|
@auth_required
|
||||||
def mod_unpin(cid, v):
|
def mod_unpin(cid, v):
|
||||||
|
|
||||||
comment = get_comment(cid, v=v)
|
comment = get_comment(cid, v=v)
|
||||||
|
|
||||||
if not comment: abort(404)
|
if comment.is_pinned:
|
||||||
|
if not (comment.post.sub and v.mods(comment.post.sub)): abort(403)
|
||||||
|
|
||||||
if not (comment.post.sub and v.mods(comment.post.sub)): abort(403)
|
comment.is_pinned = None
|
||||||
|
g.db.add(comment)
|
||||||
|
|
||||||
comment.is_pinned = None
|
if v.id != comment.author_id:
|
||||||
g.db.add(comment)
|
message = f"@{v.username} (Mod) has unpinned your [comment]({comment.permalink})!"
|
||||||
|
send_repeatable_notification(comment.author_id, message)
|
||||||
if v.id != comment.author_id:
|
g.db.commit()
|
||||||
message = f"@{v.username} (Mod) has unpinned your [comment]({comment.permalink})!"
|
|
||||||
send_repeatable_notification(comment.author_id, message)
|
|
||||||
g.db.commit()
|
|
||||||
return {"message": "Comment unpinned!"}
|
return {"message": "Comment unpinned!"}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1040,10 +1034,8 @@ def handle_blackjack_action(cid, v):
|
||||||
action = request.values.get("action", "")
|
action = request.values.get("action", "")
|
||||||
blackjack = Blackjack(g)
|
blackjack = Blackjack(g)
|
||||||
|
|
||||||
if action == 'hit':
|
if action == 'hit': blackjack.player_hit(comment)
|
||||||
blackjack.player_hit(comment)
|
elif action == 'stay': blackjack.player_stayed(comment)
|
||||||
elif action == 'stay':
|
|
||||||
blackjack.player_stayed(comment)
|
|
||||||
|
|
||||||
g.db.add(comment)
|
g.db.add(comment)
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
|
@ -59,16 +59,16 @@
|
||||||
|
|
||||||
{% if v.admin_level > 2 %}
|
{% if v.admin_level > 2 %}
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="disable_signups" name="disable_signups" {% if x == "yes" %}checked{% endif %} onchange="post_toast('/admin/disable_signups');">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="disable_signups" name="disable_signups" {% if x == "yes" %}checked{% endif %} onchange="post_toast(this,'/admin/disable_signups');">
|
||||||
<label class="custom-control-label" for="disable_signups">Disable signups</label>
|
<label class="custom-control-label" for="disable_signups">Disable signups</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="under_attack" name="under_attack" {% if x2 %}checked{% endif %} onchange="post_toast('/admin/under_attack');">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="under_attack" name="under_attack" {% if x2 %}checked{% endif %} onchange="post_toast(this,'/admin/under_attack');">
|
||||||
<label class="custom-control-label" for="under_attack">Under attack mode</label>
|
<label class="custom-control-label" for="under_attack">Under attack mode</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="btn btn-primary mt-3" onclick="post_toast('/admin/purge_cache');">PURGE CACHE</button>
|
<button class="btn btn-primary mt-3" onclick="post_toast(this,'/admin/purge_cache');">PURGE CACHE</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -34,12 +34,12 @@
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% if not app.client_id%}
|
{% if not app.client_id%}
|
||||||
|
|
||||||
<a role="button" class="btn btn-primary ml-auto" onclick="post_toast('/admin/app/approve/{{app.id}}')">Approve</a>
|
<a role="button" class="btn btn-primary ml-auto" onclick="post_toast(this,'/admin/app/approve/{{app.id}}')">Approve</a>
|
||||||
<a role="button" class="btn btn-secondary mr-0" onclick="post_toast('/admin/app/reject/{{app.id}}')">Reject</a>
|
<a role="button" class="btn btn-secondary mr-0" onclick="post_toast(this,'/admin/app/reject/{{app.id}}')">Reject</a>
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
<a role="button" class="btn btn-primary ml-auto" onclick="post_toast('/admin/app/revoke/{{app.id}}')">Revoke</a>
|
<a role="button" class="btn btn-primary ml-auto" onclick="post_toast(this,'/admin/app/revoke/{{app.id}}')">Revoke</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -39,12 +39,12 @@
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% if not app.client_id %}
|
{% if not app.client_id %}
|
||||||
|
|
||||||
<a role="button" class="btn btn-primary ml-auto" onclick="post_toast('/admin/app/approve/{{app.id}}')">Approve</a>
|
<a role="button" class="btn btn-primary ml-auto" onclick="post_toast(this,'/admin/app/approve/{{app.id}}')">Approve</a>
|
||||||
<a role="button" class="btn btn-secondary mr-0" onclick="post_toast('/admin/app/reject/{{app.id}}')">Reject</a>
|
<a role="button" class="btn btn-secondary mr-0" onclick="post_toast(this,'/admin/app/reject/{{app.id}}')">Reject</a>
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
<a role="button" class="btn btn-primary ml-auto" onclick="post_toast('/admin/app/revoke/{{app.id}}')">Revoke</a>
|
<a role="button" class="btn btn-primary ml-auto" onclick="post_toast(this,'/admin/app/revoke/{{app.id}}')">Revoke</a>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -64,6 +64,6 @@
|
||||||
|
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
{% if SITE_NAME != 'Drama' or v.id == AEVANN_ID %}
|
{% if SITE_NAME != 'Drama' or v.id == AEVANN_ID %}
|
||||||
<div><a class="btn btn-danger" role="button" onclick="post_toast('/admin/monthly')">Grant Monthly Marseybux</a></div>
|
<div><a class="btn btn-danger" role="button" onclick="post_toast(this,'/admin/monthly')">Grant Monthly Marseybux</a></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -67,8 +67,8 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<a id="subscribe" class="{% if v.changelogsub %}d-none{% endif %} btn btn-primary followbutton " role="button" onclick="post_toast2('/changelogsub','subscribe','unsubscribe')">Subscribe</a>
|
<a id="subscribe" class="{% if v.changelogsub %}d-none{% endif %} btn btn-primary followbutton " role="button" onclick="post_toast2(this, '/changelogsub','subscribe','unsubscribe')">Subscribe</a>
|
||||||
<a id="unsubscribe" class="{% if not v.changelogsub %}d-none{% endif %} btn btn-primary followbutton " role="button" onclick="post_toast2('/changelogsub','subscribe','unsubscribe')">Unsubscribe</a>
|
<a id="unsubscribe" class="{% if not v.changelogsub %}d-none{% endif %} btn btn-primary followbutton " role="button" onclick="post_toast2(this, '/changelogsub','subscribe','unsubscribe')">Unsubscribe</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row no-gutters {% if listing %}mt-md-3{% elif not listing %}my-md-3{% endif %}">
|
<div class="row no-gutters {% if listing %}mt-md-3{% elif not listing %}my-md-3{% endif %}">
|
||||||
|
@ -104,6 +104,6 @@
|
||||||
</nav>
|
</nav>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="/static/assets/js/post_toast2.js?a=240"></script>
|
<script src="/static/assets/js/post_toast2.js?a=241"></script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -286,7 +286,7 @@
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
<ul style="padding-left:20px; margin-bottom: 0;">
|
<ul style="padding-left:20px; margin-bottom: 0;">
|
||||||
{% for f in c.flags %}
|
{% for f in c.flags %}
|
||||||
<li><a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>{% if f.reason %}: {{f.realreason(v) | safe}}{% endif %} {% if v and v.admin_level > 1 %}<a role="button" onclick="post_toast('/del_report/c{{f.id}}')">[remove]</a>{% endif %}</li>
|
<li><a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>{% if f.reason %}: {{f.realreason(v) | safe}}{% endif %} {% if v and v.admin_level > 1 %}<a role="button" onclick="post_toast(this,'/del_report/c{{f.id}}')">[remove]</a>{% endif %}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -461,9 +461,9 @@
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<button class="btn caction py-0 nobackground px-1 text-muted" role="button" data-bs-toggle="modal" data-bs-target="#awardModal" onclick="awardModal('/comment/{{c.id}}/awards')"><i class="fas fa-gift" aria-hidden="true"></i>Give Award</button>
|
<button class="btn caction py-0 nobackground px-1 text-muted" role="button" data-bs-toggle="modal" data-bs-target="#awardModal" onclick="awardModal('/comment/{{c.id}}/awards')"><i class="fas fa-gift" aria-hidden="true"></i>Give Award</button>
|
||||||
|
|
||||||
<button id="unsave-{{c.id}}" class="btn {% if c.id in v.saved_comment_idlist() %}d-md-inline-block{% endif %} text-muted d-none" role="button" onclick="post_toast3('/unsave_comment/{{c.id}}','save-{{c.id}}','unsave-{{c.id}}')"><i class="fas fa-save"></i>Unsave</button>
|
<button id="unsave-{{c.id}}" class="btn {% if c.id in v.saved_comment_idlist() %}d-md-inline-block{% endif %} text-muted d-none" role="button" onclick="post_toast3(this,'/unsave_comment/{{c.id}}','save-{{c.id}}','unsave-{{c.id}}')"><i class="fas fa-save"></i>Unsave</button>
|
||||||
|
|
||||||
<button id="save-{{c.id}}" class="btn caction py-0 nobackground px-1 {% if c.id not in v.saved_comment_idlist() %}d-md-inline-block{% endif %} text-muted d-none" role="button" onclick="post_toast3('/save_comment/{{c.id}}','save-{{c.id}}','unsave-{{c.id}}')"><i class="fas fa-save"></i>Save</button>
|
<button id="save-{{c.id}}" class="btn caction py-0 nobackground px-1 {% if c.id not in v.saved_comment_idlist() %}d-md-inline-block{% endif %} text-muted d-none" role="button" onclick="post_toast3(this,'/save_comment/{{c.id}}','save-{{c.id}}','unsave-{{c.id}}')"><i class="fas fa-save"></i>Save</button>
|
||||||
|
|
||||||
<button class="btn caction py-0 nobackground px-1 text-muted" role="button" onclick="openReplyBox('reply-to-{{c.id}}')"><i class="fas fa-reply" aria-hidden="true"></i>Reply</button>
|
<button class="btn caction py-0 nobackground px-1 text-muted" role="button" onclick="openReplyBox('reply-to-{{c.id}}')"><i class="fas fa-reply" aria-hidden="true"></i>Reply</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -481,7 +481,7 @@
|
||||||
<button class="btn caction py-0 nobackground px-1 text-muted" onclick="toggleEdit('{{c.id}}')"><i class="fas fa-edit fa-fw"></i>Edit</button>
|
<button class="btn caction py-0 nobackground px-1 text-muted" onclick="toggleEdit('{{c.id}}')"><i class="fas fa-edit fa-fw"></i>Edit</button>
|
||||||
|
|
||||||
{% if c.deleted_utc %}
|
{% if c.deleted_utc %}
|
||||||
<button class="btn caction py-0 nobackground px-1 text-muted" onclick="post_toast('/undelete/comment/{{c.id}}')"><i class="fas fa-trash-alt fa-fw"></i>Undelete</button>
|
<button class="btn caction py-0 nobackground px-1 text-muted" onclick="post_toast(this,'/undelete/comment/{{c.id}}')"><i class="fas fa-trash-alt fa-fw"></i>Undelete</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
<button class="btn caction py-0 nobackground px-1 text-muted" data-bs-toggle="modal" data-bs-target="#deleteCommentModal" onclick="delete_commentModal('{{c.id}}')"><i class="fas fa-trash-alt fa-fw"></i>Delete</button>
|
<button class="btn caction py-0 nobackground px-1 text-muted" data-bs-toggle="modal" data-bs-target="#deleteCommentModal" onclick="delete_commentModal('{{c.id}}')"><i class="fas fa-trash-alt fa-fw"></i>Delete</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -491,27 +491,33 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.admin_level and v.id==c.author_id %}
|
{% if v and v.admin_level and v.id==c.author_id %}
|
||||||
<button id="undistinguish-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if c.distinguish_level %}d-md-inline-block{% endif %} text-info" onclick="post_toast3('/distinguish_comment/{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','no')"><i class="fas fa-id-badge text-info fa-fw"></i>Undistinguish</button>
|
<button id="undistinguish-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if c.distinguish_level %}d-md-inline-block{% endif %} text-info" onclick="post_toast3(this,'/distinguish_comment/{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','no')"><i class="fas fa-id-badge text-info fa-fw"></i>Undistinguish</button>
|
||||||
<button id="distinguish-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if not c.distinguish_level %}d-md-inline-block{% endif %} text-info" onclick="post_toast3('/distinguish_comment/{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','yes')"><i class="fas fa-id-badge text-info fa-fw"></i>Distinguish</button>
|
<button id="distinguish-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if not c.distinguish_level %}d-md-inline-block{% endif %} text-info" onclick="post_toast3(this,'/distinguish_comment/{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','yes')"><i class="fas fa-id-badge text-info fa-fw"></i>Distinguish</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.id != c.author_id and not c.ghost %}
|
{% if v and v.id != c.author_id and not c.ghost %}
|
||||||
<button id="unblock-{{c.id}}" class="nobackground text-success {% if c.is_blocking %}d-md-inline-block{% endif %} d-none" onclick="post_toast3('/settings/unblock?username={{c.author_name}}','block-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye-slash fa-fw text-success"></i>Unblock user</button>
|
<button id="unblock-{{c.id}}" class="nobackground text-success {% if c.is_blocking %}d-md-inline-block{% endif %} d-none" onclick="post_toast3(this,'/settings/unblock?username={{c.author_name}}','block-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye-slash fa-fw text-success"></i>Unblock user</button>
|
||||||
|
|
||||||
<button id="prompt-{{c.id}}" class="blockuser d-none text-danger nobackground" onclick="post_toast3('/settings/block?username={{c.author_name}}','prompt-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye-slash fa-fw text-danger"></i>Are you sure?</button>
|
<button id="prompt-{{c.id}}" class="blockuser d-none text-danger nobackground" onclick="post_toast3(this,'/settings/block?username={{c.author_name}}','prompt-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye-slash fa-fw text-danger"></i>Are you sure?</button>
|
||||||
|
|
||||||
<button id="block-{{c.id}}" class="btn caction py-0 nobackground px-1 {% if not c.is_blocking %}d-md-inline-block{% endif %} d-none text-danger" onclick="document.getElementById('block-{{c.id}}').classList.toggle('d-md-inline-block');document.getElementById('prompt-{{c.id}}').classList.toggle('d-md-inline-block');"><i class="fas fa-eye-slash fa-fw text-danger"></i>Block user</button>
|
<button id="block-{{c.id}}" class="btn caction py-0 nobackground px-1 {% if not c.is_blocking %}d-md-inline-block{% endif %} d-none text-danger" onclick="document.getElementById('block-{{c.id}}').classList.toggle('d-md-inline-block');document.getElementById('prompt-{{c.id}}').classList.toggle('d-md-inline-block');"><i class="fas fa-eye-slash fa-fw text-danger"></i>Block user</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and c.post %}
|
{% if v and c.post %}
|
||||||
|
{% set url = "" %}
|
||||||
|
|
||||||
{% if v.admin_level > 1%}
|
{% if v.admin_level > 1%}
|
||||||
<button id="unpin-{{c.id}}" class="btn caction py-0 nobackground {% if c.is_pinned %}d-md-inline-block{% endif %} text-muted d-none text-info" data-bs-dismiss="modal" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast3('/unsticky_comment/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Unpin</button>
|
{% set url = "sticky_comment" %}
|
||||||
|
{% elif v.id == c.post.author_id %}
|
||||||
<button id="pin-{{c.id}}" class="btn caction py-0 nobackground px-1 {% if not c.is_pinned %}d-md-inline-block{% endif %} text-muted d-none text-info" data-bs-dismiss="modal" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast3('/sticky_comment/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Pin</button>
|
{% set url = "pin_comment" %}
|
||||||
{% elif v.id == c.post.author_id or c.post.sub and v.mods(c.post.sub) %}
|
{% elif c.post.sub and v.mods(c.post.sub) %}
|
||||||
<button id="unpin-{{c.id}}" class="btn caction py-0 nobackground {% if c.is_pinned %}d-md-inline-block{% endif %} text-muted d-none text-info" data-bs-dismiss="modal" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast3('/mod_unpin/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Unpin</button>
|
{% set url = "mod_pin" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if url != "" %}
|
||||||
|
<button id="unpin-{{c.id}}" class="btn caction py-0 nobackground {% if c.is_pinned %}d-md-inline-block{% endif %} text-muted d-none text-info" data-bs-dismiss="modal" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast3(this,'/un{{url}}/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Unpin</button>
|
||||||
|
|
||||||
<button id="pin-{{c.id}}" class="btn caction py-0 nobackground px-1 {% if not c.is_pinned %}d-md-inline-block{% endif %} text-muted d-none text-info" data-bs-dismiss="modal" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast3('/mod_pin/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Pin</button>
|
<button id="pin-{{c.id}}" class="btn caction py-0 nobackground px-1 {% if not c.is_pinned %}d-md-inline-block{% endif %} text-muted d-none text-info" data-bs-dismiss="modal" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast3(this,'/{{url}}/{{c.id}}','pin-{{c.id}}','unpin-{{c.id}}')"><i class="fas fa-thumbtack fa-rotate--45 text-info fa-fw"></i>Pin</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -527,12 +533,12 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and c.parent_submission and (c.author_id==v.id or v.admin_level > 1) %}
|
{% if v and c.parent_submission and (c.author_id==v.id or v.admin_level > 1) %}
|
||||||
<button id="unmark-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if c.over_18 %}d-md-inline-block{% endif %} text-danger" onclick="post_toast3('/toggle_comment_nsfw/{{c.id}}','mark-{{c.id}}','unmark-{{c.id}}')"><i class="fas fa-eye-evil text-danger fa-fw"></i>Unmark +18</button>
|
<button id="unmark-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if c.over_18 %}d-md-inline-block{% endif %} text-danger" onclick="post_toast3(this,'/toggle_comment_nsfw/{{c.id}}','mark-{{c.id}}','unmark-{{c.id}}')"><i class="fas fa-eye-evil text-danger fa-fw"></i>Unmark +18</button>
|
||||||
<button id="mark-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if not c.over_18 %}d-md-inline-block{% endif %} text-danger" onclick="post_toast3('/toggle_comment_nsfw/{{c.id}}','mark-{{c.id}}','unmark-{{c.id}}')"><i class="fas fa-eye-evil text-danger fa-fw"></i>Mark +18</button>
|
<button id="mark-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if not c.over_18 %}d-md-inline-block{% endif %} text-danger" onclick="post_toast3(this,'/toggle_comment_nsfw/{{c.id}}','mark-{{c.id}}','unmark-{{c.id}}')"><i class="fas fa-eye-evil text-danger fa-fw"></i>Mark +18</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.admin_level > 1 and v.id != c.author_id %}
|
{% if v and v.admin_level > 1 and v.id != c.author_id %}
|
||||||
<button id="unban-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if c.author.is_suspended %}d-md-inline-block{% endif %} text-success" id="unexile-comment-{{c.id}}" onclick="post_toast3('/unban_user/{{c.author_id}}','ban-{{c.id}}','unban-{{c.id}}')"><i class="fas fa-user-slash text-success fa-fw"></i>Unban user</button>
|
<button id="unban-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if c.author.is_suspended %}d-md-inline-block{% endif %} text-success" id="unexile-comment-{{c.id}}" onclick="post_toast3(this,'/unban_user/{{c.author_id}}','ban-{{c.id}}','unban-{{c.id}}')"><i class="fas fa-user-slash text-success fa-fw"></i>Unban user</button>
|
||||||
<button id="ban-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if not c.author.is_suspended %}d-md-inline-block{% endif %} text-danger" id="exile-comment-{{c.id}}" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/comment/{{c.id}}', '{{c.author.id}}', '{{c.author_name}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</button>
|
<button id="ban-{{c.id}}" class="btn caction py-0 nobackground px-1 d-none {% if not c.author.is_suspended %}d-md-inline-block{% endif %} text-danger" id="exile-comment-{{c.id}}" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/comment/{{c.id}}', '{{c.author.id}}', '{{c.author_name}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -649,26 +655,26 @@
|
||||||
|
|
||||||
<a class="list-group-item" role="button" data-bs-toggle="modal" data-bs-target="#awardModal" onclick="awardModal('/comment/{{c.id}}/awards')"><i class="fas fa-gift" aria-hidden="true"></i>Give Award</a>
|
<a class="list-group-item" role="button" data-bs-toggle="modal" data-bs-target="#awardModal" onclick="awardModal('/comment/{{c.id}}/awards')"><i class="fas fa-gift" aria-hidden="true"></i>Give Award</a>
|
||||||
|
|
||||||
<a id="save2-{{c.id}}" class="list-group-item {% if c.id in v.saved_comment_idlist() %}d-none{% endif %}" role="button" data-bs-dismiss="modal" onclick="post_toast2('/save_comment/{{c.id}}','save2-{{c.id}}','unsave2-{{c.id}}')"><i class="fas fa-save"></i>Save</a>
|
<a id="save2-{{c.id}}" class="list-group-item {% if c.id in v.saved_comment_idlist() %}d-none{% endif %}" role="button" data-bs-dismiss="modal" onclick="post_toast2(this,'/save_comment/{{c.id}}','save2-{{c.id}}','unsave2-{{c.id}}')"><i class="fas fa-save"></i>Save</a>
|
||||||
|
|
||||||
<a id="unsave2-{{c.id}}" class="list-group-item {% if c.id not in v.saved_comment_idlist() %}d-none{% endif %}" role="button" onclick="post_toast2('/unsave_comment/{{c.id}}','save2-{{c.id}}','unsave2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-save"></i>Unsave</a>
|
<a id="unsave2-{{c.id}}" class="list-group-item {% if c.id not in v.saved_comment_idlist() %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/unsave_comment/{{c.id}}','save2-{{c.id}}','unsave2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-save"></i>Unsave</a>
|
||||||
|
|
||||||
{% if c.author_id == v.id %}
|
{% if c.author_id == v.id %}
|
||||||
<a role="button" data-bs-dismiss="modal" onclick="toggleEdit('{{c.id}}')" class="list-group-item"><i class="fas fa-edit"></i>Edit</a>
|
<a role="button" data-bs-dismiss="modal" onclick="toggleEdit('{{c.id}}')" class="list-group-item"><i class="fas fa-edit"></i>Edit</a>
|
||||||
|
|
||||||
{% if v.admin_level == 1 %}
|
{% if v.admin_level == 1 %}
|
||||||
<a id="distinguish2-{{c.id}}" class="list-group-item {% if c.distinguish_level %}d-none{% endif %} text-info" role="button" onclick="post_toast2('/distinguish_comment/{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-id-badge text-info"></i>Distinguish</a>
|
<a id="distinguish2-{{c.id}}" class="list-group-item {% if c.distinguish_level %}d-none{% endif %} text-info" role="button" onclick="post_toast2(this,'/distinguish_comment/{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-id-badge text-info"></i>Distinguish</a>
|
||||||
<a id="undistinguish2-{{c.id}}" class="list-group-item {% if not c.distinguish_level %}d-none{% endif %} text-info" role="button" onclick="post_toast2('/distinguish_comment/{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-id-badge text-info"></i>Undistinguish</a>
|
<a id="undistinguish2-{{c.id}}" class="list-group-item {% if not c.distinguish_level %}d-none{% endif %} text-info" role="button" onclick="post_toast2(this,'/distinguish_comment/{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-id-badge text-info"></i>Undistinguish</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if c.deleted_utc %}
|
{% if c.deleted_utc %}
|
||||||
<a role="button" onclick="post_toast('/undelete/comment/{{c.id}}')" data-bs-dismiss="modal" class="list-group-item"><i class="fas fa-trash-alt"></i>Undelete</a>
|
<a role="button" onclick="post_toast(this,'/undelete/comment/{{c.id}}')" data-bs-dismiss="modal" class="list-group-item"><i class="fas fa-trash-alt"></i>Undelete</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a role="button" data-bs-toggle="modal" data-bs-target="#deleteCommentModal" onclick="delete_commentModal('{{c.id}}')" class="list-group-item"><i class="fas fa-trash-alt"></i>Delete</a>
|
<a role="button" data-bs-toggle="modal" data-bs-target="#deleteCommentModal" onclick="delete_commentModal('{{c.id}}')" class="list-group-item"><i class="fas fa-trash-alt"></i>Delete</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<a id="mark2-{{c.id}}" class="{% if c.over_18 %}d-none{% endif %} list-group-item text-danger" role="button" onclick="post_toast2('/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-evil text-danger"></i>Mark +18</a>
|
<a id="mark2-{{c.id}}" class="{% if c.over_18 %}d-none{% endif %} list-group-item text-danger" role="button" onclick="post_toast2(this,'/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-evil text-danger"></i>Mark +18</a>
|
||||||
<a id="unmark2-{{c.id}}" class="{% if not c.over_18 %}d-none{% endif %} list-group-item text-danger" role="button" onclick="post_toast2('/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-evil text-danger"></i>Unmark +18</a>
|
<a id="unmark2-{{c.id}}" class="{% if not c.over_18 %}d-none{% endif %} list-group-item text-danger" role="button" onclick="post_toast2(this,'/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-evil text-danger"></i>Unmark +18</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if c.body %}
|
{% if c.body %}
|
||||||
<a id="view-{{c.id}}" role="button" data-bs-dismiss="modal" onclick="expandMarkdown('{{c.id}}')" class="list-group-item"><i class="fas text-expand-icon-{{c.id}} fa-expand-alt"></i>View source</a>
|
<a id="view-{{c.id}}" role="button" data-bs-dismiss="modal" onclick="expandMarkdown('{{c.id}}')" class="list-group-item"><i class="fas text-expand-icon-{{c.id}} fa-expand-alt"></i>View source</a>
|
||||||
|
@ -676,16 +682,20 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if not c.ghost %}
|
{% if not c.ghost %}
|
||||||
<a id="unblock2-{{c.id}}" data-bs-dismiss="modal" class="text-success list-group-item {% if not c.is_blocking %}d-none{% endif %}" role="button" onclick="post_toast2('/settings/unblock?username={{c.author_name}}','block2-{{c.id}}','unblock2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash text-success"></i>Unblock user</a>
|
<a id="unblock2-{{c.id}}" data-bs-dismiss="modal" class="text-success list-group-item {% if not c.is_blocking %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/settings/unblock?username={{c.author_name}}','block2-{{c.id}}','unblock2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash text-success"></i>Unblock user</a>
|
||||||
<a id="prompt2-{{c.id}}" data-bs-dismiss="modal" class="blockuser list-group-item d-none text-danger" role="button" onclick="post_toast2('/settings/block?username={{c.author_name}}','prompt2-{{c.id}}','unblock2-{{c.id}}')"><i class="fas fa-eye-slash fa-fw text-danger"></i>Are you sure?</a>
|
<a id="prompt2-{{c.id}}" data-bs-dismiss="modal" class="blockuser list-group-item d-none text-danger" role="button" onclick="post_toast2(this,'/settings/block?username={{c.author_name}}','prompt2-{{c.id}}','unblock2-{{c.id}}')"><i class="fas fa-eye-slash fa-fw text-danger"></i>Are you sure?</a>
|
||||||
<a id="block2-{{c.id}}" class="{% if c.is_blocking %}d-none{% endif %} list-group-item text-danger" role="button" onclick="document.getElementById('block2-{{c.id}}').classList.toggle('d-none');document.getElementById('prompt2-{{c.id}}').classList.toggle('d-none');"><i class="fas fa-eye-slash fa-fw text-danger"></i>Block user</a>
|
<a id="block2-{{c.id}}" class="{% if c.is_blocking %}d-none{% endif %} list-group-item text-danger" role="button" onclick="document.getElementById('block2-{{c.id}}').classList.toggle('d-none');document.getElementById('prompt2-{{c.id}}').classList.toggle('d-none');"><i class="fas fa-eye-slash fa-fw text-danger"></i>Block user</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if v.admin_level < 2 %}
|
||||||
{% if c.post and v.id == c.post.author_id and v.admin_level < 2 or c.post.sub and v.mods(c.post.sub) %}
|
{% if c.post and v.id == c.post.author_id %}
|
||||||
<a id="pin2-{{c.id}}" class="list-group-item {% if c.is_pinned %}d-none{% endif %} text-info" role="button" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast2('/mod_pin/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-info"></i>Pin</a>
|
<a id="pin2-{{c.id}}" class="list-group-item {% if c.is_pinned %}d-none{% endif %} text-info" role="button" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast2(this,'/pin_comment/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-info"></i>Pin</a>
|
||||||
<a id="unpin2-{{c.id}}" class="list-group-item {% if not c.is_pinned %}d-none{% endif %} text-info" role="button" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast2('/mod_unpin/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-info"></i>Unpin</a>
|
<a id="unpin2-{{c.id}}" class="list-group-item {% if not c.is_pinned %}d-none{% endif %} text-info" role="button" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast2(this,'/unpin_comment/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-info"></i>Unpin</a>
|
||||||
|
{% elif c.post.sub and v.mods(c.post.sub) %}
|
||||||
|
<a id="pin2-{{c.id}}" class="list-group-item {% if c.is_pinned %}d-none{% endif %} text-info" role="button" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast2(this,'/mod_pin/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-info"></i>Pin</a>
|
||||||
|
<a id="unpin2-{{c.id}}" class="list-group-item {% if not c.is_pinned %}d-none{% endif %} text-info" role="button" data-bs-target="#actionsModal-{{c.id}}" onclick="post_toast2(this,'/mod_unpin/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-info"></i>Unpin</a>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -713,20 +723,20 @@
|
||||||
<ul class="list-group comment-actions">
|
<ul class="list-group comment-actions">
|
||||||
{% if c.parent_submission %}
|
{% if c.parent_submission %}
|
||||||
{% if v.id == c.author_id %}
|
{% if v.id == c.author_id %}
|
||||||
<a id="distinguish2-{{c.id}}" class="list-group-item {% if c.distinguish_level %}d-none{% endif %} text-info" role="button" onclick="post_toast2('/distinguish_comment/{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-id-badge text-info"></i>Distinguish</a>
|
<a id="distinguish2-{{c.id}}" class="list-group-item {% if c.distinguish_level %}d-none{% endif %} text-info" role="button" onclick="post_toast2(this,'/distinguish_comment/{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-id-badge text-info"></i>Distinguish</a>
|
||||||
<a id="undistinguish2-{{c.id}}" class="list-group-item {% if not c.distinguish_level %}d-none{% endif %} text-info" role="button" onclick="post_toast2('/distinguish_comment/{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-id-badge text-info"></i>Undistinguish</a>
|
<a id="undistinguish2-{{c.id}}" class="list-group-item {% if not c.distinguish_level %}d-none{% endif %} text-info" role="button" onclick="post_toast2(this,'/distinguish_comment/{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-id-badge text-info"></i>Undistinguish</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<a id="pin2-{{c.id}}" class="list-group-item {% if c.is_pinned %}d-none{% endif %} text-info" role="button" data-bs-target="#adminModal-{{c.id}}" onclick="post_toast2('/sticky_comment/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-info"></i>Pin</a>
|
<a id="pin2-{{c.id}}" class="list-group-item {% if c.is_pinned %}d-none{% endif %} text-info" role="button" data-bs-target="#adminModal-{{c.id}}" onclick="post_toast2(this,'/sticky_comment/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-info"></i>Pin</a>
|
||||||
<a id="unpin2-{{c.id}}" class="list-group-item {% if not c.is_pinned %}d-none{% endif %} text-info" role="button" data-bs-target="#adminModal-{{c.id}}" onclick="post_toast2('/unsticky_comment/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-info"></i>Unpin</a>
|
<a id="unpin2-{{c.id}}" class="list-group-item {% if not c.is_pinned %}d-none{% endif %} text-info" role="button" data-bs-target="#adminModal-{{c.id}}" onclick="post_toast2(this,'/unsticky_comment/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-info"></i>Unpin</a>
|
||||||
|
|
||||||
<a id="mark2-{{c.id}}" class="{% if c.over_18 %}d-none{% endif %} list-group-item text-danger" role="button" onclick="post_toast2('/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-evil text-danger"></i>Mark +18</a>
|
<a id="mark2-{{c.id}}" class="{% if c.over_18 %}d-none{% endif %} list-group-item text-danger" role="button" onclick="post_toast2(this,'/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-evil text-danger"></i>Mark +18</a>
|
||||||
<a id="unmark2-{{c.id}}" class="{% if not c.over_18 %}d-none{% endif %} list-group-item text-danger" role="button" onclick="post_toast2('/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-evil text-danger"></i>Unmark +18</a>
|
<a id="unmark2-{{c.id}}" class="{% if not c.over_18 %}d-none{% endif %} list-group-item text-danger" role="button" onclick="post_toast2(this,'/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-evil text-danger"></i>Unmark +18</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.id != c.author_id %}
|
{% if v.id != c.author_id %}
|
||||||
<a id="ban2-{{c.id}}" class="{% if c.author.is_suspended %}d-none{% endif %} list-group-item text-danger" data-bs-dismiss="modal" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/comment/{{c.id}}', '{{c.author.id}}', '{{c.author_name}}')" role="button"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a>
|
<a id="ban2-{{c.id}}" class="{% if c.author.is_suspended %}d-none{% endif %} list-group-item text-danger" data-bs-dismiss="modal" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/comment/{{c.id}}', '{{c.author.id}}', '{{c.author_name}}')" role="button"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a>
|
||||||
<a id="unban2-{{c.id}}" class="{% if not c.author.is_suspended %}d-none{% endif %} list-group-item text-success" role="button" onclick="post_toast2('/unban_user/{{c.author_id}}','ban2-{{c.id}}','unban2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-user-minus fa-fw text-success"></i>Unban user</a>
|
<a id="unban2-{{c.id}}" class="{% if not c.author.is_suspended %}d-none{% endif %} list-group-item text-success" role="button" onclick="post_toast2(this,'/unban_user/{{c.author_id}}','ban2-{{c.id}}','unban2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-user-minus fa-fw text-success"></i>Unban user</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if "/reported/" in request.path %}
|
{% if "/reported/" in request.path %}
|
||||||
|
@ -928,7 +938,7 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<script src="/static/assets/js/marked.js?a=242"></script>
|
<script src="/static/assets/js/marked.js?a=242"></script>
|
||||||
<script src="/static/assets/js/comments_v.js?a=243"></script>
|
<script src="/static/assets/js/comments_v.js?a=244"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="/static/assets/js/clipboard.js?a=240"></script>
|
<script src="/static/assets/js/clipboard.js?a=240"></script>
|
||||||
|
|
|
@ -330,7 +330,7 @@
|
||||||
<script src="/static/assets/js/lozad.js?a=240"></script>
|
<script src="/static/assets/js/lozad.js?a=240"></script>
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<script src="/static/assets/js/post_toast2.js?a=240"></script>
|
<script src="/static/assets/js/post_toast2.js?a=241"></script>
|
||||||
<script src="/static/assets/js/formatting.js?a=240"></script>
|
<script src="/static/assets/js/formatting.js?a=240"></script>
|
||||||
<script src="/static/assets/js/default.js?a=240"></script>
|
<script src="/static/assets/js/default.js?a=240"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
<a class="dropdown-item" href="/contact"><i class="fas fa-file-signature fa-fw text-left mr-3"></i>Contact us</a>
|
<a class="dropdown-item" href="/contact"><i class="fas fa-file-signature fa-fw text-left mr-3"></i>Contact us</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-2">
|
<div class="px-2">
|
||||||
<a class="dropdown-item" role="button", onclick="post_toast('/logout', '1')"><i class="fas fa-sign-out fa-fw text-left mr-3"></i>Log out</a>
|
<a class="dropdown-item" role="button", onclick="post_toast(this,'/logout', '1')"><i class="fas fa-sign-out fa-fw text-left mr-3"></i>Log out</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -231,7 +231,7 @@
|
||||||
<a class="nav-item nav-link" href="/contact"><i class="fas fa-file-signature fa-fw mr-3"></i>Contact us</a>
|
<a class="nav-item nav-link" href="/contact"><i class="fas fa-file-signature fa-fw mr-3"></i>Contact us</a>
|
||||||
|
|
||||||
<li class="nav-item border-top border-bottom mt-2 pt-2">
|
<li class="nav-item border-top border-bottom mt-2 pt-2">
|
||||||
<a class="nav-link" role="button", onclick="post_toast('/logout', '1')"><i class="fas fa-sign-out fa-fw mr-3 text-danger"></i>Log out</a>
|
<a class="nav-link" role="button", onclick="post_toast(this,'/logout', '1')"><i class="fas fa-sign-out fa-fw mr-3 text-danger"></i>Log out</a>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="nav-item d-flex align-items-center justify-content-center pb-3">
|
<li class="nav-item d-flex align-items-center justify-content-center pb-3">
|
||||||
|
@ -254,7 +254,7 @@
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<script src="/static/assets/js/header.js?a=242"></script>
|
<script src="/static/assets/js/header.js?a=243"></script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.notif-count {
|
.notif-count {
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<a class="btn btn-primary mt-3 ml-3" role="button" onclick="post_toast('/clear', '1')">Clear all notifications</a>
|
<a class="btn btn-primary mt-3 ml-3" role="button" onclick="post_toast(this,'/clear', '1')">Clear all notifications</a>
|
||||||
|
|
||||||
<div class="notifs p-3 p-md-0">
|
<div class="notifs p-3 p-md-0">
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<a role="button" class="btn btn-secondary ml-auto" onclick="post_toast('/oauth/reroll/{{app.id}}','1')">Reroll Client ID</a>
|
<a role="button" class="btn btn-secondary ml-auto" onclick="post_toast(this,'/oauth/reroll/{{app.id}}','1')">Reroll Client ID</a>
|
||||||
<input autocomplete="off" type="submit" class="btn btn-primary ml-2" value="Save Changes">
|
<input autocomplete="off" type="submit" class="btn btn-primary ml-2" value="Save Changes">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<a role="button" class="btn btn-primary ml-auto text-white" onclick="post_toast('/oauth/rescind/{{auth.id}}')">Revoke</a>
|
<a role="button" class="btn btn-primary ml-auto text-white" onclick="post_toast(this,'/oauth/rescind/{{auth.id}}')">Revoke</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
<i class="fas fa-ellipsis-h text-muted"></i>
|
<i class="fas fa-ellipsis-h text-muted"></i>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu border-0 shadow dropdown-menu-right mt-2" aria-labelledby="dropdownMoreLink" x-placement="bottom-end" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(21px, 18px, 0px);">
|
<div class="dropdown-menu border-0 shadow dropdown-menu-right mt-2" aria-labelledby="dropdownMoreLink" x-placement="bottom-end" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(21px, 18px, 0px);">
|
||||||
<a class="dropdown-item" role="button" onclick="post_toast('/settings/unblock?username={{block.target.username}}&formkey={{v.formkey}}')"><i class="fas fa-check"></i>Unblock</a>
|
<a class="dropdown-item" role="button" onclick="post_toast(this,'/settings/unblock?username={{block.target.username}}&formkey={{v.formkey}}')"><i class="fas fa-check"></i>Unblock</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
<p>Change how many posts appear on every page.</p>
|
<p>Change how many posts appear on every page.</p>
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
<select autocomplete="off" id='frontsize' class="form-control" form="profile-settings" name="frontsize" onchange="post_toast('/settings/profile?frontsize='+document.getElementById('frontsize').value)">
|
<select autocomplete="off" id='frontsize' class="form-control" form="profile-settings" name="frontsize" onchange="post_toast(this,'/settings/profile?frontsize='+document.getElementById('frontsize').value)">
|
||||||
{% for entry in [25, 50, 100] %}
|
{% for entry in [25, 50, 100] %}
|
||||||
<option value="{{entry}}"{{' selected' if v.frontsize==entry}}>{{entry}}</option>
|
<option value="{{entry}}"{{' selected' if v.frontsize==entry}}>{{entry}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
<p>Change the default sorting for comments.</p>
|
<p>Change the default sorting for comments.</p>
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
<select autocomplete="off" id='defaultsortingcomments' class="form-control" form="profile-settings" name="defaultsortingcomments" onchange="post_toast('/settings/profile?defaultsortingcomments='+document.getElementById('defaultsortingcomments').value)">
|
<select autocomplete="off" id='defaultsortingcomments' class="form-control" form="profile-settings" name="defaultsortingcomments" onchange="post_toast(this,'/settings/profile?defaultsortingcomments='+document.getElementById('defaultsortingcomments').value)">
|
||||||
{% for entry in ["new", "old", "top", "bottom", "controversial"] %}
|
{% for entry in ["new", "old", "top", "bottom", "controversial"] %}
|
||||||
<option value="{{entry}}"{{' selected' if v.defaultsortingcomments==entry}}>{{entry}}</option>
|
<option value="{{entry}}"{{' selected' if v.defaultsortingcomments==entry}}>{{entry}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
<p>Change the default sorting for posts.</p>
|
<p>Change the default sorting for posts.</p>
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
<select autocomplete="off" id='defaultsorting' class="form-control" form="profile-settings" name="defaultsorting" onchange="post_toast('/settings/profile?defaultsorting='+document.getElementById('defaultsorting').value)">
|
<select autocomplete="off" id='defaultsorting' class="form-control" form="profile-settings" name="defaultsorting" onchange="post_toast(this,'/settings/profile?defaultsorting='+document.getElementById('defaultsorting').value)">
|
||||||
{% for entry in ["hot", "new", "old", "top", "bottom", "controversial", "comments"] %}
|
{% for entry in ["hot", "new", "old", "top", "bottom", "controversial", "comments"] %}
|
||||||
<option value="{{entry}}"{{' selected' if v.defaultsorting==entry}}>{{entry}}</option>
|
<option value="{{entry}}"{{' selected' if v.defaultsorting==entry}}>{{entry}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
<p>Change the default time filter for posts.</p>
|
<p>Change the default time filter for posts.</p>
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
<select autocomplete="off" id='defaulttime' class="form-control" form="profile-settings" name="defaulttime" onchange="post_toast('/settings/profile?defaulttime='+document.getElementById('defaulttime').value)">
|
<select autocomplete="off" id='defaulttime' class="form-control" form="profile-settings" name="defaulttime" onchange="post_toast(this,'/settings/profile?defaulttime='+document.getElementById('defaulttime').value)">
|
||||||
{% for entry in ["hour", "day", "week", "month", "year", "all"] %}
|
{% for entry in ["hour", "day", "week", "month", "year", "all"] %}
|
||||||
<option value="{{entry}}"{{' selected' if v.defaulttime==entry}}>{{entry}}</option>
|
<option value="{{entry}}"{{' selected' if v.defaulttime==entry}}>{{entry}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="newtab" name="newtab"{% if v.newtab %} checked{% endif %} onchange="post_toast('/settings/profile?newtab='+document.getElementById('newtab').checked);">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="newtab" name="newtab"{% if v.newtab %} checked{% endif %} onchange="post_toast(this,'/settings/profile?newtab='+document.getElementById('newtab').checked);">
|
||||||
<label class="custom-control-label" for="newtab"></label>
|
<label class="custom-control-label" for="newtab"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="newtabexternal" name="newtabexternal"{% if v.newtabexternal %} checked{% endif %} onchange="post_toast('/settings/profile?newtabexternal='+document.getElementById('newtabexternal').checked);">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="newtabexternal" name="newtabexternal"{% if v.newtabexternal %} checked{% endif %} onchange="post_toast(this,'/settings/profile?newtabexternal='+document.getElementById('newtabexternal').checked);">
|
||||||
<label class="custom-control-label" for="newtabexternal"></label>
|
<label class="custom-control-label" for="newtabexternal"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="nitter" name="nitter"{% if v.nitter %} checked{% endif %} onchange="post_toast('/settings/profile?nitter='+document.getElementById('nitter').checked);">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="nitter" name="nitter"{% if v.nitter %} checked{% endif %} onchange="post_toast(this,'/settings/profile?nitter='+document.getElementById('nitter').checked);">
|
||||||
<label class="custom-control-label" for="nitter"></label>
|
<label class="custom-control-label" for="nitter"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="teddit" name="teddit"{% if v.teddit %} checked{% endif %} onchange="post_toast('/settings/profile?teddit='+document.getElementById('teddit').checked);">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="teddit" name="teddit"{% if v.teddit %} checked{% endif %} onchange="post_toast(this,'/settings/profile?teddit='+document.getElementById('teddit').checked);">
|
||||||
<label class="custom-control-label" for="teddit"></label>
|
<label class="custom-control-label" for="teddit"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="oldreddit" name="oldreddit"{% if v.oldreddit %} checked{% endif %} onchange="post_toast('/settings/profile?oldreddit='+document.getElementById('oldreddit').checked);">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="oldreddit" name="oldreddit"{% if v.oldreddit %} checked{% endif %} onchange="post_toast(this,'/settings/profile?oldreddit='+document.getElementById('oldreddit').checked);">
|
||||||
<label class="custom-control-label" for="oldreddit"></label>
|
<label class="custom-control-label" for="oldreddit"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="controversial" name="controversial"{% if v.controversial %} checked{% endif %} onchange="post_toast('/settings/profile?controversial='+document.getElementById('controversial').checked);">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="controversial" name="controversial"{% if v.controversial %} checked{% endif %} onchange="post_toast(this,'/settings/profile?controversial='+document.getElementById('controversial').checked);">
|
||||||
<label class="custom-control-label" for="controversial"></label>
|
<label class="custom-control-label" for="controversial"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="sigs_disabled" name="sigs_disabled"{% if v.sigs_disabled %} checked{% endif %} onchange="post_toast('/settings/profile?sigs_disabled='+document.getElementById('sigs_disabled').checked);">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="sigs_disabled" name="sigs_disabled"{% if v.sigs_disabled %} checked{% endif %} onchange="post_toast(this,'/settings/profile?sigs_disabled='+document.getElementById('sigs_disabled').checked);">
|
||||||
<label class="custom-control-label" for="sigs_disabled"></label>
|
<label class="custom-control-label" for="sigs_disabled"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="over18" name="over18"{% if v.over_18 %} checked{% endif %} onchange="post_toast('/settings/profile?over18='+document.getElementById('over18').checked);">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="over18" name="over18"{% if v.over_18 %} checked{% endif %} onchange="post_toast(this,'/settings/profile?over18='+document.getElementById('over18').checked);">
|
||||||
<label class="custom-control-label" for="over18"></label>
|
<label class="custom-control-label" for="over18"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="slurreplacer" name="slurreplacer"{% if v.slurreplacer %} checked{% endif %} onchange="post_toast('/settings/profile?slurreplacer='+document.getElementById('slurreplacer').checked);">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="slurreplacer" name="slurreplacer"{% if v.slurreplacer %} checked{% endif %} onchange="post_toast(this,'/settings/profile?slurreplacer='+document.getElementById('slurreplacer').checked);">
|
||||||
<label class="custom-control-label" for="slurreplacer"></label>
|
<label class="custom-control-label" for="slurreplacer"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -310,7 +310,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="hidevotedon" name="hidevotedon"{% if v.hidevotedon %} checked{% endif %} onchange="post_toast('/settings/profile?hidevotedon='+document.getElementById('hidevotedon').checked);">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="hidevotedon" name="hidevotedon"{% if v.hidevotedon %} checked{% endif %} onchange="post_toast(this,'/settings/profile?hidevotedon='+document.getElementById('hidevotedon').checked);">
|
||||||
<label class="custom-control-label" for="hidevotedon"></label>
|
<label class="custom-control-label" for="hidevotedon"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
<p>Choose your quadrant.</p>
|
<p>Choose your quadrant.</p>
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
<select autocomplete="off" id='quadrant' class="form-control" form="profile-settings" name="quadrant" onchange="post_toast('/settings/profile?quadrant='+document.getElementById('quadrant').value, '1')">
|
<select autocomplete="off" id='quadrant' class="form-control" form="profile-settings" name="quadrant" onchange="post_toast(this,'/settings/profile?quadrant='+document.getElementById('quadrant').value, '1')">
|
||||||
{% for entry in ["Centrist", "LibLeft", "LibRight", "AuthLeft", "AuthRight", "LibCenter", "AuthCenter", "Left", "Right"] %}
|
{% for entry in ["Centrist", "LibLeft", "LibRight", "AuthLeft", "AuthRight", "LibCenter", "AuthCenter", "Left", "Right"] %}
|
||||||
<option value="{{entry}}" {% if v.quadrant==entry %} selected {% endif %}>
|
<option value="{{entry}}" {% if v.quadrant==entry %} selected {% endif %}>
|
||||||
{{entry}}
|
{{entry}}
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="cardview" name="cardview"{% if v.cardview %} checked{% endif %} onchange="post_toast('/settings/profile?cardview='+document.getElementById('cardview').checked);">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="cardview" name="cardview"{% if v.cardview %} checked{% endif %} onchange="post_toast(this,'/settings/profile?cardview='+document.getElementById('cardview').checked);">
|
||||||
<label class="custom-control-label" for="cardview"></label>
|
<label class="custom-control-label" for="cardview"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="highlightcomments" name="highlightcomments"{% if v.highlightcomments %} checked{% endif %} onchange="post_toast('/settings/profile?highlightcomments='+document.getElementById('highlightcomments').checked);">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="highlightcomments" name="highlightcomments"{% if v.highlightcomments %} checked{% endif %} onchange="post_toast(this,'/settings/profile?highlightcomments='+document.getElementById('highlightcomments').checked);">
|
||||||
<label class="custom-control-label" for="highlightcomments"></label>
|
<label class="custom-control-label" for="highlightcomments"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
<p>Change the theme for the website.</p>
|
<p>Change the theme for the website.</p>
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
<select autocomplete="off" id='theme' class="form-control" form="profile-settings" name="theme" onchange="post_toast('/settings/profile?theme='+document.getElementById('theme').value, '1')">
|
<select autocomplete="off" id='theme' class="form-control" form="profile-settings" name="theme" onchange="post_toast(this,'/settings/profile?theme='+document.getElementById('theme').value, '1')">
|
||||||
{% for entry in ["dramblr","classic","classic_dark","transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
|
{% for entry in ["dramblr","classic","classic_dark","transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
|
||||||
<option value="{{entry}}" {% if v.theme==entry %} selected {% endif %}>
|
<option value="{{entry}}" {% if v.theme==entry %} selected {% endif %}>
|
||||||
{{entry}}
|
{{entry}}
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% if v.background %}
|
{% if v.background %}
|
||||||
<div class="d-flex mt-2">
|
<div class="d-flex mt-2">
|
||||||
<a class="btn btn-primary ml-auto" role="button" onclick="post_toast('/settings/removebackground','1')">Remove Background</a>
|
<a class="btn btn-primary ml-auto" role="button" onclick="post_toast(this,'/settings/removebackground','1')">Remove Background</a>
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -644,7 +644,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="privateswitch" name="private"{% if v.is_private%} checked{% endif %} onchange="post_toast('/settings/profile?private='+document.getElementById('privateswitch').checked)">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="privateswitch" name="private"{% if v.is_private%} checked{% endif %} onchange="post_toast(this,'/settings/profile?private='+document.getElementById('privateswitch').checked)">
|
||||||
<label class="custom-control-label" for="privateswitch"></label>
|
<label class="custom-control-label" for="privateswitch"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -662,7 +662,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="nofollowswitch" name="nofollow"{% if v.is_nofollow%} checked{% endif %} onchange="post_toast('/settings/profile?nofollow='+document.getElementById('nofollowswitch').checked)">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="nofollowswitch" name="nofollow"{% if v.is_nofollow%} checked{% endif %} onchange="post_toast(this,'/settings/profile?nofollow='+document.getElementById('nofollowswitch').checked)">
|
||||||
<label class="custom-control-label" for="nofollowswitch"></label>
|
<label class="custom-control-label" for="nofollowswitch"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -685,7 +685,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script src="/static/assets/js/settings_profile.js?a=240"></script>
|
<script src="/static/assets/js/settings_profile.js?a=241"></script>
|
||||||
|
|
||||||
{% include "emoji_modal.html" %}
|
{% include "emoji_modal.html" %}
|
||||||
{% include "gif_modal.html" %}
|
{% include "gif_modal.html" %}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<input autocomplete="off" class="form-control" id="new_email" {% if v.email %}placeholder="{{v.email}}"{% else %}placeholder="Your email"{% endif %}
|
<input autocomplete="off" class="form-control" id="new_email" {% if v.email %}placeholder="{{v.email}}"{% else %}placeholder="Your email"{% endif %}
|
||||||
aria-describedby="new_email" type="email" name="new_email" required>
|
aria-describedby="new_email" type="email" name="new_email" required>
|
||||||
{% if v.email and not v.is_activated %}
|
{% if v.email and not v.is_activated %}
|
||||||
<div class="text-danger text-small-extra mt-1" id="email-verify-text">Email not verified. You will not be able to recover your account with this email until you verify it. <u><a role="button" onclick="post_toast('/verify_email');emailVerifyText();" class="text-danger">Verify now.</a></u></div>
|
<div class="text-danger text-small-extra mt-1" id="email-verify-text">Email not verified. You will not be able to recover your account with this email until you verify it. <u><a role="button" onclick="post_toast(this,'/verify_email');emailVerifyText();" class="text-danger">Verify now.</a></u></div>
|
||||||
{% elif not v.email %}
|
{% elif not v.email %}
|
||||||
<div class="text-danger text-small-extra mt-1" id="email-verify-text">Add an email to secure your account in case you forget your password.</div>
|
<div class="text-danger text-small-extra mt-1" id="email-verify-text">Add an email to secure your account in case you forget your password.</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<a class="btn btn-success" role="button" onclick="post_toast('/settings/gumroad')">Claim paypig rewards</a>
|
<a class="btn btn-success" role="button" onclick="post_toast(this,'/settings/gumroad')">Claim paypig rewards</a>
|
||||||
{% if v.email %}
|
{% if v.email %}
|
||||||
<input autocomplete="off" class="btn btn-primary ml-auto"
|
<input autocomplete="off" class="btn btn-primary ml-auto"
|
||||||
type="submit" value="Update email">
|
type="submit" value="Update email">
|
||||||
|
|
|
@ -69,8 +69,8 @@
|
||||||
<td style="font-weight: bold">{{a['owned']}}</td>
|
<td style="font-weight: bold">{{a['owned']}}</td>
|
||||||
{% set kind = a['kind'] %}
|
{% set kind = a['kind'] %}
|
||||||
<td style="font-weight: bold">
|
<td style="font-weight: bold">
|
||||||
{% if a['kind'] != "benefactor" %}<a class="d-flex btn btn-success {% if v.coins < a['price'] %}disabled{% endif %}" role="button" onclick="post_toast('/buy/{{kind}}')"><span class="m-auto">Buy with coins</span></a>{% endif %}
|
{% if a['kind'] != "benefactor" %}<a class="d-flex btn btn-success {% if v.coins < a['price'] %}disabled{% endif %}" role="button" onclick="post_toast(this,'/buy/{{kind}}')"><span class="m-auto">Buy with coins</span></a>{% endif %}
|
||||||
{% if a['kind'] != "grass" %}<a class="d-flex marseybux btn btn-success {% if v.procoins < a['price'] %}disabled{% endif %}" role="button" onclick="post_toast('/buy/{{kind}}?mb=true')"><span class="m-auto">Buy with marseybux</span></a>{% endif %}
|
{% if a['kind'] != "grass" %}<a class="d-flex marseybux btn btn-success {% if v.procoins < a['price'] %}disabled{% endif %}" role="button" onclick="post_toast(this,'/buy/{{kind}}?mb=true')"><span class="m-auto">Buy with marseybux</span></a>{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -347,43 +347,43 @@
|
||||||
|
|
||||||
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')"><i class="fas fa-gift text-center text-muted mr-3"></i>Give Award</button>
|
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')"><i class="fas fa-gift text-center text-muted mr-3"></i>Give Award</button>
|
||||||
|
|
||||||
<button id="subscribe2-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2('/subscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye text-center text-muted mr-3"></i>Subscribe</button>
|
<button id="subscribe2-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2(this,'/subscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye text-center text-muted mr-3"></i>Subscribe</button>
|
||||||
<button id="unsubscribe2-{{p.id}}" class="{% if not p.id in v.subscribed_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2('/unsubscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash text-center text-muted mr-3"></i>Unsubscribe</button>
|
<button id="unsubscribe2-{{p.id}}" class="{% if not p.id in v.subscribed_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2(this,'/unsubscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash text-center text-muted mr-3"></i>Unsubscribe</button>
|
||||||
|
|
||||||
<button id="save2-{{p.id}}" class="{% if p.id in v.saved_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2('/save_post/{{p.id}}','save2-{{p.id}}','unsave2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-save text-center text-muted mr-3"></i>Save</button>
|
<button id="save2-{{p.id}}" class="{% if p.id in v.saved_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2(this,'/save_post/{{p.id}}','save2-{{p.id}}','unsave2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-save text-center text-muted mr-3"></i>Save</button>
|
||||||
<button id="unsave2-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2('/unsave_post/{{p.id}}','save2-{{p.id}}','unsave2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-save text-center text-muted mr-3"></i>Unsave</button>
|
<button id="unsave2-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2(this,'/unsave_post/{{p.id}}','save2-{{p.id}}','unsave2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-save text-center text-muted mr-3"></i>Unsave</button>
|
||||||
|
|
||||||
|
|
||||||
{% if v.id==p.author_id %}
|
{% if v.id==p.author_id %}
|
||||||
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" onclick="togglePostEdit('{{p.id}}')"><i class="far fa-edit text-center text-muted mr-3"></i>Edit</button>
|
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" onclick="togglePostEdit('{{p.id}}')"><i class="far fa-edit text-center text-muted mr-3"></i>Edit</button>
|
||||||
|
|
||||||
{% if v.admin_level == 1 %}
|
{% if v.admin_level == 1 %}
|
||||||
<button id="distinguish2-{{p.id}}" class="{% if p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2('/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Distinguish</button>
|
<button id="distinguish2-{{p.id}}" class="{% if p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Distinguish</button>
|
||||||
<button id="undistinguish2-{{p.id}}" class="{% if not p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2('/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Undistinguish</button>
|
<button id="undistinguish2-{{p.id}}" class="{% if not p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Undistinguish</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if p.private %}
|
{% if p.private %}
|
||||||
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast('/publish/{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-globe text-center text-muted mr-3"></i>Publish</button>
|
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast(this,'/publish/{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-globe text-center text-muted mr-3"></i>Publish</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if request.path.startswith('/@') %}
|
{% if request.path.startswith('/@') %}
|
||||||
<button id="pin-profile2-{{p.id}}" class="{% if p.is_pinned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-muted text-left"role="button" onclick="post_toast2('/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Pin to profile</button>
|
<button id="pin-profile2-{{p.id}}" class="{% if p.is_pinned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-muted text-left"role="button" onclick="post_toast2(this,'/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Pin to profile</button>
|
||||||
<button id="unpin-profile2-{{p.id}}" class="{% if not p.is_pinned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-muted text-left" role="button" onclick="post_toast2('/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Unpin from profile</button>
|
<button id="unpin-profile2-{{p.id}}" class="{% if not p.is_pinned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-muted text-left" role="button" onclick="post_toast2(this,'/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Unpin from profile</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
<button id="undelete-{{p.id}}" class="{% if not p.deleted_utc %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-success" role="button" onclick="post_toast2('/undelete_post/{{p.id}}', 'delete-{{p.id}}', 'undelete-{{p.id}}');document.getElementById('post-{{p.id}}').classList.remove('deleted')" data-bs-dismiss="modal"><i class="far fa-trash-alt text-center mr-3"></i>Undelete</button>
|
<button id="undelete-{{p.id}}" class="{% if not p.deleted_utc %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-success" role="button" onclick="post_toast2(this,'/undelete_post/{{p.id}}', 'delete-{{p.id}}', 'undelete-{{p.id}}');document.getElementById('post-{{p.id}}').classList.remove('deleted')" data-bs-dismiss="modal"><i class="far fa-trash-alt text-center mr-3"></i>Undelete</button>
|
||||||
|
|
||||||
<button id="delete-{{p.id}}" class="{% if p.deleted_utc %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="far fa-trash-alt mr-3"></i>Delete</button>
|
<button id="delete-{{p.id}}" class="{% if p.deleted_utc %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="far fa-trash-alt mr-3"></i>Delete</button>
|
||||||
|
|
||||||
|
|
||||||
{% if v.club_allowed != False %}
|
{% if v.club_allowed != False %}
|
||||||
<button id="club3-{{p.id}}" class="{% if p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast2('/toggle_club/{{p.id}}','club3-{{p.id}}','unclub3-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash mr-3"></i>Mark club</button>
|
<button id="club3-{{p.id}}" class="{% if p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club3-{{p.id}}','unclub3-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash mr-3"></i>Mark club</button>
|
||||||
<button id="unclub3-{{p.id}}" class="{% if not p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast2('/toggle_club/{{p.id}}','club3-{{p.id}}','unclub3-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye mr-3"></i>Unmark club</button>
|
<button id="unclub3-{{p.id}}" class="{% if not p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club3-{{p.id}}','unclub3-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye mr-3"></i>Unmark club</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<button id="mark3-{{p.id}}" class="{% if p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark3-{{p.id}}','unmark3-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center mr-3"></i>Mark +18</button>
|
<button id="mark3-{{p.id}}" class="{% if p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark3-{{p.id}}','unmark3-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center mr-3"></i>Mark +18</button>
|
||||||
<button id="unmark3-{{p.id}}" class="{% if not p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-success" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark3-{{p.id}}','unmark3-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center mr-3"></i>Unmark +18</button>
|
<button id="unmark3-{{p.id}}" class="{% if not p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-success" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark3-{{p.id}}','unmark3-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center mr-3"></i>Unmark +18</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if p.body %}
|
{% if p.body %}
|
||||||
<button id="view-{{p.id}}" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" onclick="expandMarkdown('{{p.id}}')"><i class="fas text-expand-icon-{{p.id}} fa-expand-alt text-center mr-3"></i>View source</button>
|
<button id="view-{{p.id}}" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" onclick="expandMarkdown('{{p.id}}')"><i class="fas text-expand-icon-{{p.id}} fa-expand-alt text-center mr-3"></i>View source</button>
|
||||||
|
@ -391,14 +391,14 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if not p.ghost %}
|
{% if not p.ghost %}
|
||||||
<button id="unblock2-{{p.id}}" class="nobackground btn btn-link btn-block btn-lg text-success text-left{% if not p.is_blocking %} d-none{% endif %}" data-bs-dismiss="modal" onclick="post_toast2('/settings/unblock?username={{p.author_name}}','block2-{{p.id}}','unblock2-{{p.id}}')"><i class="fas fa-eye mr-3 text-success"></i>Unblock user</button>
|
<button id="unblock2-{{p.id}}" class="nobackground btn btn-link btn-block btn-lg text-success text-left{% if not p.is_blocking %} d-none{% endif %}" data-bs-dismiss="modal" onclick="post_toast2(this,'/settings/unblock?username={{p.author_name}}','block2-{{p.id}}','unblock2-{{p.id}}')"><i class="fas fa-eye mr-3 text-success"></i>Unblock user</button>
|
||||||
<button id="prompt2-{{p.id}}" class="blockuser nobackground btn btn-link btn-block btn-lg text-danger text-left d-none" data-bs-dismiss="modal" onclick="post_toast2('/settings/block?username={{p.author_name}}','prompt2-{{p.id}}','unblock2-{{p.id}}')"><i class="fas fa-eye-slash mr-3 text-danger"></i>Are you sure?</button>
|
<button id="prompt2-{{p.id}}" class="blockuser nobackground btn btn-link btn-block btn-lg text-danger text-left d-none" data-bs-dismiss="modal" onclick="post_toast2(this,'/settings/block?username={{p.author_name}}','prompt2-{{p.id}}','unblock2-{{p.id}}')"><i class="fas fa-eye-slash mr-3 text-danger"></i>Are you sure?</button>
|
||||||
<button id="block2-{{p.id}}" class="blockuser nobackground btn btn-link btn-block btn-lg text-danger text-left{% if p.is_blocking %} d-none{% endif %}" onclick="document.getElementById('block2-{{p.id}}').classList.toggle('d-none');document.getElementById('prompt2-{{p.id}}').classList.toggle('d-none');"><i class="fas fa-eye-slash mr-3 text-danger"></i>Block user</button>
|
<button id="block2-{{p.id}}" class="blockuser nobackground btn btn-link btn-block btn-lg text-danger text-left{% if p.is_blocking %} d-none{% endif %}" onclick="document.getElementById('block2-{{p.id}}').classList.toggle('d-none');document.getElementById('prompt2-{{p.id}}').classList.toggle('d-none');"><i class="fas fa-eye-slash mr-3 text-danger"></i>Block user</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if p.sub and v.mods(p.sub) %}
|
{% if p.sub and v.mods(p.sub) %}
|
||||||
<button class="nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast('/kick/{{p.id}}')"><i class="fas fa-sign-out text-danger text-center mr-3"></i>Kick</button>
|
<button class="nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast(this,'/kick/{{p.id}}')"><i class="fas fa-sign-out text-danger text-center mr-3"></i>Kick</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -423,33 +423,33 @@
|
||||||
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" onclick="togglePostEdit('{{p.id}}')"><i class="far fa-edit text-center text-muted mr-3"></i>Edit</button>
|
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" onclick="togglePostEdit('{{p.id}}')"><i class="far fa-edit text-center text-muted mr-3"></i>Edit</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<button id="club2-{{p.id}}" class="{% if p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-info text-left" role="button" onclick="post_toast2('/toggle_club/{{p.id}}','club2-{{p.id}}','unclub2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash mr-3"></i>Mark club</button>
|
<button id="club2-{{p.id}}" class="{% if p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-info text-left" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club2-{{p.id}}','unclub2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash mr-3"></i>Mark club</button>
|
||||||
<button id="unclub2-{{p.id}}" class="{% if not p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-info text-left" role="button" onclick="post_toast2('/toggle_club/{{p.id}}','club2-{{p.id}}','unclub2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye mr-3"></i>Unmark club</button>
|
<button id="unclub2-{{p.id}}" class="{% if not p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-info text-left" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club2-{{p.id}}','unclub2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye mr-3"></i>Unmark club</button>
|
||||||
|
|
||||||
<button id="distinguish2-{{p.id}}" class="{% if p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2('/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Distinguish</button>
|
<button id="distinguish2-{{p.id}}" class="{% if p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Distinguish</button>
|
||||||
<button id="undistinguish2-{{p.id}}" class="{% if not p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2('/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Undistinguish</button>
|
<button id="undistinguish2-{{p.id}}" class="{% if not p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Undistinguish</button>
|
||||||
|
|
||||||
<button id="pin2-{{p.id}}" class="{% if p.stickied %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2('/sticky/{{p.id}}','pin2-{{p.id}}','unpin2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Pin</button>
|
<button id="pin2-{{p.id}}" class="{% if p.stickied %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2(this,'/sticky/{{p.id}}','pin2-{{p.id}}','unpin2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Pin</button>
|
||||||
<button id="unpin2-{{p.id}}" class="{% if not p.stickied %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2('/unsticky/{{p.id}}','pin2-{{p.id}}','unpin2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Unpin</button>
|
<button id="unpin2-{{p.id}}" class="{% if not p.stickied %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2(this,'/unsticky/{{p.id}}','pin2-{{p.id}}','unpin2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Unpin</button>
|
||||||
|
|
||||||
{% if "/reported/" in request.path %}
|
{% if "/reported/" in request.path %}
|
||||||
<button class="nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast('/ban_post/{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-ban text-center mr-3"></i>Remove</button>
|
<button class="nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast(this,'/ban_post/{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-ban text-center mr-3"></i>Remove</button>
|
||||||
<button class="nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast('/unban_post/{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-check text-center mr-3"></i>Approve</button>
|
<button class="nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast(this,'/unban_post/{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-check text-center mr-3"></i>Approve</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
<button id="remove2-{{p.id}}" class="{% if p.is_banned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast2('/ban_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-ban text-center mr-3"></i>Remove</button>
|
<button id="remove2-{{p.id}}" class="{% if p.is_banned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast2(this,'/ban_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-ban text-center mr-3"></i>Remove</button>
|
||||||
<button id="approve2-{{p.id}}" class="{% if not p.is_banned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast2('/unban_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-check text-center mr-3"></i>Approve</button>
|
<button id="approve2-{{p.id}}" class="{% if not p.is_banned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast2(this,'/unban_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-check text-center mr-3"></i>Approve</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if p.oauth_app %}
|
{% if p.oauth_app %}
|
||||||
<a href="{{p.oauth_app.permalink}}"><button class="nobackground btn btn-link btn-block btn-lg text-muted text-left"><i class="far fa-code text-center text-info mr-3"></i>API App</button></a>
|
<a href="{{p.oauth_app.permalink}}"><button class="nobackground btn btn-link btn-block btn-lg text-muted text-left"><i class="far fa-code text-center text-info mr-3"></i>API App</button></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<button id="mark2-{{p.id}}" class="{% if p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center text-danger mr-3"></i>Mark +18</button>
|
<button id="mark2-{{p.id}}" class="{% if p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center text-danger mr-3"></i>Mark +18</button>
|
||||||
<button id="unmark2-{{p.id}}" class="{% if not p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center text-danger mr-3"></i>Unmark +18</button>
|
<button id="unmark2-{{p.id}}" class="{% if not p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center text-danger mr-3"></i>Unmark +18</button>
|
||||||
|
|
||||||
{% if v.id != p.author_id %}
|
{% if v.id != p.author_id %}
|
||||||
<button id="ban2-{{p.id}}" data-bs-dismiss="modal" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{p.author.id}}', '{{p.author_name}}')" class="{% if p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button"><i class="fas fa-user-minus mr-3"></i>Ban user</button>
|
<button id="ban2-{{p.id}}" data-bs-dismiss="modal" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{p.author.id}}', '{{p.author_name}}')" class="{% if p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button"><i class="fas fa-user-minus mr-3"></i>Ban user</button>
|
||||||
<button id="unban2-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast2('/unban_user/{{p.author_id}}','ban2-{{p.id}}','unban2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-user-minus mr-3"></i>Unban user</button>
|
<button id="unban2-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast2(this,'/unban_user/{{p.author_id}}','ban2-{{p.id}}','unban2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-user-minus mr-3"></i>Unban user</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -540,7 +540,7 @@
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
<ul style="padding-left:20px; margin-bottom: 0;">
|
<ul style="padding-left:20px; margin-bottom: 0;">
|
||||||
{% for f in p.flags %}
|
{% for f in p.flags %}
|
||||||
<li><a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>{% if f.reason %}: {{f.realreason(v) | safe}}{% endif %} {% if v and v.admin_level > 1 %}<a role="button" onclick="post_toast('/del_report/p{{f.id}}')">[remove]</a>{% endif %}</li>
|
<li><a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>{% if f.reason %}: {{f.realreason(v) | safe}}{% endif %} {% if v and v.admin_level > 1 %}<a role="button" onclick="post_toast(this,'/del_report/p{{f.id}}')">[remove]</a>{% endif %}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -681,7 +681,7 @@
|
||||||
|
|
||||||
{% if v and v.id==p.author_id %}
|
{% if v and v.id==p.author_id %}
|
||||||
{% if p.private %}
|
{% if p.private %}
|
||||||
<a class="list-inline-item" role="button" onclick="post_toast('/publish/{{p.id}}')"><i class="fas fa-globe"></i>Publish</a>
|
<a class="list-inline-item" role="button" onclick="post_toast(this,'/publish/{{p.id}}')"><i class="fas fa-globe"></i>Publish</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -694,55 +694,55 @@
|
||||||
<a class="list-inline-item copy-link" role="button" role="button" data-clipboard-text="{% if SITE_NAME == 'Drama' %}https://rdrama.com{{p.shortlink}}{% else %}{{p.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</a>
|
<a class="list-inline-item copy-link" role="button" role="button" data-clipboard-text="{% if SITE_NAME == 'Drama' %}https://rdrama.com{{p.shortlink}}{% else %}{{p.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</a>
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<a id="subscribe-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2('/subscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')"><i class="fas fa-eye"></i>Subscribe</a>
|
<a id="subscribe-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/subscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')"><i class="fas fa-eye"></i>Subscribe</a>
|
||||||
<a id="unsubscribe-{{p.id}}" class="{% if p.id not in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2('/unsubscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')"><i class="fas fa-eye-slash"></i>Unsubscribe</a>
|
<a id="unsubscribe-{{p.id}}" class="{% if p.id not in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/unsubscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')"><i class="fas fa-eye-slash"></i>Unsubscribe</a>
|
||||||
|
|
||||||
<a id="save-{{p.id}}" class="{% if p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2('/save_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')"><i class="fas fa-save"></i>Save</a>
|
<a id="save-{{p.id}}" class="{% if p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/save_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')"><i class="fas fa-save"></i>Save</a>
|
||||||
<a id="unsave-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2('/unsave_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')"><i class="fas fa-save"></i>Unsave</a>
|
<a id="unsave-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/unsave_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')"><i class="fas fa-save"></i>Unsave</a>
|
||||||
|
|
||||||
<a class="list-inline-item" role="button" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" onclick="report_postModal('{{p.id}}')"><i class="fas fa-flag"></i>Report</a>
|
<a class="list-inline-item" role="button" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" onclick="report_postModal('{{p.id}}')"><i class="fas fa-flag"></i>Report</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.id==p.author_id %}
|
{% if v and v.id==p.author_id %}
|
||||||
{% if request.path.startswith('/@') %}
|
{% if request.path.startswith('/@') %}
|
||||||
<a id="pin-profile-{{p.id}}" class="{% if p.is_pinned %}d-none{% endif %} list-inline-item text-muted" role="button" onclick="post_toast2('/pin/{{p.id}}','unpin-profile-{{p.id}}','pin-profile-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Pin to profile</a>
|
<a id="pin-profile-{{p.id}}" class="{% if p.is_pinned %}d-none{% endif %} list-inline-item text-muted" role="button" onclick="post_toast2(this,'/pin/{{p.id}}','unpin-profile-{{p.id}}','pin-profile-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Pin to profile</a>
|
||||||
<a id="unpin-profile-{{p.id}}" class="{% if not p.is_pinned %}d-none{% endif %} list-inline-item text-muted" role="button" onclick="post_toast2('/pin/{{p.id}}','unpin-profile-{{p.id}}','pin-profile-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Unpin from profile</a>
|
<a id="unpin-profile-{{p.id}}" class="{% if not p.is_pinned %}d-none{% endif %} list-inline-item text-muted" role="button" onclick="post_toast2(this,'/pin/{{p.id}}','unpin-profile-{{p.id}}','pin-profile-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Unpin from profile</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<a id="undelete2-{{p.id}}" class="{% if not p.deleted_utc %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2('/undelete_post/{{p.id}}', 'delete2-{{p.id}}', 'undelete2-{{p.id}}');document.getElementById('post-{{p.id}}').classList.remove('deleted')"><i class="fas fa-trash-alt"></i>Undelete</a>
|
<a id="undelete2-{{p.id}}" class="{% if not p.deleted_utc %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/undelete_post/{{p.id}}', 'delete2-{{p.id}}', 'undelete2-{{p.id}}');document.getElementById('post-{{p.id}}').classList.remove('deleted')"><i class="fas fa-trash-alt"></i>Undelete</a>
|
||||||
|
|
||||||
<a id="delete2-{{p.id}}" class="{% if p.deleted_utc %}d-none{% endif %} list-inline-item" role="button" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="fas fa-trash-alt"></i>Delete</a>
|
<a id="delete2-{{p.id}}" class="{% if p.deleted_utc %}d-none{% endif %} list-inline-item" role="button" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="fas fa-trash-alt"></i>Delete</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
{% if v.admin_level %}
|
{% if v.admin_level %}
|
||||||
<a id="distinguish-{{p.id}}" class="{% if p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2('/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Distinguish</a>
|
<a id="distinguish-{{p.id}}" class="{% if p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Distinguish</a>
|
||||||
<a id="undistinguish-{{p.id}}" class="{% if not p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2('/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Undistinguish</a>
|
<a id="undistinguish-{{p.id}}" class="{% if not p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Undistinguish</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level > 1 %}
|
{% if v.admin_level > 1 %}
|
||||||
<a id="pin-{{p.id}}" class="{% if p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2('/sticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Pin</a>
|
<a id="pin-{{p.id}}" class="{% if p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/sticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Pin</a>
|
||||||
<a id="unpin-{{p.id}}" class="{% if not p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2('/unsticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Unpin</a>
|
<a id="unpin-{{p.id}}" class="{% if not p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/unsticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Unpin</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level > 1 or v.id == p.author.id and v.club_allowed != False %}
|
{% if v.admin_level > 1 or v.id == p.author.id and v.club_allowed != False %}
|
||||||
<a id="club-{{p.id}}" class="{% if p.club %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2('/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')"><i class="fas fa-eye-slash"></i>Mark club</a>
|
<a id="club-{{p.id}}" class="{% if p.club %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')"><i class="fas fa-eye-slash"></i>Mark club</a>
|
||||||
<a id="unclub-{{p.id}}" class="{% if not p.club %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2('/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')"><i class="fas fa-eye"></i>Unmark club</a>
|
<a id="unclub-{{p.id}}" class="{% if not p.club %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')"><i class="fas fa-eye"></i>Unmark club</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level > 1 %}
|
{% if v.admin_level > 1 %}
|
||||||
{% if "/reported/" in request.path %}
|
{% if "/reported/" in request.path %}
|
||||||
{% if v.id != p.author.id %}<a class="list-inline-item text-danger" role="button" onclick="post_toast('/ban_post/{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
|
{% if v.id != p.author.id %}<a class="list-inline-item text-danger" role="button" onclick="post_toast(this,'/ban_post/{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
|
||||||
<a class="list-inline-item text-success" role="button" onclick="post_toast('/unban_post/{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
|
<a class="list-inline-item text-success" role="button" onclick="post_toast(this,'/unban_post/{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if v.id != p.author.id %}<a id="remove-{{p.id}}" class="{% if p.is_banned %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast2('/ban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
|
{% if v.id != p.author.id %}<a id="remove-{{p.id}}" class="{% if p.is_banned %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast2(this,'/ban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
|
||||||
<a id="approve-{{p.id}}" class="{% if not p.is_banned %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast2('/unban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
|
<a id="approve-{{p.id}}" class="{% if not p.is_banned %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast2(this,'/unban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.id == p.author_id or v.admin_level > 1 %}
|
{% if v.id == p.author_id or v.admin_level > 1 %}
|
||||||
<a id="mark-{{p.id}}" class="{% if p.over_18 %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')"><i class="fas fa-eye-evil"></i>Mark +18</a>
|
<a id="mark-{{p.id}}" class="{% if p.over_18 %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')"><i class="fas fa-eye-evil"></i>Mark +18</a>
|
||||||
<a id="unmark-{{p.id}}" class="{% if not p.over_18 %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')"><i class="fas fa-eye-evil"></i>Unmark +18</a>
|
<a id="unmark-{{p.id}}" class="{% if not p.over_18 %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')"><i class="fas fa-eye-evil"></i>Unmark +18</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level > 1 and p.oauth_app %}
|
{% if v.admin_level > 1 and p.oauth_app %}
|
||||||
|
@ -750,20 +750,20 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.id != p.author_id and not p.ghost %}
|
{% if v.id != p.author_id and not p.ghost %}
|
||||||
<a id="unblock-{{p.id}}" class="text-success list-inline-item {% if not p.is_blocking %} d-none{% endif %}" role="button" onclick="post_toast2('/settings/unblock?username={{p.author_name}}','block-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye text-success"></i>Unblock user</a>
|
<a id="unblock-{{p.id}}" class="text-success list-inline-item {% if not p.is_blocking %} d-none{% endif %}" role="button" onclick="post_toast2(this,'/settings/unblock?username={{p.author_name}}','block-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye text-success"></i>Unblock user</a>
|
||||||
|
|
||||||
<a id="prompt-{{p.id}}" class="text-danger blockuser list-inline-item d-none" role="button" onclick="post_toast2('/settings/block?username={{p.author_name}}','prompt-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye-slash text-danger"></i>Are you sure?</a>
|
<a id="prompt-{{p.id}}" class="text-danger blockuser list-inline-item d-none" role="button" onclick="post_toast2(this,'/settings/block?username={{p.author_name}}','prompt-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye-slash text-danger"></i>Are you sure?</a>
|
||||||
|
|
||||||
<a id="block-{{p.id}}" class="text-danger blockuser list-inline-item {% if p.is_blocking %} d-none{% endif %}" role="button" onclick="document.getElementById('block-{{p.id}}').classList.toggle('d-none');document.getElementById('prompt-{{p.id}}').classList.toggle('d-none');"><i class="fas fa-eye-slash text-danger"></i>Block user</a>
|
<a id="block-{{p.id}}" class="text-danger blockuser list-inline-item {% if p.is_blocking %} d-none{% endif %}" role="button" onclick="document.getElementById('block-{{p.id}}').classList.toggle('d-none');document.getElementById('prompt-{{p.id}}').classList.toggle('d-none');"><i class="fas fa-eye-slash text-danger"></i>Block user</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if p.sub and v.mods(p.sub) %}
|
{% if p.sub and v.mods(p.sub) %}
|
||||||
<a class="list-inline-item text-danger" role="button" onclick="post_toast('/kick/{{p.id}}')"><i class="fas fa-sign-out text-danger"></i>Kick</a>
|
<a class="list-inline-item text-danger" role="button" onclick="post_toast(this,'/kick/{{p.id}}')"><i class="fas fa-sign-out text-danger"></i>Kick</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level > 1 and v.id!=p.author_id %}
|
{% if v.admin_level > 1 and v.id!=p.author_id %}
|
||||||
<a id="ban-{{p.id}}" class="{% if p.author.is_suspended %}d-none{% endif %} list-inline-item text-danger" role="button" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{p.author.id}}', '{{p.author_name}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a>
|
<a id="ban-{{p.id}}" class="{% if p.author.is_suspended %}d-none{% endif %} list-inline-item text-danger" role="button" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{p.author.id}}', '{{p.author_name}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a>
|
||||||
<a id="unban-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} list-inline-item text-danger" id="unexile2-user-{{p.id}}" role="button" onclick="post_toast2('/unban_user/{{p.author_id}}','ban-{{p.id}}','unban-{{p.id}}')"><i class="fas fa-user-slash"></i>Unban user</a>
|
<a id="unban-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} list-inline-item text-danger" id="unexile2-user-{{p.id}}" role="button" onclick="post_toast2(this,'/unban_user/{{p.author_id}}','ban-{{p.id}}','unban-{{p.id}}')"><i class="fas fa-user-slash"></i>Unban user</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
<ul style="padding-left:20px; margin-bottom: 0;">
|
<ul style="padding-left:20px; margin-bottom: 0;">
|
||||||
{% for f in p.flags %}
|
{% for f in p.flags %}
|
||||||
<li><a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>{% if f.reason %}: {{f.realreason(v) | safe}}{% endif %} {% if v and v.admin_level > 1 %}<a role="button" onclick="post_toast('/del_report/p{{f.id}}')">[remove]</a>{% endif %}</li>
|
<li><a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>{% if f.reason %}: {{f.realreason(v) | safe}}{% endif %} {% if v and v.admin_level > 1 %}<a role="button" onclick="post_toast(this,'/del_report/p{{f.id}}')">[remove]</a>{% endif %}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -232,24 +232,24 @@
|
||||||
<a class="list-inline-item copy-link" role="button" data-clipboard-text="{% if SITE_NAME == 'Drama' %}https://rdrama.com{{p.shortlink}}{% else %}{{p.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</a>
|
<a class="list-inline-item copy-link" role="button" data-clipboard-text="{% if SITE_NAME == 'Drama' %}https://rdrama.com{{p.shortlink}}{% else %}{{p.permalink}}{% endif %}"><i class="fas fa-copy"></i>Copy link</a>
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<a id="subscribe-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2('/subscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')"><i class="fas fa-eye"></i>Subscribe</a>
|
<a id="subscribe-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/subscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')"><i class="fas fa-eye"></i>Subscribe</a>
|
||||||
<a id="unsubscribe-{{p.id}}" class="{% if p.id not in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2('/unsubscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')"><i class="fas fa-eye-slash"></i>Unsubscribe</a>
|
<a id="unsubscribe-{{p.id}}" class="{% if p.id not in v.subscribed_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/unsubscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')"><i class="fas fa-eye-slash"></i>Unsubscribe</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<a id="save-{{p.id}}" class="{% if p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2('/save_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')"><i class="fas fa-save"></i>Save</a>
|
<a id="save-{{p.id}}" class="{% if p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/save_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')"><i class="fas fa-save"></i>Save</a>
|
||||||
<a id="unsave-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2('/unsave_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')"><i class="fas fa-save"></i>Unsave</a>
|
<a id="unsave-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/unsave_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')"><i class="fas fa-save"></i>Unsave</a>
|
||||||
|
|
||||||
<a class="list-inline-item" role="button" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" onclick="report_postModal('{{p.id}}')"><i class="fas fa-flag"></i>Report</a>
|
<a class="list-inline-item" role="button" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" onclick="report_postModal('{{p.id}}')"><i class="fas fa-flag"></i>Report</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.id==p.author_id %}
|
{% if v and v.id==p.author_id %}
|
||||||
{% if request.path.startswith('/@') %}
|
{% if request.path.startswith('/@') %}
|
||||||
<a id="pin-profile-{{p.id}}" class="{% if p.is_pinned %}d-none{% endif %} list-inline-item text-muted" role="button" onclick="post_toast2('/pin/{{p.id}}','unpin-profile-{{p.id}}','pin-profile-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Pin to profile</a>
|
<a id="pin-profile-{{p.id}}" class="{% if p.is_pinned %}d-none{% endif %} list-inline-item text-muted" role="button" onclick="post_toast2(this,'/pin/{{p.id}}','unpin-profile-{{p.id}}','pin-profile-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Pin to profile</a>
|
||||||
<a id="unpin-profile-{{p.id}}" class="{% if not p.is_pinned %}d-none{% endif %} list-inline-item text-muted" role="button" onclick="post_toast2('/pin/{{p.id}}','unpin-profile-{{p.id}}','pin-profile-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Unpin from profile</a>
|
<a id="unpin-profile-{{p.id}}" class="{% if not p.is_pinned %}d-none{% endif %} list-inline-item text-muted" role="button" onclick="post_toast2(this,'/pin/{{p.id}}','unpin-profile-{{p.id}}','pin-profile-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Unpin from profile</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<a id="undelete2-{{p.id}}" class="{% if not p.deleted_utc %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2('/undelete_post/{{p.id}}', 'delete2-{{p.id}}', 'undelete2-{{p.id}}');document.getElementById('post-{{p.id}}').classList.remove('deleted')"><i class="fas fa-trash-alt"></i>Undelete</a>
|
<a id="undelete2-{{p.id}}" class="{% if not p.deleted_utc %}d-none{% endif %} list-inline-item" role="button" onclick="post_toast2(this,'/undelete_post/{{p.id}}', 'delete2-{{p.id}}', 'undelete2-{{p.id}}');document.getElementById('post-{{p.id}}').classList.remove('deleted')"><i class="fas fa-trash-alt"></i>Undelete</a>
|
||||||
|
|
||||||
<a id="delete2-{{p.id}}" class="{% if p.deleted_utc %}d-none{% endif %} list-inline-item" role="button" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="fas fa-trash-alt"></i>Delete</a>
|
<a id="delete2-{{p.id}}" class="{% if p.deleted_utc %}d-none{% endif %} list-inline-item" role="button" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="fas fa-trash-alt"></i>Delete</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -258,27 +258,27 @@
|
||||||
<a class="list-inline-item" role="button" data-bs-toggle="dropdown" aria-expanded="false" ><i class="fas fa-ellipsis-h fa-fw"></i></a>
|
<a class="list-inline-item" role="button" data-bs-toggle="dropdown" aria-expanded="false" ><i class="fas fa-ellipsis-h fa-fw"></i></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
{% if v.admin_level %}
|
{% if v.admin_level %}
|
||||||
<a id="distinguish-{{p.id}}" class="dropdown-item {% if p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2('/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Distinguish</a>
|
<a id="distinguish-{{p.id}}" class="dropdown-item {% if p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Distinguish</a>
|
||||||
<a id="undistinguish-{{p.id}}" class="dropdown-item {% if not p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2('/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Undistinguish</a>
|
<a id="undistinguish-{{p.id}}" class="dropdown-item {% if not p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Undistinguish</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level > 1 %}
|
{% if v.admin_level > 1 %}
|
||||||
<a id="pin-{{p.id}}" class="dropdown-item {% if p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2('/sticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Pin</a>
|
<a id="pin-{{p.id}}" class="dropdown-item {% if p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/sticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Pin</a>
|
||||||
<a id="unpin-{{p.id}}" class="dropdown-item {% if not p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2('/unsticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Unpin</a>
|
<a id="unpin-{{p.id}}" class="dropdown-item {% if not p.stickied %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/unsticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')"><i class="fas fa-thumbtack fa-rotate--45"></i>Unpin</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level > 1 or v.id == p.author.id and v.club_allowed != False %}
|
{% if v.admin_level > 1 or v.id == p.author.id and v.club_allowed != False %}
|
||||||
<a id="club-{{p.id}}" class="dropdown-item {% if p.club %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2('/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')"><i class="fas fa-eye-slash"></i>Mark club</a>
|
<a id="club-{{p.id}}" class="dropdown-item {% if p.club %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')"><i class="fas fa-eye-slash"></i>Mark club</a>
|
||||||
<a id="unclub-{{p.id}}" class="dropdown-item {% if not p.club %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2('/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')"><i class="fas fa-eye"></i>Unmark club</a>
|
<a id="unclub-{{p.id}}" class="dropdown-item {% if not p.club %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')"><i class="fas fa-eye"></i>Unmark club</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level > 1 %}
|
{% if v.admin_level > 1 %}
|
||||||
{% if "/reported/" in request.path %}
|
{% if "/reported/" in request.path %}
|
||||||
{% if v.id != p.author.id %}<a class="dropdown-item list-inline-item text-danger" role="button" onclick="post_toast('/ban_post/{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
|
{% if v.id != p.author.id %}<a class="dropdown-item list-inline-item text-danger" role="button" onclick="post_toast(this,'/ban_post/{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
|
||||||
<a class="dropdown-item list-inline-item text-success" role="button" onclick="post_toast('/unban_post/{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
|
<a class="dropdown-item list-inline-item text-success" role="button" onclick="post_toast(this,'/unban_post/{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if v.id != p.author.id %}<a id="remove-{{p.id}}" class="dropdown-item {% if p.is_banned %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast2('/ban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
|
{% if v.id != p.author.id %}<a id="remove-{{p.id}}" class="dropdown-item {% if p.is_banned %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast2(this,'/ban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')"><i class="fas fa-ban"></i>Remove</a>{% endif %}
|
||||||
<a id="approve-{{p.id}}" class="dropdown-item {% if not p.is_banned %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast2('/unban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
|
<a id="approve-{{p.id}}" class="dropdown-item {% if not p.is_banned %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast2(this,'/unban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')"><i class="fas fa-check"></i>Approve</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if p.oauth_app %}
|
{% if p.oauth_app %}
|
||||||
|
@ -289,25 +289,25 @@
|
||||||
|
|
||||||
|
|
||||||
{% if v.id != p.author_id and not p.ghost %}
|
{% if v.id != p.author_id and not p.ghost %}
|
||||||
<a id="unblock-{{p.id}}" class="dropdown-item text-success list-inline-item {% if not p.is_blocking %}d-none{% endif %}" role="button" onclick="post_toast2('/settings/unblock?username={{p.author_name}}','block-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye text-success"></i>Unblock user</a>
|
<a id="unblock-{{p.id}}" class="dropdown-item text-success list-inline-item {% if not p.is_blocking %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/settings/unblock?username={{p.author_name}}','block-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye text-success"></i>Unblock user</a>
|
||||||
|
|
||||||
<a id="block-{{p.id}}" class="dropdown-item list-inline-item text-danger {% if p.is_blocking %}d-none{% endif %}" role="button" onclick="post_toast2('/settings/block?username={{p.author_name}}','block-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye-slash text-danger"></i>Block user</a>
|
<a id="block-{{p.id}}" class="dropdown-item list-inline-item text-danger {% if p.is_blocking %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/settings/block?username={{p.author_name}}','block-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye-slash text-danger"></i>Block user</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% if p.sub and v.mods(p.sub) %}
|
{% if p.sub and v.mods(p.sub) %}
|
||||||
<a class="dropdown-item list-inline-item text-danger" role="button" onclick="post_toast('/kick/{{p.id}}')"><i class="fas fa-sign-out text-danger"></i>Kick</a>
|
<a class="dropdown-item list-inline-item text-danger" role="button" onclick="post_toast(this,'/kick/{{p.id}}')"><i class="fas fa-sign-out text-danger"></i>Kick</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% if v.id==p.author_id or v.admin_level > 1 %}
|
{% if v.id==p.author_id or v.admin_level > 1 %}
|
||||||
<a id="mark-{{p.id}}" class="dropdown-item {% if p.over_18 %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')"><i class="fas fa-eye-evil"></i>Mark +18</a>
|
<a id="mark-{{p.id}}" class="dropdown-item {% if p.over_18 %}d-none{% endif %} list-inline-item text-danger" role="button" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')"><i class="fas fa-eye-evil"></i>Mark +18</a>
|
||||||
<a id="unmark-{{p.id}}" class="dropdown-item {% if not p.over_18 %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')"><i class="fas fa-eye-evil"></i>Unmark +18</a>
|
<a id="unmark-{{p.id}}" class="dropdown-item {% if not p.over_18 %}d-none{% endif %} list-inline-item text-success" role="button" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')"><i class="fas fa-eye-evil"></i>Unmark +18</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level > 1 and v.id != p.author_id %}
|
{% if v.admin_level > 1 and v.id != p.author_id %}
|
||||||
<a id="ban-{{p.id}}" class="dropdown-item {% if p.author.is_suspended %}d-none{% endif %} list-inline-item text-danger" id="exile-comment-{{p.id}}" role="button" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{p.author.id}}', '{{p.author_name}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a>
|
<a id="ban-{{p.id}}" class="dropdown-item {% if p.author.is_suspended %}d-none{% endif %} list-inline-item text-danger" id="exile-comment-{{p.id}}" role="button" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{p.author.id}}', '{{p.author_name}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a>
|
||||||
<a id="unban-{{p.id}}" class="dropdown-item {% if not p.author.is_suspended %}d-none{% endif %} list-inline-item text-danger" id="unexile2-user-{{p.id}}" role="button" onclick="post_toast2('/unban_user/{{p.author_id}}','ban-{{p.id}}','unban-{{p.id}}')"><i class="fas fa-user-slash"></i>Unban user</a>
|
<a id="unban-{{p.id}}" class="dropdown-item {% if not p.author.is_suspended %}d-none{% endif %} list-inline-item text-danger" id="unexile2-user-{{p.id}}" role="button" onclick="post_toast2(this,'/unban_user/{{p.author_id}}','ban-{{p.id}}','unban-{{p.id}}')"><i class="fas fa-user-slash"></i>Unban user</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -411,51 +411,51 @@
|
||||||
|
|
||||||
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')"><i class="fas fa-gift text-center text-muted mr-3"></i>Give Award</button>
|
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')"><i class="fas fa-gift text-center text-muted mr-3"></i>Give Award</button>
|
||||||
|
|
||||||
<button id="subscribe2-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2('/subscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye text-center text-muted mr-3"></i>Subscribe</button>
|
<button id="subscribe2-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2(this,'/subscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye text-center text-muted mr-3"></i>Subscribe</button>
|
||||||
<button id="unsubscribe2-{{p.id}}" class="{% if not p.id in v.subscribed_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2('/unsubscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash text-center text-muted mr-3"></i>Unsubscribe</button>
|
<button id="unsubscribe2-{{p.id}}" class="{% if not p.id in v.subscribed_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2(this,'/unsubscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash text-center text-muted mr-3"></i>Unsubscribe</button>
|
||||||
|
|
||||||
<button id="save2-{{p.id}}" class="{% if p.id in v.saved_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2('/save_post/{{p.id}}','save2-{{p.id}}','unsave2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-save text-center text-muted mr-3"></i>Save</button>
|
<button id="save2-{{p.id}}" class="{% if p.id in v.saved_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2(this,'/save_post/{{p.id}}','save2-{{p.id}}','unsave2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-save text-center text-muted mr-3"></i>Save</button>
|
||||||
<button id="unsave2-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2('/unsave_post/{{p.id}}','save2-{{p.id}}','unsave2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-save text-center text-muted mr-3"></i>Unsave</button>
|
<button id="unsave2-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast2(this,'/unsave_post/{{p.id}}','save2-{{p.id}}','unsave2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-save text-center text-muted mr-3"></i>Unsave</button>
|
||||||
|
|
||||||
|
|
||||||
{% if v.id==p.author_id %}
|
{% if v.id==p.author_id %}
|
||||||
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" onclick="togglePostEdit('{{p.id}}')"><i class="far fa-edit text-center text-muted mr-3"></i>Edit</button>
|
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" onclick="togglePostEdit('{{p.id}}')"><i class="far fa-edit text-center text-muted mr-3"></i>Edit</button>
|
||||||
|
|
||||||
{% if v.admin_level == 1 %}
|
{% if v.admin_level == 1 %}
|
||||||
<button id="distinguish2-{{p.id}}" class="{% if p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2('/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Distinguish</button>
|
<button id="distinguish2-{{p.id}}" class="{% if p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Distinguish</button>
|
||||||
<button id="undistinguish2-{{p.id}}" class="{% if not p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2('/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Undistinguish</button>
|
<button id="undistinguish2-{{p.id}}" class="{% if not p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Undistinguish</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if p.private %}
|
{% if p.private %}
|
||||||
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast('/publish/{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-globe text-center text-muted mr-3"></i>Publish</button>
|
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" role="button" onclick="post_toast(this,'/publish/{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-globe text-center text-muted mr-3"></i>Publish</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if request.path.startswith('/@') %}
|
{% if request.path.startswith('/@') %}
|
||||||
<button id="pin-profile2-{{p.id}}" class="{% if p.is_pinned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-muted text-left"role="button" onclick="post_toast2('/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Pin to profile</button>
|
<button id="pin-profile2-{{p.id}}" class="{% if p.is_pinned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-muted text-left"role="button" onclick="post_toast2(this,'/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Pin to profile</button>
|
||||||
<button id="unpin-profile2-{{p.id}}" class="{% if not p.is_pinned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-muted text-left" role="button" onclick="post_toast2('/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Unpin from profile</button>
|
<button id="unpin-profile2-{{p.id}}" class="{% if not p.is_pinned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-muted text-left" role="button" onclick="post_toast2(this,'/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Unpin from profile</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
<button id="undelete-{{p.id}}" class="{% if not p.deleted_utc %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-success" role="button" onclick="post_toast2('/undelete_post/{{p.id}}', 'delete-{{p.id}}', 'undelete-{{p.id}}');document.getElementById('post-{{p.id}}').classList.remove('deleted')" data-bs-dismiss="modal"><i class="far fa-trash-alt text-center mr-3"></i>Undelete</button>
|
<button id="undelete-{{p.id}}" class="{% if not p.deleted_utc %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-success" role="button" onclick="post_toast2(this,'/undelete_post/{{p.id}}', 'delete-{{p.id}}', 'undelete-{{p.id}}');document.getElementById('post-{{p.id}}').classList.remove('deleted')" data-bs-dismiss="modal"><i class="far fa-trash-alt text-center mr-3"></i>Undelete</button>
|
||||||
|
|
||||||
<button id="delete-{{p.id}}" class="{% if p.deleted_utc %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="far fa-trash-alt mr-3"></i>Delete</button>
|
<button id="delete-{{p.id}}" class="{% if p.deleted_utc %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="far fa-trash-alt mr-3"></i>Delete</button>
|
||||||
|
|
||||||
|
|
||||||
{% if v.club_allowed != False %}
|
{% if v.club_allowed != False %}
|
||||||
<button id="club3-{{p.id}}" class="{% if p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast2('/toggle_club/{{p.id}}','club3-{{p.id}}','unclub3-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash mr-3"></i>Mark club</button>
|
<button id="club3-{{p.id}}" class="{% if p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club3-{{p.id}}','unclub3-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash mr-3"></i>Mark club</button>
|
||||||
<button id="unclub3-{{p.id}}" class="{% if not p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast2('/toggle_club/{{p.id}}','club3-{{p.id}}','unclub3-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye mr-3"></i>Unmark club</button>
|
<button id="unclub3-{{p.id}}" class="{% if not p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club3-{{p.id}}','unclub3-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye mr-3"></i>Unmark club</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<button id="mark3-{{p.id}}" class="{% if p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark3-{{p.id}}','unmark3-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center mr-3"></i>Mark +18</button>
|
<button id="mark3-{{p.id}}" class="{% if p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark3-{{p.id}}','unmark3-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center mr-3"></i>Mark +18</button>
|
||||||
<button id="unmark3-{{p.id}}" class="{% if not p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-success" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark3-{{p.id}}','unmark3-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center mr-3"></i>Unmark +18</button>
|
<button id="unmark3-{{p.id}}" class="{% if not p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-success" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark3-{{p.id}}','unmark3-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center mr-3"></i>Unmark +18</button>
|
||||||
{% elif not p.ghost %}
|
{% elif not p.ghost %}
|
||||||
<button id="unblock2-{{p.id}}" class="nobackground btn btn-link btn-block btn-lg text-success text-left{% if not p.is_blocking %} d-none{% endif %}" data-bs-dismiss="modal" onclick="post_toast2('/settings/unblock?username={{p.author_name}}','block2-{{p.id}}','unblock2-{{p.id}}')"><i class="fas fa-eye mr-3"></i>Unblock user</button>
|
<button id="unblock2-{{p.id}}" class="nobackground btn btn-link btn-block btn-lg text-success text-left{% if not p.is_blocking %} d-none{% endif %}" data-bs-dismiss="modal" onclick="post_toast2(this,'/settings/unblock?username={{p.author_name}}','block2-{{p.id}}','unblock2-{{p.id}}')"><i class="fas fa-eye mr-3"></i>Unblock user</button>
|
||||||
<button id="prompt2-{{p.id}}" class="blockuser nobackground btn btn-link btn-block btn-lg text-danger text-left d-none" data-bs-dismiss="modal" onclick="post_toast2('/settings/block?username={{p.author_name}}','prompt2-{{p.id}}','unblock2-{{p.id}}')"><i class="fas fa-eye-slash mr-3"></i>Are you sure?</button>
|
<button id="prompt2-{{p.id}}" class="blockuser nobackground btn btn-link btn-block btn-lg text-danger text-left d-none" data-bs-dismiss="modal" onclick="post_toast2(this,'/settings/block?username={{p.author_name}}','prompt2-{{p.id}}','unblock2-{{p.id}}')"><i class="fas fa-eye-slash mr-3"></i>Are you sure?</button>
|
||||||
<button id="block2-{{p.id}}" class="blockuser nobackground btn btn-link btn-block btn-lg text-danger text-left{% if p.is_blocking %} d-none{% endif %}" onclick="document.getElementById('block2-{{p.id}}').classList.toggle('d-none');document.getElementById('prompt2-{{p.id}}').classList.toggle('d-none');"><i class="fas fa-eye-slash mr-3"></i>Block user</button>
|
<button id="block2-{{p.id}}" class="blockuser nobackground btn btn-link btn-block btn-lg text-danger text-left{% if p.is_blocking %} d-none{% endif %}" onclick="document.getElementById('block2-{{p.id}}').classList.toggle('d-none');document.getElementById('prompt2-{{p.id}}').classList.toggle('d-none');"><i class="fas fa-eye-slash mr-3"></i>Block user</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if p.sub and v.mods(p.sub) %}
|
{% if p.sub and v.mods(p.sub) %}
|
||||||
<button class="nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast('/kick/{{p.id}}')"><i class="fas fa-sign-out text-danger text-center mr-3"></i>Kick</button>
|
<button class="nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast(this,'/kick/{{p.id}}')"><i class="fas fa-sign-out text-danger text-center mr-3"></i>Kick</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -476,33 +476,33 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<ul class="list-group post-actions">
|
<ul class="list-group post-actions">
|
||||||
<button id="club2-{{p.id}}" class="{% if p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-info text-left" role="button" onclick="post_toast2('/toggle_club/{{p.id}}','club2-{{p.id}}','unclub2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash mr-3"></i>Mark club</button>
|
<button id="club2-{{p.id}}" class="{% if p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-info text-left" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club2-{{p.id}}','unclub2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash mr-3"></i>Mark club</button>
|
||||||
<button id="unclub2-{{p.id}}" class="{% if not p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-info text-left" role="button" onclick="post_toast2('/toggle_club/{{p.id}}','club2-{{p.id}}','unclub2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye mr-3"></i>Unmark club</button>
|
<button id="unclub2-{{p.id}}" class="{% if not p.club %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-info text-left" role="button" onclick="post_toast2(this,'/toggle_club/{{p.id}}','club2-{{p.id}}','unclub2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye mr-3"></i>Unmark club</button>
|
||||||
|
|
||||||
<button id="distinguish2-{{p.id}}" class="{% if p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2('/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Distinguish</button>
|
<button id="distinguish2-{{p.id}}" class="{% if p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Distinguish</button>
|
||||||
<button id="undistinguish2-{{p.id}}" class="{% if not p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2('/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Undistinguish</button>
|
<button id="undistinguish2-{{p.id}}" class="{% if not p.distinguish_level %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-crown text-center mr-3"></i>Undistinguish</button>
|
||||||
|
|
||||||
<button id="pin2-{{p.id}}" class="{% if p.stickied %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2('/sticky/{{p.id}}','pin2-{{p.id}}','unpin2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Pin</button>
|
<button id="pin2-{{p.id}}" class="{% if p.stickied %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2(this,'/sticky/{{p.id}}','pin2-{{p.id}}','unpin2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Pin</button>
|
||||||
<button id="unpin2-{{p.id}}" class="{% if not p.stickied %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2('/unsticky/{{p.id}}','pin2-{{p.id}}','unpin2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Unpin</button>
|
<button id="unpin2-{{p.id}}" class="{% if not p.stickied %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left" role="button" onclick="post_toast2(this,'/unsticky/{{p.id}}','pin2-{{p.id}}','unpin2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Unpin</button>
|
||||||
|
|
||||||
{% if "/reported/" in request.path %}
|
{% if "/reported/" in request.path %}
|
||||||
<button class="nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast('/ban_post/{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-ban text-center mr-3"></i>Remove</button>
|
<button class="nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast(this,'/ban_post/{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-ban text-center mr-3"></i>Remove</button>
|
||||||
<button class="nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast('/unban_post/{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-check text-center mr-3"></i>Approve</button>
|
<button class="nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast(this,'/unban_post/{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-check text-center mr-3"></i>Approve</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
<button id="remove2-{{p.id}}" class="{% if p.is_banned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast2('/ban_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-ban text-center mr-3"></i>Remove</button>
|
<button id="remove2-{{p.id}}" class="{% if p.is_banned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button" onclick="post_toast2(this,'/ban_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-ban text-center mr-3"></i>Remove</button>
|
||||||
<button id="approve2-{{p.id}}" class="{% if not p.is_banned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast2('/unban_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-check text-center mr-3"></i>Approve</button>
|
<button id="approve2-{{p.id}}" class="{% if not p.is_banned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast2(this,'/unban_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-check text-center mr-3"></i>Approve</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if p.oauth_app %}
|
{% if p.oauth_app %}
|
||||||
<a href="{{p.oauth_app.permalink}}"><button class="nobackground btn btn-link btn-block btn-lg text-muted text-left"><i class="far fa-code text-center text-info mr-3"></i>API App</button></a>
|
<a href="{{p.oauth_app.permalink}}"><button class="nobackground btn btn-link btn-block btn-lg text-muted text-left"><i class="far fa-code text-center text-info mr-3"></i>API App</button></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<button id="mark2-{{p.id}}" class="{% if p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center text-danger mr-3"></i>Mark +18</button>
|
<button id="mark2-{{p.id}}" class="{% if p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center text-danger mr-3"></i>Mark +18</button>
|
||||||
<button id="unmark2-{{p.id}}" class="{% if not p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center text-danger mr-3"></i>Unmark +18</button>
|
<button id="unmark2-{{p.id}}" class="{% if not p.over_18 %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast2(this,'/toggle_post_nsfw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-eye-evil text-center text-danger mr-3"></i>Unmark +18</button>
|
||||||
|
|
||||||
{% if v.id != p.author_id %}
|
{% if v.id != p.author_id %}
|
||||||
<button id="ban2-{{p.id}}" data-bs-dismiss="modal" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{p.author.id}}', '{{p.author_name}}')" class="{% if p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button"><i class="fas fa-user-minus mr-3"></i>Ban user</button>
|
<button id="ban2-{{p.id}}" data-bs-dismiss="modal" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{p.author.id}}', '{{p.author_name}}')" class="{% if p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" role="button"><i class="fas fa-user-minus mr-3"></i>Ban user</button>
|
||||||
<button id="unban2-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast2('/unban_user/{{p.author_id}}','ban2-{{p.id}}','unban2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-user-minus mr-3"></i>Unban user</button>
|
<button id="unban2-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" role="button" onclick="post_toast2(this,'/unban_user/{{p.author_id}}','ban2-{{p.id}}','unban2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-user-minus mr-3"></i>Unban user</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
{% if v.id!=u.id and not u.is_private and not u.is_nofollow %}
|
{% if v.id!=u.id and not u.is_private and not u.is_nofollow %}
|
||||||
<div id="button-sub-{{u.id}}" style="z-index: 2" class="{% if u.has_follower(v) %}d-none{% endif %}"><a class="btn btn-primary " role="button" onclick="post_toast2('/follow/{{u.username}}','button-sub-{{u.id}}','button-unsub-{{u.id}}')">Follow</a></div>
|
<div id="button-sub-{{u.id}}" style="z-index: 2" class="{% if u.has_follower(v) %}d-none{% endif %}"><a class="btn btn-primary " role="button" onclick="post_toast2(this,'/follow/{{u.username}}','button-sub-{{u.id}}','button-unsub-{{u.id}}')">Follow</a></div>
|
||||||
|
|
||||||
{% if not u.fish %}<div id="button-unsub-{{u.id}}" style="z-index: 2" class="{% if not u.has_follower(v) %} d-none{% endif %}"><a class="btn btn-secondary " role="button" onclick="post_toast2('/unfollow/{{u.username}}','button-sub-{{u.id}}','button-unsub-{{u.id}}')">Unfollow</a></div>{% endif %}
|
{% if not u.fish %}<div id="button-unsub-{{u.id}}" style="z-index: 2" class="{% if not u.has_follower(v) %} d-none{% endif %}"><a class="btn btn-secondary " role="button" onclick="post_toast2(this,'/unfollow/{{u.username}}','button-sub-{{u.id}}','button-unsub-{{u.id}}')">Unfollow</a></div>{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div id="button-sub-{{u.id}}" style="z-index: 2" "><a class="btn btn-primary " href="/signup?redirect={{request.path}}">Follow</a></div>
|
<div id="button-sub-{{u.id}}" style="z-index: 2" "><a class="btn btn-primary " href="/signup?redirect={{request.path}}">Follow</a></div>
|
||||||
|
|
|
@ -163,24 +163,24 @@
|
||||||
<div class="d-flex justify-content-between align-items-center">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<div>
|
<div>
|
||||||
{% if v and v.id != u.id %}
|
{% if v and v.id != u.id %}
|
||||||
{% if not u.fish %}<a id="button-unsub" class="btn btn-secondary {% if not is_following %}d-none{% endif %}" role="button" onclick="post_toast2('/unfollow/{{u.username}}','button-unsub','button-sub')">Unfollow</a>{% endif %}
|
{% if not u.fish %}<a id="button-unsub" class="btn btn-secondary {% if not is_following %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/unfollow/{{u.username}}','button-unsub','button-sub')">Unfollow</a>{% endif %}
|
||||||
<a id="button-sub" class="btn btn-primary {% if is_following or u.is_nofollow or u.is_blocked %}d-none{% endif %}" role="button" onclick="post_toast2('/follow/{{u.username}}','button-unsub','button-sub')">Follow</a>
|
<a id="button-sub" class="btn btn-primary {% if is_following or u.is_nofollow or u.is_blocked %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/follow/{{u.username}}','button-unsub','button-sub')">Follow</a>
|
||||||
<a class="btn btn-primary" role="button" onclick="toggleElement('profile-toggleable', 'message', 'input-message')">Message</a>
|
<a class="btn btn-primary" role="button" onclick="toggleElement('profile-toggleable', 'message', 'input-message')">Message</a>
|
||||||
|
|
||||||
<a class="btn btn-primary" role="button" onclick="post_toast('/@{{u.username}}/suicide')">Get them help</a>
|
<a class="btn btn-primary" role="button" onclick="post_toast(this,'/@{{u.username}}/suicide')">Get them help</a>
|
||||||
<a class="btn btn-primary" role="button" onclick="toggleElement('profile-toggleable', 'coin-transfer', 'coin-transfer-amount')">Gift coins</a>
|
<a class="btn btn-primary" role="button" onclick="toggleElement('profile-toggleable', 'coin-transfer', 'coin-transfer-amount')">Gift coins</a>
|
||||||
<a class="btn btn-primary" role="button" onclick="toggleElement('profile-toggleable', 'bux-transfer', 'bux-transfer-amount')">Gift Marseybux</a>
|
<a class="btn btn-primary" role="button" onclick="toggleElement('profile-toggleable', 'bux-transfer', 'bux-transfer-amount')">Gift Marseybux</a>
|
||||||
|
|
||||||
{% if v.admin_level > 2 %}
|
{% if v.admin_level > 2 %}
|
||||||
<a id="admin" class="{% if u.admin_level > 1 %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2('/@{{u.username}}/make_admin','admin','unadmin')">Make admin</a>
|
<a id="admin" class="{% if u.admin_level > 1 %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2(this,'/@{{u.username}}/make_admin','admin','unadmin')">Make admin</a>
|
||||||
|
|
||||||
<a id="unadmin" class="{% if u.admin_level < 2 %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2('/@{{u.username}}/remove_admin','admin','unadmin')">Remove admin</a>
|
<a id="unadmin" class="{% if u.admin_level < 2 %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2(this,'/@{{u.username}}/remove_admin','admin','unadmin')">Remove admin</a>
|
||||||
|
|
||||||
<a id="memeadmin" class="{% if u.admin_level == 1%}d-none{% endif %} btn btn-primary" role="button" onclick="post_toast2('/@{{u.username}}/make_meme_admin','memeadmin','unmemeadmin')">Make meme admin</a>
|
<a id="memeadmin" class="{% if u.admin_level == 1%}d-none{% endif %} btn btn-primary" role="button" onclick="post_toast2(this,'/@{{u.username}}/make_meme_admin','memeadmin','unmemeadmin')">Make meme admin</a>
|
||||||
<a id="unmemeadmin" class="{% if u.admin_level != 1 %}d-none{% endif %} btn btn-primary" role="button" onclick="post_toast2('/@{{u.username}}/remove_meme_admin','memeadmin','unmemeadmin')">Remove meme admin</a>
|
<a id="unmemeadmin" class="{% if u.admin_level != 1 %}d-none{% endif %} btn btn-primary" role="button" onclick="post_toast2(this,'/@{{u.username}}/remove_meme_admin','memeadmin','unmemeadmin')">Remove meme admin</a>
|
||||||
|
|
||||||
{% if u.admin_level > 1 %}
|
{% if u.admin_level > 1 %}
|
||||||
<a class="btn btn-primary" role="button" onclick="post_toast('/@{{u.username}}/revert_actions')">Revert admin actions</a>
|
<a class="btn btn-primary" role="button" onclick="post_toast(this,'/@{{u.username}}/revert_actions')">Revert admin actions</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -272,20 +272,20 @@
|
||||||
<input autocomplete="off" type="number" step="any" name="days" class="form-control" placeholder="Days (0 or blank = permanent)" >
|
<input autocomplete="off" type="number" step="any" name="days" class="form-control" placeholder="Days (0 or blank = permanent)" >
|
||||||
<input autocomplete="off" type="submit" class="btn btn-danger" value="Lock Chud Theme" >
|
<input autocomplete="off" type="submit" class="btn btn-danger" value="Lock Chud Theme" >
|
||||||
</form>
|
</form>
|
||||||
<a id="unagendaposter" class="{% if not u.agendaposter %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2('/unagendaposter/{{u.id}}','agendaposter1','unagendaposter')">Disable Chud Theme</a>
|
<a id="unagendaposter" class="{% if not u.agendaposter %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2(this,'/unagendaposter/{{u.id}}','agendaposter1','unagendaposter')">Disable Chud Theme</a>
|
||||||
|
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
|
|
||||||
<a id="shadowban" class="{% if u.shadowbanned %}d-none{% endif %} btn btn-danger" role="button" onclick="post_toast2('/shadowban/{{u.id}}','shadowban','unshadowban')">Shadowban</a>
|
<a id="shadowban" class="{% if u.shadowbanned %}d-none{% endif %} btn btn-danger" role="button" onclick="post_toast2(this,'/shadowban/{{u.id}}','shadowban','unshadowban')">Shadowban</a>
|
||||||
|
|
||||||
<a id="unshadowban" class="{% if not u.shadowbanned %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2('/unshadowban/{{u.id}}','shadowban','unshadowban')">Unshadowban</a>
|
<a id="unshadowban" class="{% if not u.shadowbanned %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2(this,'/unshadowban/{{u.id}}','shadowban','unshadowban')">Unshadowban</a>
|
||||||
|
|
||||||
|
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
|
|
||||||
{% if v.admin_level > 2 %}
|
{% if v.admin_level > 2 %}
|
||||||
<a id="verify" class="{% if u.verified %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2('/admin/verify/{{u.id}}','verify','unverify')">Verify</a>
|
<a id="verify" class="{% if u.verified %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2(this,'/admin/verify/{{u.id}}','verify','unverify')">Verify</a>
|
||||||
<a id="unverify" class="{% if not u.verified %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2('/admin/unverify/{{u.id}}','verify','unverify')">Unverify</a>
|
<a id="unverify" class="{% if not u.verified %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2(this,'/admin/unverify/{{u.id}}','verify','unverify')">Unverify</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
|
@ -301,8 +301,8 @@
|
||||||
<input autocomplete="off" type="submit" class="btn btn-danger" value="Remove User's Content">
|
<input autocomplete="off" type="submit" class="btn btn-danger" value="Remove User's Content">
|
||||||
</form>
|
</form>
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
<button id="grant2" class="{% if u.paid_dues %}d-none{% endif %} btn btn-success" onclick="post_toast2('/@{{u.username}}/club_allow','grant2','bar2')">Grant club access</button>
|
<button id="grant2" class="{% if u.paid_dues %}d-none{% endif %} btn btn-success" onclick="post_toast2(this,'/@{{u.username}}/club_allow','grant2','bar2')">Grant club access</button>
|
||||||
<button id="bar2" class="{% if u.club_allowed == False %}d-none{% endif %} btn btn-danger" onclick="post_toast2('/@{{u.username}}/club_ban','grant2','bar2')">Bar from club</button>
|
<button id="bar2" class="{% if u.club_allowed == False %}d-none{% endif %} btn btn-danger" onclick="post_toast2(this,'/@{{u.username}}/club_ban','grant2','bar2')">Bar from club</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
<p>User ID: {{u.id}}</p>
|
<p>User ID: {{u.id}}</p>
|
||||||
|
@ -468,23 +468,23 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.id != u.id %}
|
{% if v and v.id != u.id %}
|
||||||
{% if not u.fish %}<a id="button-unsub2" class="btn btn-secondary {% if not is_following %}d-none{% endif %}" role="button" onclick="post_toast2('/unfollow/{{u.username}}','button-unsub2','button-sub2')">Unfollow</a>{% endif %}
|
{% if not u.fish %}<a id="button-unsub2" class="btn btn-secondary {% if not is_following %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/unfollow/{{u.username}}','button-unsub2','button-sub2')">Unfollow</a>{% endif %}
|
||||||
<a id="button-sub2" class="btn btn-primary {% if is_following or u.is_nofollow or u.is_blocked %}d-none{% endif %}" role="button" onclick="post_toast2('/follow/{{u.username}}','button-unsub2','button-sub2')">Follow</a>
|
<a id="button-sub2" class="btn btn-primary {% if is_following or u.is_nofollow or u.is_blocked %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/follow/{{u.username}}','button-unsub2','button-sub2')">Follow</a>
|
||||||
<a class="btn btn-primary" role="button" onclick="toggleElement('profile-toggleable-mobile', 'message-mobile', 'input-message-mobile')">Message</a>
|
<a class="btn btn-primary" role="button" onclick="toggleElement('profile-toggleable-mobile', 'message-mobile', 'input-message-mobile')">Message</a>
|
||||||
<a class="btn btn-primary" role="button" onclick="post_toast('/@{{u.username}}/suicide')">Get them help</a>
|
<a class="btn btn-primary" role="button" onclick="post_toast(this,'/@{{u.username}}/suicide')">Get them help</a>
|
||||||
<a class="btn btn-primary" role="button" onclick="toggleElement('profile-toggleable-mobile', 'coin-transfer-mobile', 'coin-transfer-amount-mobile')">Gift coins</a>
|
<a class="btn btn-primary" role="button" onclick="toggleElement('profile-toggleable-mobile', 'coin-transfer-mobile', 'coin-transfer-amount-mobile')">Gift coins</a>
|
||||||
<a class="btn btn-primary" role="button" onclick="toggleElement('profile-toggleable', 'bux-transfer-mobile', 'bux-transfer-amount-mobile')">Gift Marseybux</a>
|
<a class="btn btn-primary" role="button" onclick="toggleElement('profile-toggleable', 'bux-transfer-mobile', 'bux-transfer-amount-mobile')">Gift Marseybux</a>
|
||||||
|
|
||||||
{% if v.admin_level > 2 %}
|
{% if v.admin_level > 2 %}
|
||||||
<a id="admin2" class="{% if u.admin_level > 1 %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2('/@{{u.username}}/make_admin','admin2','unadmin2')">Make admin</a>
|
<a id="admin2" class="{% if u.admin_level > 1 %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2(this,'/@{{u.username}}/make_admin','admin2','unadmin2')">Make admin</a>
|
||||||
|
|
||||||
<a id="unadmin2" class="{% if u.admin_level < 2 %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2('/@{{u.username}}/remove_admin','admin2','unadmin2')">Remove admin</a>
|
<a id="unadmin2" class="{% if u.admin_level < 2 %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2(this,'/@{{u.username}}/remove_admin','admin2','unadmin2')">Remove admin</a>
|
||||||
|
|
||||||
<a id="memeadmin2" class="{% if u.admin_level == 1%}d-none{% endif %} btn btn-primary" role="button" onclick="post_toast2('/@{{u.username}}/make_meme_admin','memeadmin2','unmemeadmin2')">Make meme admin</a>
|
<a id="memeadmin2" class="{% if u.admin_level == 1%}d-none{% endif %} btn btn-primary" role="button" onclick="post_toast2(this,'/@{{u.username}}/make_meme_admin','memeadmin2','unmemeadmin2')">Make meme admin</a>
|
||||||
<a id="unmemeadmin2" class="{% if u.admin_level != 1 %}d-none{% endif %} btn btn-primary" role="button" onclick="post_toast2('/@{{u.username}}/remove_meme_admin','memeadmin2','unmemeadmin2')">Remove meme admin</a>
|
<a id="unmemeadmin2" class="{% if u.admin_level != 1 %}d-none{% endif %} btn btn-primary" role="button" onclick="post_toast2(this,'/@{{u.username}}/remove_meme_admin','memeadmin2','unmemeadmin2')">Remove meme admin</a>
|
||||||
|
|
||||||
{% if u.admin_level > 1 %}
|
{% if u.admin_level > 1 %}
|
||||||
<a class="btn btn-primary" role="button" onclick="post_toast('/@{{u.username}}/revert_actions')">Revert admin actions</a>
|
<a class="btn btn-primary" role="button" onclick="post_toast(this,'/@{{u.username}}/revert_actions')">Revert admin actions</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -520,8 +520,8 @@
|
||||||
|
|
||||||
{% if v.admin_level > 1 %}
|
{% if v.admin_level > 1 %}
|
||||||
|
|
||||||
<button id="grant" class="{% if u.paid_dues %}d-none{% endif %} btn btn-success" onclick="post_toast2('/@{{u.username}}/club_allow','grant','bar')">Grant club access</button>
|
<button id="grant" class="{% if u.paid_dues %}d-none{% endif %} btn btn-success" onclick="post_toast2(this,'/@{{u.username}}/club_allow','grant','bar')">Grant club access</button>
|
||||||
<button id="bar" class="{% if u.club_allowed == False %}d-none{% endif %} btn btn-danger" onclick="post_toast2('/@{{u.username}}/club_ban','grant','bar')">Bar from club</button>
|
<button id="bar" class="{% if u.club_allowed == False %}d-none{% endif %} btn btn-danger" onclick="post_toast2(this,'/@{{u.username}}/club_ban','grant','bar')">Bar from club</button>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
<div class="body d-lg-flex border-bottom">
|
<div class="body d-lg-flex border-bottom">
|
||||||
|
@ -574,20 +574,20 @@
|
||||||
<input autocomplete="off" type="number" step="any" name="days" class="form-control" placeholder="Days (0 or blank = permanent)" >
|
<input autocomplete="off" type="number" step="any" name="days" class="form-control" placeholder="Days (0 or blank = permanent)" >
|
||||||
<input autocomplete="off" type="submit" class="btn btn-danger" value="Lock Chud Theme" >
|
<input autocomplete="off" type="submit" class="btn btn-danger" value="Lock Chud Theme" >
|
||||||
</form>
|
</form>
|
||||||
<a id="unagendaposter2" class="{% if not u.agendaposter %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2('/unagendaposter/{{u.id}}','agendaposter2','unagendaposter2')">Disable Chud Theme</a>
|
<a id="unagendaposter2" class="{% if not u.agendaposter %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2(this,'/unagendaposter/{{u.id}}','agendaposter2','unagendaposter2')">Disable Chud Theme</a>
|
||||||
|
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
|
|
||||||
<a id="shadowban2" class="{% if u.shadowbanned %}d-none{% endif %} btn btn-danger" role="button" onclick="post_toast2('/shadowban/{{u.id}}','shadowban2','unshadowban2')">Shadowban</a>
|
<a id="shadowban2" class="{% if u.shadowbanned %}d-none{% endif %} btn btn-danger" role="button" onclick="post_toast2(this,'/shadowban/{{u.id}}','shadowban2','unshadowban2')">Shadowban</a>
|
||||||
|
|
||||||
<a id="unshadowban2" class="{% if not u.shadowbanned %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2('/unshadowban/{{u.id}}','shadowban2','unshadowban2')">Unshadowban</a>
|
<a id="unshadowban2" class="{% if not u.shadowbanned %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2(this,'/unshadowban/{{u.id}}','shadowban2','unshadowban2')">Unshadowban</a>
|
||||||
|
|
||||||
|
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
|
|
||||||
{% if v.admin_level > 2 %}
|
{% if v.admin_level > 2 %}
|
||||||
<a id="verify2" class="{% if u.verified %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2('/admin/verify/{{u.id}}','verify2','unverify2')">Verify</a>
|
<a id="verify2" class="{% if u.verified %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2(this,'/admin/verify/{{u.id}}','verify2','unverify2')">Verify</a>
|
||||||
<a id="unverify2" class="{% if not u.verified %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2('/admin/unverify/{{u.id}}','verify2','unverify2')">Unverify</a>
|
<a id="unverify2" class="{% if not u.verified %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2(this,'/admin/unverify/{{u.id}}','verify2','unverify2')">Unverify</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
|
@ -726,7 +726,7 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<div id='tax' class="d-none">{% if v.patron or u.patron or v.alts_patron or u.alts_patron %}0{% else %}0.03{% endif %}</div>
|
<div id='tax' class="d-none">{% if v.patron or u.patron or v.alts_patron or u.alts_patron %}0{% else %}0.03{% endif %}</div>
|
||||||
<script src="/static/assets/js/userpage_v.js?a=241"></script>
|
<script src="/static/assets/js/userpage_v.js?a=242"></script>
|
||||||
<div id="username" class="d-none">{{u.username}}</div>
|
<div id="username" class="d-none">{{u.username}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<div id='tax' class="d-none">{% if v.patron or u.patron %}0{% else %}0.03{% endif %}</div>
|
<div id='tax' class="d-none">{% if v.patron or u.patron %}0{% else %}0.03{% endif %}</div>
|
||||||
<script src="/static/assets/js/userpage_v.js?a=241"></script>
|
<script src="/static/assets/js/userpage_v.js?a=242"></script>
|
||||||
<div id="username" class="d-none">{{u.username}}</div>
|
<div id="username" class="d-none">{{u.username}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,11 @@
|
||||||
<p class="text-muted">This user has enabled private mode to cloak their posting history.</p>
|
<p class="text-muted">This user has enabled private mode to cloak their posting history.</p>
|
||||||
{% if u.id == LLM_ID %}
|
{% if u.id == LLM_ID %}
|
||||||
{% if v and v.coins > 500 and not v.is_suspended %}
|
{% if v and v.coins > 500 and not v.is_suspended %}
|
||||||
<a class="btn btn-primary" role="button", onclick="post_toast('/pay_rent', '1')">Pay rent to view profile (500 coins)</a>
|
<a class="btn btn-primary" role="button", onclick="post_toast(this,'/pay_rent', '1')">Pay rent to view profile (500 coins)</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
{% if v and v.coins > 5000 and time - v.created_utc > 604800 and not v.is_suspended %}
|
{% if v and v.coins > 5000 and time - v.created_utc > 604800 and not v.is_suspended %}
|
||||||
<a class="btn btn-primary" role="button", onclick="post_toast('/steal', '1')">Attempt to steal coins</a>
|
<a class="btn btn-primary" role="button", onclick="post_toast(this,'/steal', '1')">Attempt to steal coins</a>
|
||||||
<div class="text-small-extra text-muted mt-1">Landlords, like all other men, love to reap where they never sowed.</div>
|
<div class="text-small-extra text-muted mt-1">Landlords, like all other men, love to reap where they never sowed.</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<pre>
|
<pre>
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<div id='tax' class="d-none">{% if v.patron or u.patron %}0{% else %}0.03{% endif %}</div>
|
<div id='tax' class="d-none">{% if v.patron or u.patron %}0{% else %}0.03{% endif %}</div>
|
||||||
<script src="/static/assets/js/userpage_v.js?a=241"></script>
|
<script src="/static/assets/js/userpage_v.js?a=242"></script>
|
||||||
<div id="username" class="d-none">{{u.username}}</div>
|
<div id="username" class="d-none">{{u.username}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue