Merge branch 'master' into feature-special-posting-logic

pull/76/head
justcool393 2022-12-15 16:55:02 -06:00
commit ab794c2240
12 changed files with 16 additions and 15 deletions

View File

@ -6469,7 +6469,7 @@ div.markdown {
scrollbar-width: none;
-ms-overflow-style: none;
max-height: 70vh !important;
max-width: 65vw !important;
max-width: 100vw !important;
}
.resizable::-webkit-scrollbar {
background: transparent;
@ -6478,7 +6478,7 @@ div.markdown {
height: 100% !important;
width: 100% !important;
max-height: 70vh !important;
max-width: 65vw !important;
max-width: 100vw !important;
margin: 0 !important;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -812,6 +812,7 @@ class User(Base):
def json(self):
if self.is_suspended:
return {'username': self.username,
'original_username': self.original_username,
'url': self.url,
'is_banned': True,
'is_permanent_ban': not bool(self.unban_utc),
@ -822,6 +823,7 @@ class User(Base):
return {'username': self.username,
'original_username': self.original_username,
'url': self.url,
'is_banned': bool(self.is_banned),
'created_utc': self.created_utc,

View File

@ -140,7 +140,7 @@ def process_image(filename:str, v, resize=0, trim=False, uploader_id:Optional[in
try:
with Image.open(filename) as i:
params = ["/usr/bin/convert", filename, "-coalesce", "-quality", "88"]
params = ["convert", filename, "-coalesce", "-quality", "88"]
if trim and len(list(Iterator(i))) == 1:
params.append("-trim")
if resize and i.width > resize:

View File

@ -233,7 +233,7 @@ def sanitize_settings_text(sanitized:Optional[str], max_length:Optional[int]=Non
return sanitized
@with_sigalrm_timeout(5)
@with_sigalrm_timeout(10)
def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys=False, torture=False, sidebar=False):
sanitized = sanitized.strip()

View File

@ -341,7 +341,7 @@ def shadowbanned(v):
.filter(
User.shadowbanned != None,
) \
.order_by(nullslast(User.last_active.desc())).all()
.order_by(User.truescore.desc()).all()
return render_template("admin/shadowbanned.html", v=v, users=users)

View File

@ -176,7 +176,7 @@ def banned(v:User):
or_(User.unban_utc == 0, User.unban_utc > time.time()),
)
if v.admin_level >= PERMS['VIEW_LAST_ACTIVE']:
users = users.order_by(nullslast(User.last_active.desc()))
users = users.order_by(User.truescore.desc())
if not v.can_see_shadowbanned:
users = users.filter(User.shadowbanned == None)
users = users.all()
@ -201,7 +201,7 @@ def chuds(v:User):
or_(User.agendaposter == 1, User.agendaposter > time.time()),
)
if v.admin_level >= PERMS['VIEW_LAST_ACTIVE']:
users = users.order_by(nullslast(User.last_active.desc()))
users = users.order_by(User.truescore.desc())
if not v.can_see_shadowbanned:
users = users.filter(User.shadowbanned == None)
users = users.order_by(User.username).all()

View File

@ -22,7 +22,7 @@
<td {% if user.last_active %}data-time="{{user.last_active}}"{% endif %}></td>
<td>{{user.truescore}}</td>
<td><a href="/@{{user.shadowbanner}}">{{user.shadowbanner}}</a></td>
<td>{% if user.ban_reason %}{{user.ban_reason}}{% endif %}</td>
<td>{% if user.ban_reason %}{{user.ban_reason | safe}}{% else %}<span class="text-muted" style="font-style:italic;">No reason</span>{% endif %}</td>
</tr>
{% endfor %}
</table>

View File

@ -25,7 +25,7 @@
<td {% if user.last_active %}data-time="{{user.last_active}}"{% endif %}></td>
{%- endif %}
<td>{{user.truescore}}</td>
<td>{% if user.ban_reason %}{{user.ban_reason}}{% endif %}</td>
<td>{% if user.ban_reason %}{{user.ban_reason | safe}}{% else %}<span class="text-muted" style="font-style:italic;">No reason</span>{% endif %}</td>
{% with user=user.banned_by %}
<td data-sort-key="{{user.username.lower() if user else ''}}">
{% include "user_in_table.html" %}

View File

@ -849,7 +849,8 @@
<div id="viewmore-{{offset}}"><button type="button" id="viewbtn" class="btn btn-primary" onclick="viewmore({{pid}},'{{sort}}',{{offset}},{{ids}})">VIEW MORE COMMENTS</a></div>
{% endif %}
{% if SITE_NAME == 'rDrama' and not request.headers.get("xhr") and v and 'SamsungBrowser' not in g.agent and not v.background and not (u and u.profile_background) %}
{# TODO: disabled pending fix #}
{% if false %}
<div id="detection" style="display:none;background-color:canvas;color-scheme:light"></div>
<script>
const detectionDiv = document.querySelector('#detection');

View File

@ -83,11 +83,9 @@
<input autocomplete="off" type="checkbox" class="custom-control-input" id="post-private" name="private" onchange="savetext()">
<label class="custom-control-label" for="post-private">Draft</label>
</div>
<div class="custom-control custom-checkbox mb-5">
{% if v.can_post_in_ghost_threads %}
<input onchange='ghost_toggle(this)' autocomplete="off" type="checkbox" class="custom-control-input" id="post-ghost" name="ghost">
<label class="custom-control-label" for="post-ghost">Ghost thread</label>
{% endif %}
<div class="custom-control custom-checkbox mb-5 {% if not v.can_post_in_ghost_threads %}d-none{% endif %}">
<input onchange='ghost_toggle(this)' autocomplete="off" type="checkbox" class="custom-control-input" id="post-ghost" name="ghost">
<label class="custom-control-label" for="post-ghost">Ghost thread</label>
</div>
</div>
</div>