forked from rDrama/rDrama
1
0
Fork 0

fgMerge branch 'frost' of https://github.com/Aevann1/Drama into frost

master
Aevann1 2022-02-13 02:08:05 +00:00
commit bfe98a8444
5 changed files with 27 additions and 117 deletions

View File

@ -139,7 +139,7 @@ def admin_app_approve(v, aid):
def admin_app_revoke(v, aid):
app = g.db.query(OauthApp).filter_by(id=aid).one_or_none()
if app.id:
if app:
for auth in g.db.query(ClientAuth).filter_by(oauth_client=app.id).all(): g.db.delete(auth)
send_repeatable_notification(app.author.id, f"Your application `{app.app_name}` has been revoked.")
@ -165,20 +165,21 @@ def admin_app_reject(v, aid):
app = g.db.query(OauthApp).filter_by(id=aid).one_or_none()
for auth in g.db.query(ClientAuth).filter_by(oauth_client=app.id).all(): g.db.delete(auth)
if app:
for auth in g.db.query(ClientAuth).filter_by(oauth_client=app.id).all(): g.db.delete(auth)
send_repeatable_notification(app.author.id, f"Your application `{app.app_name}` has been rejected.")
send_repeatable_notification(app.author.id, f"Your application `{app.app_name}` has been rejected.")
g.db.delete(app)
g.db.delete(app)
ma = ModAction(
kind="reject_app",
user_id=v.id,
target_user_id=app.author.id,
)
g.db.add(ma)
ma = ModAction(
kind="reject_app",
user_id=v.id,
target_user_id=app.author.id,
)
g.db.add(ma)
g.db.commit()
g.db.commit()
return {"message": "App rejected"}

View File

@ -1,31 +0,0 @@
<div class="col sidebar text-left d-none d-lg-block pt-3 bg-white" style="max-width:300px">
{% if sub %}
{% set image=sub.sidebar_url %}
{% else %}
{% set image='/static/assets/images/Ruqqus/sidebar.webp?a=1039' %}
{% endif %}
<img alt="sidebar image" role="button" data-bs-toggle="modal" data-bs-target="#expandImageModal" onclick="expandDesktopImage('{{image}}')" loading="lazy" src="{{image}}" width=100%>
{% if sub %}
{% if sub.sidebar_html %}
<div class="mt-4">{{sub.sidebar_html|safe}}</div>
{% endif %}
<a class="btn btn-primary btn-block mt-4" href="/s/{{sub.name}}/mods">MODS</a>
{% if v and v.mods(sub.name) %}
<a class="btn btn-primary btn-block" href="/s/{{sub.name}}/settings">SUB SETTINGS</a>
{% endif %}
{% else %}
<p class="mt-4">Rules: No doxxing, No CP or other clearly illegal shit. Thanks!</p>
{% endif %}
<a class="btn btn-primary btn-block" href="/create_sub">CREATE SUB</a>
<pre>
</pre>
</div>

View File

@ -1,31 +0,0 @@
<div class="col sidebar text-left d-none d-lg-block pt-3 bg-white" style="max-width:300px">
{% if sub %}
{% set image=sub.sidebar_url %}
{% else %}
{% set image='/static/assets/images/Ruqqus/sidebar.webp?a=1039' %}
{% endif %}
<img alt="sidebar image" role="button" data-bs-toggle="modal" data-bs-target="#expandImageModal" onclick="expandDesktopImage('{{image}}')" loading="lazy" src="{{image}}" width=100%>
{% if sub %}
{% if sub.sidebar_html %}
<div class="mt-4">{{sub.sidebar_html|safe}}</div>
{% endif %}
<a class="btn btn-primary btn-block mt-4" href="/s/{{sub.name}}/mods">MODS</a>
{% if v and v.mods(sub.name) %}
<a class="btn btn-primary btn-block" href="/s/{{sub.name}}/settings">SUB SETTINGS</a>
{% endif %}
{% else %}
<p class="mt-4">Rules: No doxxing, No CP or other clearly illegal shit. Thanks!</p>
{% endif %}
<a class="btn btn-primary btn-block" href="/create_sub">CREATE SUB</a>
<pre>
</pre>
</div>

View File

