forked from rDrama/rDrama
1
0
Fork 0

Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost

master
Aevann1 2022-10-08 08:08:35 +02:00
commit 745184acc6
8 changed files with 92 additions and 82 deletions

View File

@ -5569,15 +5569,20 @@ audio, video {
font-size: 0.95rem;
}
#sidebar-wpd--flairs {
.sidebar-wpd--flairs {
display: grid;
align-items: center;
grid-template-columns: repeat(3, 1fr);
margin-bottom: 2rem;
grid-gap: 1px;
}
#sidebar-wpd--flairs a {
.sidebar-wpd--flairs--3 {
grid-template-columns: repeat(3, 1fr);
}
.sidebar-wpd--flairs--2 {
grid-template-columns: repeat(2, 1fr);
}
.sidebar-wpd--flairs a {
padding: 5px 5px 4px 5px;
text-align: center;
color: var(--muted);
@ -5585,20 +5590,11 @@ audio, video {
box-shadow: 0 0 0 1px var(--primary);
}
#sidebar-wpd--flairs a:hover {
.sidebar-wpd--flairs a:hover {
color: #fff;
text-decoration: none;
}
#sidebar-lgb--host-notice img {
display: block;
margin: 1.5rem auto 1rem auto;
}
#sidebar-lgb--host-notice a {
display: block;
text-align: center;
}
#sidebar--directory--head {
display: block;
font-size: 1.35rem;

View File

@ -267,7 +267,7 @@ def revert_actions(v, username):
comments = [x[0] for x in g.db.query(ModAction.target_comment_id).filter(ModAction.user_id == user.id, ModAction.created_utc > cutoff, ModAction.kind == 'ban_comment').all()]
comments = g.db.query(Comment).filter(Comment.id.in_(comments)).all()
for item in posts + comments:
item.is_banned = False
item.ban_reason = None
@ -285,7 +285,7 @@ def revert_actions(v, username):
user.is_banned = 0
send_repeatable_notification(user.id, f"@{v.username} has unbanned you!")
g.db.add(user)
for u in user.alts:
u.shadowbanned = None
u.unban_utc = 0

View File

@ -467,7 +467,10 @@ if SITE == 'pcmemes.net':
count = "1"
if 'περιμένει' in count:
return process_streamer(id, '')
if live != '':
return process_streamer(id, '')
else:
return None
count = int(count.replace('.', ''))
@ -480,7 +483,11 @@ if SITE == 'pcmemes.net':
return (True, (id, req.url, thumb, name, title, count))
else:
t = offline_regex.search(text)
if not t: return process_streamer(id, '')
if not t:
if live != '':
return process_streamer(id, '')
else:
return None
y = offline_details_regex.search(text)

View File

@ -125,14 +125,14 @@
<ul class="pagination pagination-sm mb-0">
{% if page>1 %}
<li class="page-item">
<small><a class="page-link" href="/log?page={{page-1}}{% if admin %}&admin={{admin}}{% endif %}{% if type %}&kind={{type}}{% endif %}" tabindex="-1">Prev</a></small>
<small><a class="page-link" href="{% if sub %}/h/{{sub}}{% endif %}/log?page={{page-1}}{% if admin %}&admin={{admin}}{% endif %}{% if type %}&kind={{type}}{% endif %}" tabindex="-1">Prev</a></small>
</li>
{% else %}
<li class="page-item disabled"><span class="page-link">Prev</span></li>
{% endif %}
{% if next_exists %}
<li class="page-item">
<small><a class="page-link" href="/log?page={{page+1}}{% if admin %}&admin={{admin}}{% endif %}{% if type %}&kind={{type}}{% endif %}">Next</a></small>
<small><a class="page-link" href="{% if sub %}/h/{{sub}}{% endif %}/log?page={{page+1}}{% if admin %}&admin={{admin}}{% endif %}{% if type %}&kind={{type}}{% endif %}">Next</a></small>
</li>
{% else %}
<li class="page-item disabled"><span class="page-link">Next</span></li>

View File

