From 3b8ff5cc966c7b21b4626cfa7243fa53088aa27f Mon Sep 17 00:00:00 2001 From: justcool393 Date: Fri, 9 Dec 2022 22:31:54 -0600 Subject: [PATCH] delete all route add to thing and also idk ig buttons yay --- files/assets/css/main.css | 4 ++++ files/routes/subs.py | 8 ++++---- files/templates/sub/settings.html | 5 +++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/files/assets/css/main.css b/files/assets/css/main.css index c367e8a0a..f7b474c98 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -6440,3 +6440,7 @@ div.markdown { font-size: 10px; } } + +.sub-banner-update-section .sub-settings-subsection { + margin-bottom: 1em; +} diff --git a/files/routes/subs.py b/files/routes/subs.py index 968890873..0dd68e7be 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -499,7 +499,7 @@ def delete_sub_banner(v:User, sub:str, index:int): ma = SubAction( sub=sub.name, kind='delete_banner', - note=index, + _note=index, user_id=v.id ) g.db.add(ma) @@ -507,8 +507,8 @@ def delete_sub_banner(v:User, sub:str, index:int): return {"message": f"Deleted banner {index} from /h/{sub} successfully"} @app.delete("/h//settings/banners/") -@limiter.limit("1/10 second;10/day") -@ratelimit_user("1/10 second;10/day") +@limiter.limit("1/10 second;30/day") +@ratelimit_user("1/10 second;30/day") def delete_all_sub_banners(v:User, sub:str): sub = get_sub_by_name(sub) if not v.mods(sub.name): abort(403) @@ -524,7 +524,7 @@ def delete_all_sub_banners(v:User, sub:str): ma = SubAction( sub=sub.name, kind='delete_banner', - note='all', + _note='all', user_id=v.id ) g.db.add(ma) diff --git a/files/templates/sub/settings.html b/files/templates/sub/settings.html index 511a90349..7f4dc8322 100644 --- a/files/templates/sub/settings.html +++ b/files/templates/sub/settings.html @@ -61,7 +61,7 @@
Banners
-
+
{% for banner in sub.banner_urls %}
@@ -69,7 +69,7 @@
- +
@@ -89,6 +89,7 @@ Upload New Banner +
All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.