@ -227,25 +227,25 @@
}
}
</style>
<marquee class="train train1" direction="left" scrollamount=10 width="100%">
<marquee class="train train2" direction="left" scrollamount=10 width="100%">
<img alt=":#marseyscooter:" class="scooterimg" src="/static/assets/images/emojis/marseyscooter.webp?a=1008">
</marquee>
{% endif %}
{% if p.award_count("scooter") > 1 %}
<marquee class="train train2" direction="right" scrollamount=10 width="100%">
<marquee class="train train1" direction="right" scrollamount=10 width="100%">
<img alt=":#marseyscooter:" class="scooterimg mirrored" src="/static/assets/images/emojis/marseyscooter.webp?a=1008">
</marquee>
{% endif %}
{% if p.award_count("scooter") > 2 %}
<marquee class="train train3" direction="left" scrollamount=10 width="100%">
<marquee class="train train4" direction="left" scrollamount=10 width="100%">
<img alt=":#marseyscooter:" class="scooterimg" src="/static/assets/images/emojis/marseyscooter.webp?a=1008">
</marquee>
{% endif %}
{% if p.award_count("scooter") > 3 %}
<marquee class="train train4" direction="right" scrollamount=10 width="100%">
<marquee class="train train3" direction="right" scrollamount=10 width="100%">
<img alt=":#marseyscooter:" class="scooterimg mirrored" src="/static/assets/images/emojis/marseyscooter.webp?a=1008">
</marquee>
{% endif %}

View File

@ -1,45 +1,16 @@
INSERT INTO public.users (username, original_username) VALUES
('Drama','Drama'),
('AutoJanny','AutoJanny'),
('Snappy','Snappy'),
('longpostbot','longpostbot'),
('zozbot','zozbot'),
('AutoPoller','AutoPoller'),
('AutoBetter','AutoBetter'),
('AutoChoice','AutoChoice');
insert into public.award_relationships(id,user_id,kind) values(1,1,'shit');
INSERT INTO public.users (
id, username, passhash, created_utc, admin_level, over_18, is_activated, bio, bio_html, login_nonce, is_private,
unban_utc, original_username, customtitle, defaultsorting, defaultsortingcomments, defaulttime, namecolor, titlecolor, profileurl, bannerurl,
customtitleplain, theme, themecolor, changelogsub, oldreddit, css, profilecss, coins, agendaposter, suicide_utc,
post_count, comment_count, background, verified, truecoins
) VALUES (1, 'Drama', '', 0, 0, true, true, '', '', 0, false,
0, 'Drama', '', 'hot', 'top', 'day', 'ff66ac', 'ff66ac', '', '',
'', 'dark', 'ff66ac', false, false, '', '', 0, false, 0,
0, 0, '', true, 0),
(2, 'AutoJanny', '', 0, 0, true, true, '', '', 0, false,
0, 'AutoJanny', '', 'hot', 'top', 'day', 'ff66ac', 'ff66ac', '', '',
'', 'dark', 'ff66ac', false, false, '', '', 0, false, 0,
0, 0, '', true, 0),
(3, 'Snappy', '', 0, 0, true, true, '', '', 0, false,
0, 'Snappy', '', 'hot', 'top', 'day', '62ca56', 'e4432d', '', '',
'', 'dark', '30409f', false, false, '', '', 0, false, 0,
0, 0, '', true, 0),
(4, 'longpostbot', '', 0, 0, true, true, '', '', 0, false,
0, 'longpostbot', '', 'hot', 'top', 'day', '62ca56', 'e4432d', '', '',
'', 'dark', '30409f', false, false, '', '', 0, false, 0,
0, 0, '', true, 0),
(5, 'zozbot', '', 0, 0, true, true, '', '', 0, false,
0, 'zozbot', '', 'hot', 'top', 'day', '62ca56', 'e4432d', '', '',
'', 'dark', '30409f', false, false, '', '', 0, false, 0,
0, 0, '', true, 0),
(6, 'AutoPoller', '', 0, 0, true, true, '', '', 0, false,
0, 'AutoPoller', '', 'hot', 'top', 'day', '62ca56', 'e4432d', '', '',
'', 'dark', '30409f', false, false, '', '', 0, false, 0,
0, 0, '', true, 0),
(7, 'AutoBetter', '', 0, 0, true, true, '', '', 0, false,
0, 'AutoBetter', '', 'hot', 'top', 'day', '62ca56', 'e4432d', '', '',
'', 'dark', '30409f', false, false, '', '', 0, false, 0,
0, 0, '', true, 0);
(8, 'AutoChoice', '', 0, 0, true, true, '', '', 0, false,
0, 'AutoChoice', '', 'hot', 'top', 'day', '62ca56', 'e4432d', '', '',
'', 'dark', '30409f', false, false, '', '', 0, false, 0,
0, 0, '', true, 0);
SELECT pg_catalog.setval('public.users_id_seq', 7, true);
INSERT INTO public.badge_defs VALUES
(1,'Alpha User','Joined during open alpha'),
(2,'Verified Email','Verified Email'),