@ -25,7 +25,7 @@
<div class="mb-4">{{sub.sidebar_html|safe}}</div>
{% endif %}
<div id="sidebar-wpd--flairs">
<div class="sidebar-wpd--flairs sidebar-wpd--flairs--3">
<a href="/h/accident">Accident</a>
<a href="/h/suicide">Suicide</a>
<a href="/h/animal">Animal</a>
@ -47,12 +47,14 @@
<a href="/h/maiming">Maiming</a>
<a href="/h/police">Police</a>
<a href="/h/combat">Combat</a>
<a href="/h/child">Child</a>
<a href="/h/gore">Gore</a>
<a href="/h/misc">Misc</a>
<a href="/h/request">Request</a>
<a href="/h/other">Other</a>
<a href="/h/request" class="font-italic">Request</a>
</div>
<hr>
<div class="sidebar-wpd--flairs sidebar-wpd--flairs--2 mb-4">
<a href="/h/meta" class="font-weight-bold">Meta</a>
<a href="/h/discussion">Discussion</a>
<a href="/h/meta">Meta</a>
<a href="/h/social">Social</a>
<a href="/h/music">Music</a>
</div>
@ -70,6 +72,7 @@
<li>No doxing. No witch hunts.</li>
<li>Posts must include videos of people dying.
<ul>
<li>The <span style="font-variant-caps: small-caps;">Discussion</span>, <span style="font-variant-caps: small-caps;">Social</span>, and <span style="font-variant-caps: small-caps;">Music</span> flairs are intentionally off-topic and do not require people dying.</li>
<li>Videos that only include aftermath of a serious accident/incident or current event may be allowed.</li>
<li>No animal death unless there's also a human dying in the video.</li>
</ul>
@ -77,7 +80,7 @@
<li>Titles should be as descriptive as possible.
<ul>
<li>Additional context, images, or sources are always encouraged and appreciated. No joke titles please.</li>
<li>If there is a child or animal, please add it as a descriptor.</li>
<li>If there is a child hurt or killed, please put "Child Warning" in the title.</li>
</ul>
</li>
<li>No explicit racism or bigotry.

View File

@ -29,7 +29,7 @@
<meta name="twitter:url" content="{{u.url}}">
{% endblock %}
{% import 'userpage_admintools_lower.html' as userpage_admintools_lower with context %}
{% import 'userpage_admintools.html' as userpage_admintools with context %}
{% block desktopUserBanner %}
@ -49,25 +49,7 @@
</a>
</div>
<div id="profilestuff" class="ml-3 w-100">
{% if u.is_suspended %}
<h5 class="text-primary" id="profile--banned">BANNED USER
{% if u.ban_reason %}:
{{u.ban_reason | safe}}
{% endif %}
(by <a href="{{u.banned_by.url}}">@{{u.banned_by.username}}</a>)
</h5>
{% if u.unban_utc %}
<h5 class="text-primary" id="profile--unban">{{u.unban_string}}</h5>
{% endif %}
{% endif %}
{% if v and v.admin_level >= PERMS['USER_SHADOWBAN'] and u.shadowbanned %}
<h5 class="text-primary" id="profile--shadowbanned">SHADOWBANNED USER
{% if u.ban_reason %}:
{{u.ban_reason | safe}}
{% endif %}
(by <a href="/@{{u.shadowbanned}}">@{{u.shadowbanned}}</a>)
</h5>
{% endif %}
{{ userpage_admintools.userBanBlock('desktop') }}
<div class="d-flex align-items-center mt-1 mb-2">
<h1 class="font-weight-bolder h3 my-0 mr-2" id="profile--name" style="color: #{{u.name_color}}"><span {% if u.patron %}class="patron" style="background-color:#{{u.name_color}}"{% endif %}>{{u.user_name}}</span></h1>
@ -220,17 +202,8 @@
<a class="btn btn-primary" role="button" onclick="post_toast(this,'/settings/block?username={{u.username}}',true)">Block</a>
{% if v.admin_level >= PERMS['ADMIN_ADD'] and SITE != 'rdrama.net' %}
<a id="admin" class="{% if u.admin_level >= PERMS['ADMIN_ADD_PERM_LEVEL'] %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast(this,'/@{{u.username}}/make_admin','admin','unadmin','d-none')">Make admin</a>
{% endif %}
{% if v.admin_level >= PERMS['ADMIN_REMOVE'] %}
<a id="unadmin" class="{% if u.admin_level < 1 %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast(this,'/@{{u.username}}/remove_admin','admin','unadmin','d-none')">Remove admin</a>
{% endif %}
{% if v.admin_level >= PERMS['ADMIN_ACTIONS_REVERT'] %}
<a class="btn btn-primary" role="button" data-click="post_toast(this,'/@{{u.username}}/revert_actions')" onclick="areyousure(this)">Revert admin actions</a>
{% endif %}
</div>
{{ userpage_admintools.userAdminToolsUpper('desktop') }}
<form class="d-none toggleable" id="message" action="/@{{u.username}}/message" onsubmit="submitFormAjax(event)">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<pre></pre>
@ -272,7 +245,7 @@
<a class="btn btn-secondary" role="button" onclick="toggle()">Toggle anthem</a>
{% endif %}
{{ userpage_admintools_lower.userAdminToolsLower('desktop') }}
{{ userpage_admintools.userAdminToolsLower('desktop') }}
<pre></pre>
<div id="profile--info">
@ -337,15 +310,7 @@
</a>
</div>
<div class="mt-n3 py-3">
{% if u.is_suspended %}
<h5 class="text-primary" id="profile-mobile--banned">BANNED USER{% if u.ban_reason %}: {{u.ban_reason | safe}}{% endif %} (by <a href="{{u.banned_by.url}}">@{{u.banned_by.username}}</a>)</h5>
{% if u.unban_utc %}<h5 class="text-primary" id="profile-mobile--unban">{{u.unban_string}}</h5>{% endif %}
{% endif %}
{% if v and v.admin_level >= PERMS['USER_SHADOWBAN'] and u.shadowbanned %}
<h5 class="text-primary" id="profile-mobile--banned">SHADOWBANNED USER{% if u.ban_reason %}: {{u.ban_reason | safe}}{% endif %} (by <a href="/@{{u.shadowbanned}}">@{{u.shadowbanned}}</a>)</h5>
{% endif %}
{{ userpage_admintools.userBanBlock('mobile') }}
<h1 class="h5 d-inline-block" id="profile-mobile--name" style="color: #{{u.name_color}}"><span {% if u.patron %}class="patron" style="background-color:#{{u.name_color}}"{% endif %}>{{u.user_name}}</span></h1>
{% if u.username != u.original_username %}
@ -489,18 +454,7 @@
<a class="btn btn-primary" role="button" onclick="post_toast(this,'/settings/block?username={{u.username}}',true)">Block</a>
{% if v.admin_level >= PERMS['ADMIN_ADD'] and SITE != 'rdrama.net' %}
<a id="admin2" class="{% if u.admin_level >= PERMS['ADMIN_ADD_PERM_LEVEL'] %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast(this,'/@{{u.username}}/make_admin','admin2','unadmin2','d-none')">Make admin</a>
{% endif %}
{% if v.admin_level >= PERMS['ADMIN_REMOVE'] %}
<a id="unadmin2" class="{% if u.admin_level < 1 %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast(this,'/@{{u.username}}/remove_admin','admin2','unadmin2','d-none')">Remove admin</a>
{% endif %}
{% if v.admin_level >= PERMS['ADMIN_ACTIONS_REVERT'] %}
<a class="btn btn-primary" role="button" data-click="post_toast(this,'/@{{u.username}}/revert_actions')" onclick="areyousure(this)">Revert admin actions</a>
{% endif %}
{{ userpage_admintools.userAdminToolsUpper('mobile') }}
<form class="d-none toggleable" id='message-mobile' action="/@{{u.username}}/message" onsubmit="submitFormAjax(event)">
<pre></pre>
<input type="hidden" name="formkey" value="{{v.formkey}}">
@ -533,7 +487,7 @@
<button class="btn btn-primary mt-2 mb-3" onclick="transferBux(true)">Gift</button>
</div>
{{ userpage_admintools_lower.userAdminToolsLower('mobile') }}
{{ userpage_admintools.userAdminToolsLower('mobile') }}
{% endif %}
<pre></pre>

View File

@ -1,3 +1,39 @@
{% macro userBanBlock(deviceType) -%}
{% if u.is_suspended %}
<h5 class="text-primary" id="profile-{{deviceType}}--banned">BANNED USER
{% if u.ban_reason %}:
{{u.ban_reason | safe}}
{% endif %}
(by <a href="{{u.banned_by.url}}">@{{u.banned_by.username}}</a>)
</h5>
{% if u.unban_utc %}
<h5 class="text-primary" id="profile--unban">{{u.unban_string}}</h5>
{% endif %}
{% endif %}
{% if v and v.admin_level >= PERMS['USER_SHADOWBAN'] and u.shadowbanned %}
<h5 class="text-primary" id="profile-{{deviceType}}--shadowbanned">SHADOWBANNED USER
{% if u.ban_reason %}:
{{u.ban_reason | safe}}
{% endif %}
(by <a href="/@{{u.shadowbanned}}">@{{u.shadowbanned}}</a>)
</h5>
{% endif %}
{%- endmacro %}
{% macro userAdminToolsUpper(deviceType) -%}
{% if v and v.id != u.id and v.admin_level >= PERMS['USER_MODERATION_TOOLS_VISIBLE'] %}
{% if v.admin_level >= PERMS['ADMIN_ADD'] and SITE != 'rdrama.net' %}
<a id="add-admin-{{deviceType}}" class="{% if u.admin_level >= PERMS['ADMIN_ADD_PERM_LEVEL'] %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast(this,'/@{{u.username}}/make_admin','add-admin-{{deviceType}}','remove-admin-{{deviceType}}','d-none')">Make admin</a>
{% endif %}
{% if v.admin_level >= PERMS['ADMIN_REMOVE'] %}
<a id="remove-admin-{{deviceType}}" class="{% if u.admin_level < 1 %}d-none{% endif %} btn btn-danger" href="javascript:void(0)" onclick="post_toast(this,'/@{{u.username}}/remove_admin','add-admin-{{deviceType}}','remove-admin-{{deviceType}}','d-none')">Remove admin</a>
{% endif %}
{% if v.admin_level >= PERMS['ADMIN_ACTIONS_REVERT'] and u.admin_level %}
<a class="btn btn-danger" role="button" data-click="post_toast(this,'/@{{u.username}}/revert_actions')" onclick="areyousure(this)">Revert admin actions</a>
{% endif %}
{% endif %}
{%- endmacro %}
{% macro userAdminToolsLower(deviceType) -%}
{% if v and v.id != u.id and v.admin_level >= PERMS['USER_MODERATION_TOOLS_VISIBLE'] %}
<div class="admintools-user-lower-{{deviceType}}">
@ -101,4 +137,4 @@
{% endif %}
</div>
{% endif %}
{%- endmacro %}
{%- endmacro %}

View File

@ -288,6 +288,7 @@ INSERT INTO public.hat_defs VALUES (92, 'Top Hat (black)', 'Traditional. Classy.
INSERT INTO public.hat_defs VALUES (714, 'Captain Falcon', 'The chad that every smash player wanted to imitate, if only his moveset included a shower.', 2, 500, NULL, 1663474615);
INSERT INTO public.hat_defs VALUES (715, 'Inspector Gadget', '"Go go Gadget Brown Bricks!"', 2, 500, NULL, 1663477536);
INSERT INTO public.hat_defs VALUES (724, 'Spartan Helmet', 'THIS IS SPARTA!', 2, 500, NULL, 1663892367);
INSERT INTO public.hat_defs VALUES (751, 'Butter', 'Southern-fried and full of love.', 2, 500, NULL, 1664595886);
INSERT INTO public.hat_defs VALUES (754, 'Crusader helmet', 'RETAKE THE HOLY LAND!', 2, 500, NULL, 1664595954);
INSERT INTO public.hat_defs VALUES (766, 'book', 'i can read! heheh', 2, 500, NULL, 1664645746);
@ -296,7 +297,20 @@ INSERT INTO public.hat_defs VALUES (788, 'LGBTUSSR Officer Hat', 'Rule with an i
INSERT INTO public.hat_defs VALUES (808, 'The Capy 2', 'The drippiest and pimpiest capybara out there.', 2, 500, NULL, 1665104484);
INSERT INTO public.hat_defs VALUES (676, 'Kepi', 'Army cap for those unlucky enough to be French', 2, 500, NULL, 1663303083);
INSERT INTO public.hat_defs VALUES (678, 'Turkroach', 'Come on Carp this one''s hilarious. It''s semi transparent to clarify', 2, 500, NULL, 1663305640);
INSERT INTO public.hat_defs VALUES (679, 'Judge Dredd', 'THIS USER IS THE LAW', 2, 500, NULL, 1663309533);
INSERT INTO public.hat_defs VALUES (680, 'Hat Stack', 'You are as presumptuous as you are poor and Irish. Challenge not the majesty of my tower of hats.', 2, 500, NULL, 1663310312);
@ -942,7 +956,7 @@ INSERT INTO public.hat_defs VALUES (504, 'Iron Crown of Lombardy', 'This isn''t
-- Name: hat_defs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('public.hat_defs_id_seq', 812, true);
SELECT pg_catalog.setval('public.hat_defs_id_seq', 827, true);
--