diff --git a/files/assets/images/emojis/abusivewife.webp b/files/assets/images/emojis/abusivewife.webp index 151fee3a6..66d875821 100644 Binary files a/files/assets/images/emojis/abusivewife.webp and b/files/assets/images/emojis/abusivewife.webp differ diff --git a/files/assets/images/emojis/ancap.webp b/files/assets/images/emojis/ancap.webp index 8088f003c..1f65455b2 100644 Binary files a/files/assets/images/emojis/ancap.webp and b/files/assets/images/emojis/ancap.webp differ diff --git a/files/assets/images/emojis/bardfinn.webp b/files/assets/images/emojis/bardfinn.webp index 0bfae630c..96834bed6 100644 Binary files a/files/assets/images/emojis/bardfinn.webp and b/files/assets/images/emojis/bardfinn.webp differ diff --git a/files/assets/images/emojis/bloomer.webp b/files/assets/images/emojis/bloomer.webp index 424ee4cd3..c356a7081 100644 Binary files a/files/assets/images/emojis/bloomer.webp and b/files/assets/images/emojis/bloomer.webp differ diff --git a/files/assets/images/emojis/boomer.webp b/files/assets/images/emojis/boomer.webp index 3f32eeb5c..08e8a8764 100644 Binary files a/files/assets/images/emojis/boomer.webp and b/files/assets/images/emojis/boomer.webp differ diff --git a/files/assets/images/emojis/boomermonster.webp b/files/assets/images/emojis/boomermonster.webp index 85a7e6350..9a65f86a3 100644 Binary files a/files/assets/images/emojis/boomermonster.webp and b/files/assets/images/emojis/boomermonster.webp differ diff --git a/files/assets/images/emojis/brainletbush.webp b/files/assets/images/emojis/brainletbush.webp old mode 100755 new mode 100644 index a8cb26618..c062f2cb7 Binary files a/files/assets/images/emojis/brainletbush.webp and b/files/assets/images/emojis/brainletbush.webp differ diff --git a/files/assets/images/emojis/brainletcaved.webp b/files/assets/images/emojis/brainletcaved.webp index 3dd661199..7e6b90734 100644 Binary files a/files/assets/images/emojis/brainletcaved.webp and b/files/assets/images/emojis/brainletcaved.webp differ diff --git a/files/assets/images/emojis/brainletchest.webp b/files/assets/images/emojis/brainletchest.webp index 4810deae1..728ab69bc 100644 Binary files a/files/assets/images/emojis/brainletchest.webp and b/files/assets/images/emojis/brainletchest.webp differ diff --git a/files/assets/images/emojis/brainletmaga.webp b/files/assets/images/emojis/brainletmaga.webp old mode 100755 new mode 100644 index 189dfbe62..268e9e28c Binary files a/files/assets/images/emojis/brainletmaga.webp and b/files/assets/images/emojis/brainletmaga.webp differ diff --git a/files/assets/images/emojis/brainletpit.webp b/files/assets/images/emojis/brainletpit.webp old mode 100755 new mode 100644 index 319672fe7..76ddac6db Binary files a/files/assets/images/emojis/brainletpit.webp and b/files/assets/images/emojis/brainletpit.webp differ diff --git a/files/assets/images/emojis/chadarab.webp b/files/assets/images/emojis/chadarab.webp index 910387567..c0fd36936 100644 Binary files a/files/assets/images/emojis/chadarab.webp and b/files/assets/images/emojis/chadarab.webp differ diff --git a/files/assets/images/emojis/chadblack.webp b/files/assets/images/emojis/chadblack.webp index 9ecc9f718..832405c6a 100644 Binary files a/files/assets/images/emojis/chadblack.webp and b/files/assets/images/emojis/chadblack.webp differ diff --git a/files/assets/images/emojis/chadjesus.webp b/files/assets/images/emojis/chadjesus.webp index 454693a22..ca1687fc4 100644 Binary files a/files/assets/images/emojis/chadjesus.webp and b/files/assets/images/emojis/chadjesus.webp differ diff --git a/files/assets/images/emojis/chadjew.webp b/files/assets/images/emojis/chadjew.webp index 01a6508a8..22e05443c 100644 Binary files a/files/assets/images/emojis/chadjew.webp and b/files/assets/images/emojis/chadjew.webp differ diff --git a/files/assets/images/emojis/chadjihadi.webp b/files/assets/images/emojis/chadjihadi.webp index 2e4ad019b..e1894678c 100644 Binary files a/files/assets/images/emojis/chadjihadi.webp and b/files/assets/images/emojis/chadjihadi.webp differ diff --git a/files/assets/images/emojis/chadlatino.webp b/files/assets/images/emojis/chadlatino.webp index 0d79c00f0..843d84ff2 100644 Binary files a/files/assets/images/emojis/chadlatino.webp and b/files/assets/images/emojis/chadlatino.webp differ diff --git a/files/assets/images/emojis/chadlibleft.webp b/files/assets/images/emojis/chadlibleft.webp index 6ebcf5d85..dfba451cf 100644 Binary files a/files/assets/images/emojis/chadlibleft.webp and b/files/assets/images/emojis/chadlibleft.webp differ diff --git a/files/assets/images/emojis/chadnordic.webp b/files/assets/images/emojis/chadnordic.webp index 9854ad420..5c9f44a78 100644 Binary files a/files/assets/images/emojis/chadnordic.webp and b/files/assets/images/emojis/chadnordic.webp differ diff --git a/files/assets/images/emojis/chadsikh.webp b/files/assets/images/emojis/chadsikh.webp index 889d26336..2b1777ed0 100644 Binary files a/files/assets/images/emojis/chadsikh.webp and b/files/assets/images/emojis/chadsikh.webp differ diff --git a/files/assets/images/emojis/chadusa.webp b/files/assets/images/emojis/chadusa.webp index 8e6a80722..7e870ba22 100644 Binary files a/files/assets/images/emojis/chadusa.webp and b/files/assets/images/emojis/chadusa.webp differ diff --git a/files/assets/images/emojis/coomer.webp b/files/assets/images/emojis/coomer.webp index 593a812f9..e4c863b20 100644 Binary files a/files/assets/images/emojis/coomer.webp and b/files/assets/images/emojis/coomer.webp differ diff --git a/files/assets/images/emojis/doomer.webp b/files/assets/images/emojis/doomer.webp old mode 100755 new mode 100644 index 495b53b95..789c954ce Binary files a/files/assets/images/emojis/doomer.webp and b/files/assets/images/emojis/doomer.webp differ diff --git a/files/assets/images/emojis/doomerfront.webp b/files/assets/images/emojis/doomerfront.webp old mode 100755 new mode 100644 index ddaccdb26..9117c14ec Binary files a/files/assets/images/emojis/doomerfront.webp and b/files/assets/images/emojis/doomerfront.webp differ diff --git a/files/assets/images/emojis/doomergirl.webp b/files/assets/images/emojis/doomergirl.webp index 2ef20ac7c..7b72ff755 100644 Binary files a/files/assets/images/emojis/doomergirl.webp and b/files/assets/images/emojis/doomergirl.webp differ diff --git a/files/assets/images/emojis/ethot.webp b/files/assets/images/emojis/ethot.webp old mode 100755 new mode 100644 index 3a86c3fa1..2298a3fd4 Binary files a/files/assets/images/emojis/ethot.webp and b/files/assets/images/emojis/ethot.webp differ diff --git a/files/assets/images/emojis/fatbrain.webp b/files/assets/images/emojis/fatbrain.webp index 36bf28963..b7ced90b0 100644 Binary files a/files/assets/images/emojis/fatbrain.webp and b/files/assets/images/emojis/fatbrain.webp differ diff --git a/files/assets/images/emojis/fatpriest.webp b/files/assets/images/emojis/fatpriest.webp old mode 100755 new mode 100644 index cd0491871..22730f4c1 Binary files a/files/assets/images/emojis/fatpriest.webp and b/files/assets/images/emojis/fatpriest.webp differ diff --git a/files/assets/images/emojis/femboy.webp b/files/assets/images/emojis/femboy.webp index 116c7c713..ebde63eea 100644 Binary files a/files/assets/images/emojis/femboy.webp and b/files/assets/images/emojis/femboy.webp differ diff --git a/files/assets/images/emojis/gogetter.webp b/files/assets/images/emojis/gogetter.webp old mode 100755 new mode 100644 index 2ccf44430..039112c6f Binary files a/files/assets/images/emojis/gogetter.webp and b/files/assets/images/emojis/gogetter.webp differ diff --git a/files/assets/images/emojis/grug.webp b/files/assets/images/emojis/grug.webp old mode 100755 new mode 100644 index e47955907..1d858c78a Binary files a/files/assets/images/emojis/grug.webp and b/files/assets/images/emojis/grug.webp differ diff --git a/files/assets/images/emojis/monke.webp b/files/assets/images/emojis/monke.webp index 283864b87..65fa70624 100644 Binary files a/files/assets/images/emojis/monke.webp and b/files/assets/images/emojis/monke.webp differ diff --git a/files/assets/images/emojis/nazijak.webp b/files/assets/images/emojis/nazijak.webp old mode 100755 new mode 100644 index 45de7f754..dbe5f69d5 Binary files a/files/assets/images/emojis/nazijak.webp and b/files/assets/images/emojis/nazijak.webp differ diff --git a/files/assets/images/emojis/npc.webp b/files/assets/images/emojis/npc.webp index 461ae3ab5..affaad38b 100644 Binary files a/files/assets/images/emojis/npc.webp and b/files/assets/images/emojis/npc.webp differ diff --git a/files/assets/images/emojis/npcfront.webp b/files/assets/images/emojis/npcfront.webp index b3df85dfd..b796f5cac 100644 Binary files a/files/assets/images/emojis/npcfront.webp and b/files/assets/images/emojis/npcfront.webp differ diff --git a/files/assets/images/emojis/npcmaga.webp b/files/assets/images/emojis/npcmaga.webp old mode 100755 new mode 100644 index 4f7fa2b24..de250ebb0 Binary files a/files/assets/images/emojis/npcmaga.webp and b/files/assets/images/emojis/npcmaga.webp differ diff --git a/files/assets/images/emojis/psychojak.webp b/files/assets/images/emojis/psychojak.webp index 7110d4903..a86f8950d 100644 Binary files a/files/assets/images/emojis/psychojak.webp and b/files/assets/images/emojis/psychojak.webp differ diff --git a/files/assets/images/emojis/ragemask.webp b/files/assets/images/emojis/ragemask.webp old mode 100755 new mode 100644 index aa579330e..d1779881a Binary files a/files/assets/images/emojis/ragemask.webp and b/files/assets/images/emojis/ragemask.webp differ diff --git a/files/assets/images/emojis/ramonajak.webp b/files/assets/images/emojis/ramonajak.webp index d3dc1e256..ec54de6b0 100644 Binary files a/files/assets/images/emojis/ramonajak.webp and b/files/assets/images/emojis/ramonajak.webp differ diff --git a/files/assets/images/emojis/soyjackwow.webp b/files/assets/images/emojis/soyjackwow.webp index 6ddc9a9ec..8d8a24b9e 100644 Binary files a/files/assets/images/emojis/soyjackwow.webp and b/files/assets/images/emojis/soyjackwow.webp differ diff --git a/files/assets/images/emojis/soyjak.webp b/files/assets/images/emojis/soyjak.webp index 0586664c8..233b04ca0 100644 Binary files a/files/assets/images/emojis/soyjak.webp and b/files/assets/images/emojis/soyjak.webp differ diff --git a/files/assets/images/emojis/soyjakfront.webp b/files/assets/images/emojis/soyjakfront.webp index 74583a177..ffc62cbc5 100644 Binary files a/files/assets/images/emojis/soyjakfront.webp and b/files/assets/images/emojis/soyjakfront.webp differ diff --git a/files/assets/images/emojis/soyjakhipster.webp b/files/assets/images/emojis/soyjakhipster.webp old mode 100755 new mode 100644 index 294de9055..5b893956a Binary files a/files/assets/images/emojis/soyjakhipster.webp and b/files/assets/images/emojis/soyjakhipster.webp differ diff --git a/files/assets/images/emojis/soyjakmaga.webp b/files/assets/images/emojis/soyjakmaga.webp index d5dd81517..d2ac18bf8 100644 Binary files a/files/assets/images/emojis/soyjakmaga.webp and b/files/assets/images/emojis/soyjakmaga.webp differ diff --git a/files/assets/images/emojis/soyjakyell.webp b/files/assets/images/emojis/soyjakyell.webp old mode 100755 new mode 100644 index 81520a9dd..f440df63f Binary files a/files/assets/images/emojis/soyjakyell.webp and b/files/assets/images/emojis/soyjakyell.webp differ diff --git a/files/assets/images/emojis/tomboy.webp b/files/assets/images/emojis/tomboy.webp index 272ae2e92..8c6362d45 100644 Binary files a/files/assets/images/emojis/tomboy.webp and b/files/assets/images/emojis/tomboy.webp differ diff --git a/files/assets/images/emojis/zoomer.webp b/files/assets/images/emojis/zoomer.webp old mode 100755 new mode 100644 index fe43bd145..f081fa875 Binary files a/files/assets/images/emojis/zoomer.webp and b/files/assets/images/emojis/zoomer.webp differ diff --git a/files/assets/images/emojis/zoomersoy.webp b/files/assets/images/emojis/zoomersoy.webp old mode 100755 new mode 100644 index da6678be8..1df14d5e9 Binary files a/files/assets/images/emojis/zoomersoy.webp and b/files/assets/images/emojis/zoomersoy.webp differ diff --git a/files/assets/js/comments_v.js b/files/assets/js/comments_v.js index b188f5088..fc6a4debe 100755 --- a/files/assets/js/comments_v.js +++ b/files/assets/js/comments_v.js @@ -191,7 +191,7 @@ post_comment=function(fullname){ xhr.onload=function(){ if (xhr.status==200) { commentForm=document.getElementById('comment-form-space-'+fullname); - commentForm.innerHTML = xhr.response.replace(/data-src/g, 'src'); + commentForm.innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/style="display:none;visibility:hidden;"/g, ''); } else { var myToast = new bootstrap.Toast(document.getElementById('toast-post-success')); diff --git a/files/classes/award.py b/files/classes/award.py index 8e823e90a..9d3b7ef4b 100755 --- a/files/classes/award.py +++ b/files/classes/award.py @@ -24,6 +24,14 @@ if site_name == "Drama": "color": "text-success", "price": 3500 }, + "grass": { + "kind": "grass", + "title": "Grass", + "description": "Ban the author permanently (must provide a timestamped picture of them touching grass to the admins to get unbanned)", + "icon": "fas fa-seedling", + "color": "text-success", + "price": 10000 + }, "shit": { "kind": "shit", "title": "Shit", @@ -35,19 +43,11 @@ if site_name == "Drama": "fireflies": { "kind": "fireflies", "title": "Fireflies", - "description": "Puts stars on the post.", + "description": "Puts fireflies on the post.", "icon": "fas fa-sparkles", "color": "text-warning", "price": 500 }, - "grass": { - "kind": "grass", - "title": "Grass", - "description": "Ban the author permanently (must provide a timestamped picture of them touching grass to the admins to get unbanned)", - "icon": "fas fa-seedling", - "color": "text-success", - "price": 10000 - }, "train": { "kind": "train", "title": "Train", @@ -60,7 +60,7 @@ if site_name == "Drama": "kind": "pin", "title": "1-Hour Pin", "description": "Pins the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-warning", "price": 750 }, @@ -68,7 +68,7 @@ if site_name == "Drama": "kind": "unpin", "title": "1-Hour Unpin", "description": "Removes 1 hour from the pin duration of the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-black", "price": 1000 }, @@ -86,7 +86,7 @@ else: "fireflies": { "kind": "fireflies", "title": "Fireflies", - "description": "Puts stars on the post.", + "description": "Puts fireflies on the post.", "icon": "fas fa-sparkles", "color": "text-warning", "price": 500 @@ -103,7 +103,7 @@ else: "kind": "pin", "title": "1-Hour Pin", "description": "Pins the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-warning", "price": 750 }, @@ -111,7 +111,7 @@ else: "kind": "unpin", "title": "1-Hour Unpin", "description": "Removes 1 hour from the pin duration of the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-black", "price": 1000 }, diff --git a/files/classes/mod_logs.py b/files/classes/mod_logs.py index 1e097c269..23a9caafd 100755 --- a/files/classes/mod_logs.py +++ b/files/classes/mod_logs.py @@ -175,22 +175,22 @@ ACTIONTYPES={ }, "pin_comment":{ "str":'pinned a {self.target_link}', - "icon":"fa-thumbtack", + "icon":"fa-thumbtack fa-rotate--45", "color": "bg-info", }, "unpin_comment":{ "str":'un-pinned a {self.target_link}', - "icon":"fa-thumbtack", + "icon":"fa-thumbtack fa-rotate--45", "color": "bg-muted", }, "pin_post":{ "str":'pinned post {self.target_link}', - "icon":"fa-thumbtack", + "icon":"fa-thumbtack fa-rotate--45", "color": "bg-success", }, "unpin_post":{ "str":'un-pinned post {self.target_link}', - "icon":"fa-thumbtack", + "icon":"fa-thumbtack fa-rotate--45", "color": "bg-muted", }, "set_nsfw":{ diff --git a/files/classes/user.py b/files/classes/user.py index b6400e8e3..bf55bc69b 100755 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -41,6 +41,14 @@ if site_name == "Drama": "color": "text-success", "price": 3500 }, + "grass": { + "kind": "grass", + "title": "Grass", + "description": "Ban the author permanently (must provide a timestamped picture of them touching grass to the admins to get unbanned)", + "icon": "fas fa-seedling", + "color": "text-success", + "price": 10000 + }, "shit": { "kind": "shit", "title": "Shit", @@ -52,19 +60,11 @@ if site_name == "Drama": "fireflies": { "kind": "fireflies", "title": "Fireflies", - "description": "Puts stars on the post.", + "description": "Puts fireflies on the post.", "icon": "fas fa-sparkles", "color": "text-warning", "price": 500 }, - "grass": { - "kind": "grass", - "title": "Grass", - "description": "Ban the author permanently (must provide a timestamped picture of them touching grass to the admins to get unbanned)", - "icon": "fas fa-seedling", - "color": "text-success", - "price": 10000 - }, "train": { "kind": "train", "title": "Train", @@ -77,7 +77,7 @@ if site_name == "Drama": "kind": "pin", "title": "1-Hour Pin", "description": "Pins the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-warning", "price": 750 }, @@ -85,7 +85,7 @@ if site_name == "Drama": "kind": "unpin", "title": "1-Hour Unpin", "description": "Removes 1 hour from the pin duration of the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-black", "price": 1000 }, @@ -103,7 +103,7 @@ else: "fireflies": { "kind": "fireflies", "title": "Fireflies", - "description": "Puts stars on the post.", + "description": "Puts fireflies on the post.", "icon": "fas fa-sparkles", "color": "text-warning", "price": 500 @@ -120,7 +120,7 @@ else: "kind": "pin", "title": "1-Hour Pin", "description": "Pins the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-warning", "price": 750 }, @@ -128,7 +128,7 @@ else: "kind": "unpin", "title": "1-Hour Unpin", "description": "Removes 1 hour from the pin duration of the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-black", "price": 1000 }, diff --git a/files/routes/admin.py b/files/routes/admin.py index cad3fabad..ad5af2ff4 100755 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1064,19 +1064,6 @@ def api_sticky_post(post_id, v): if post.stickied: return {"message": "Post pinned!"} else: return {"message": "Post unpinned!"} -@app.post("/pin/") -@auth_required -def api_pin_post(post_id, v): - - post = g.db.query(Submission).options(lazyload('*')).filter_by(id=post_id).first() - if post: - post.is_pinned = not post.is_pinned - g.db.add(post) - g.db.commit() - - if post.is_pinned: return {"message": "Post pinned!"} - else: return {"message": "Post unpinned!"} - @app.post("/ban_comment/") @limiter.limit("1/second") @admin_level_required(1) diff --git a/files/routes/awards.py b/files/routes/awards.py index 9f70e06bc..45c419274 100755 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -29,6 +29,14 @@ def shop(v): "color": "text-success", "price": 3500 }, + "grass": { + "kind": "grass", + "title": "Grass", + "description": "Ban the author permanently (must provide a timestamped picture of them touching grass to the admins to get unbanned)", + "icon": "fas fa-seedling", + "color": "text-success", + "price": 10000 + }, "shit": { "kind": "shit", "title": "Shit", @@ -40,19 +48,11 @@ def shop(v): "fireflies": { "kind": "fireflies", "title": "Fireflies", - "description": "Puts stars on the post.", + "description": "Puts fireflies on the post.", "icon": "fas fa-sparkles", "color": "text-warning", "price": 500 }, - "grass": { - "kind": "grass", - "title": "Grass", - "description": "Ban the author permanently (must provide a timestamped picture of them touching grass to the admins to get unbanned)", - "icon": "fas fa-seedling", - "color": "text-success", - "price": 10000 - }, "train": { "kind": "train", "title": "Train", @@ -65,7 +65,7 @@ def shop(v): "kind": "pin", "title": "1-Hour Pin", "description": "Pins the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-warning", "price": 750 }, @@ -73,7 +73,7 @@ def shop(v): "kind": "unpin", "title": "1-Hour Unpin", "description": "Removes 1 hour from the pin duration of the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-black", "price": 1000 }, @@ -91,7 +91,7 @@ def shop(v): "fireflies": { "kind": "fireflies", "title": "Fireflies", - "description": "Puts stars on the post.", + "description": "Puts fireflies on the post.", "icon": "fas fa-sparkles", "color": "text-warning", "price": 500 @@ -108,7 +108,7 @@ def shop(v): "kind": "pin", "title": "1-Hour Pin", "description": "Pins the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-warning", "price": 750 }, @@ -116,12 +116,39 @@ def shop(v): "kind": "unpin", "title": "1-Hour Unpin", "description": "Removes 1 hour from the pin duration of the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-black", "price": 1000 }, } + AWARDS2 = { + "ban": { + "kind": "ban", + "title": "1-Day Ban", + "description": "Bans the author for a day.", + "icon": "fas fa-gavel", + "color": "text-danger", + "price": 3000 + }, + "grass": { + "kind": "grass", + "title": "Grass", + "description": "Ban the author permanently (must provide a timestamped picture of them touching grass to the admins to get unbanned)", + "icon": "fas fa-seedling", + "color": "text-success", + "price": 10000 + }, + "shit": { + "kind": "shit", + "title": "Shit", + "description": "Makes flies swarm a post.", + "icon": "fas fa-poop", + "color": "text-black-50", + "price": 500 + }, + } + query = g.db.query( User.id, User.username, User.patron, User.namecolor, AwardRelationship.kind.label('last_award_kind'), func.count(AwardRelationship.id).label('last_award_count') @@ -171,6 +198,14 @@ def buy(v, award): "color": "text-success", "price": 3500 }, + "grass": { + "kind": "grass", + "title": "Grass", + "description": "Ban the author permanently (must provide a timestamped picture of them touching grass to the admins to get unbanned)", + "icon": "fas fa-seedling", + "color": "text-success", + "price": 10000 + }, "shit": { "kind": "shit", "title": "Shit", @@ -182,19 +217,11 @@ def buy(v, award): "fireflies": { "kind": "fireflies", "title": "Fireflies", - "description": "Puts stars on the post.", + "description": "Puts fireflies on the post.", "icon": "fas fa-sparkles", "color": "text-warning", "price": 500 }, - "grass": { - "kind": "grass", - "title": "Grass", - "description": "Ban the author permanently (must provide a timestamped picture of them touching grass to the admins to get unbanned)", - "icon": "fas fa-seedling", - "color": "text-success", - "price": 10000 - }, "train": { "kind": "train", "title": "Train", @@ -207,7 +234,7 @@ def buy(v, award): "kind": "pin", "title": "1-Hour Pin", "description": "Pins the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-warning", "price": 750 }, @@ -215,7 +242,7 @@ def buy(v, award): "kind": "unpin", "title": "1-Hour Unpin", "description": "Removes 1 hour from the pin duration of the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-black", "price": 1000 }, @@ -233,7 +260,7 @@ def buy(v, award): "fireflies": { "kind": "fireflies", "title": "Fireflies", - "description": "Puts stars on the post.", + "description": "Puts fireflies on the post.", "icon": "fas fa-sparkles", "color": "text-warning", "price": 500 @@ -250,7 +277,7 @@ def buy(v, award): "kind": "pin", "title": "1-Hour Pin", "description": "Pins the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-warning", "price": 750 }, @@ -258,7 +285,7 @@ def buy(v, award): "kind": "unpin", "title": "1-Hour Unpin", "description": "Removes 1 hour from the pin duration of the post.", - "icon": "fas fa-thumbtack", + "icon": "fas fa-thumbtack fa-rotate--45", "color": "text-black", "price": 1000 }, @@ -357,7 +384,6 @@ def award_post(pid, v): author.unban_utc = 0 author.is_banned = 0 send_notification(NOTIFICATIONS_ACCOUNT, author, f"You have been unbanned!") - elif kind == "grass": author = post.author author.is_banned = AUTOJANNY_ACCOUNT @@ -461,6 +487,17 @@ def award_comment(cid, v): author.ban_reason = f"grass award used by @{v.username} on /comment/{c.id}" link = f"[this comment]({c.permalink})" send_notification(NOTIFICATIONS_ACCOUNT, author, f"Your account has been suspended permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass to get unbanned!") + elif kind == "pin": + if c.is_pinned and c.is_pinned.startswith("t:"): t = int(c.is_pinned[2:]) + 3600 + else: t = int(time.time()) + 3600 + c.is_pinned = f"t:{t}" + g.db.add(c) + elif kind == "unpin": + if not (c.is_pinned and c.is_pinned.startswith("t:")): abort(403) + t = int(c.is_pinned[2:]) - 3600 + if time.time() > t: c.is_pinned = None + else: c.is_pinned = f"t:{t}" + g.db.add(c) c.author.received_award_count += 1 g.db.add(c.author) @@ -473,7 +510,7 @@ def award_comment(cid, v): @admin_level_required(6) def admin_userawards_get(v): - return render_template("admin/awards.html", awards=list(AWARDS.values()), v=v) + return render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v) @app.post("/admin/awards") @limiter.limit("1/second") @@ -523,4 +560,4 @@ def admin_userawards_post(v): g.db.commit() - return render_template("admin/awards.html", awards=list(AWARDS.values()), v=v) \ No newline at end of file + return render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v) \ No newline at end of file diff --git a/files/routes/comments.py b/files/routes/comments.py index 4c718841d..e24365829 100755 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -810,10 +810,11 @@ def toggle_pin_comment(cid, v): comment = get_comment(cid, v=v) - if v.admin_level < 1 and v.id != comment.post.author_id: - abort(403) + if v.admin_level < 1 and v.id != comment.post.author_id: abort(403) - if comment.is_pinned: comment.is_pinned = None + if comment.is_pinned: + if comment.is_pinned.startswith("t:"): abort(403) + else: comment.is_pinned = None else: comment.is_pinned = v.username g.db.add(comment) diff --git a/files/routes/posts.py b/files/routes/posts.py index 5ccac7f48..5fe259418 100755 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1003,3 +1003,16 @@ def unsave_post(pid, v): g.db.commit() return {"message": "Post unsaved!"} + +@app.post("/pin/") +@auth_required +def api_pin_post(post_id, v): + + post = g.db.query(Submission).options(lazyload('*')).filter_by(id=post_id).first() + if post: + post.is_pinned = not post.is_pinned + g.db.add(post) + g.db.commit() + + if post.is_pinned: return {"message": "Post pinned!"} + else: return {"message": "Post unpinned!"} \ No newline at end of file diff --git a/files/templates/award_modal.html b/files/templates/award_modal.html index 7d6a6b969..1db575888 100755 --- a/files/templates/award_modal.html +++ b/files/templates/award_modal.html @@ -28,11 +28,6 @@ -
-
-
-
-					
@@ -67,6 +62,10 @@ background-color: var(--primary)!important; } + .award-columns { + column-count: 2; + } + @media (min-width: 767.98px) { .award-columns { column-count: 8 !important; diff --git a/files/templates/comments.html b/files/templates/comments.html index d79b4554d..8ffa37c63 100755 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -26,7 +26,7 @@ {% if v %} {% include "award_modal.html" %} - + {% endif %} @@ -119,7 +119,7 @@
- {% if c.author.bio_html %}{{c.author.bio_html | safe}}{% endif %} + {% if c.author.bio_html %}{{c.author.bio_html.replace('src="/assets/images/loading.gif" data-', '') | safe}}{% endif %}
@@ -263,14 +263,14 @@ {% if c.active_flags %}{{c.active_flags}} Reports{% endif %} {% if c.over_18 %}+18{% endif %} {% if v and v.admin_level==6 and c.author.shadowbanned %}{% endif %} - {% if c.is_pinned %}{% endif %} + {% if c.is_pinned %}{% endif %} {% if c.distinguish_level %}{% endif %} {% if c.is_op %}{% endif %} {% if c.is_bot %}{% endif %} {% if c.is_blocking %}{% endif %} {% if c.is_blocked %}{% endif %} - {% if c.author.verified %} + {% if c.author.verified %} {% endif %} {{c.author.username}} @@ -435,9 +435,9 @@ {% endif %} {% if v and c.post and (v.admin_level >= 1 or v.id == c.post.author_id) and c.level == 1 %} - Unpin + Unpin - Pin + Pin {% endif %} @@ -579,8 +579,8 @@ {% endif %} {% if v and c.post and (v.admin_level >= 1 or v.id == c.post.author_id) and c.level == 1 %} - Pin - Unpin + Pin + Unpin {% endif %} {% if v %} diff --git a/files/templates/submission.html b/files/templates/submission.html index 1a412193e..5152d3913 100755 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -143,7 +143,7 @@ {% if v %} - + {% include "award_modal.html" %} {% include "emoji_modal.html" %} {% include "gif_modal.html" %} @@ -264,7 +264,7 @@
- {% if p.author.bio_html %}{{p.author.bio_html | safe}}{% endif %} + {% if p.author.bio_html %}{{p.author.bio_html.replace('src="/assets/images/loading.gif" data-', '') | safe}}{% endif %}
@@ -308,8 +308,8 @@ - - + + {% if p.deleted_utc > 0 %} @@ -340,8 +340,8 @@ {% endif %} {% if v.admin_level >=3 %} - - + + {% if v==p.author %} @@ -417,14 +417,14 @@ {% endfor %} {% endif %} {% if v and v.admin_level==6 and p.author.shadowbanned %}{% endif %} - {% if p.stickied %}{% endif %} - {% if p.is_pinned %}{% endif %} + {% if p.stickied %}{% endif %} + {% if p.is_pinned %}{% endif %} {% if p.distinguish_level %} {% endif %} {% if p.is_bot %} {% endif %} {% if p.over_18 %}+18{% endif %} {% if p.private %}Draft{% endif %} {% if p.active_flags %}{{p.active_flags}} Reports{% endif %} - {% if p.author.verified %} + {% if p.author.verified %} {% endif %} {{p.author.username}}{% if p.author.customtitle %}  {% if p.author.quadrant %}{% endif %}{{p.author.customtitle | safe}}{% endif %}  {{p.age_string}} @@ -593,8 +593,8 @@ Report {% if v and v.id==p.author_id %} - Pin to profile - Unpin from profile + Pin to profile + Unpin from profile {% if p.deleted_utc > 0 %} Undelete @@ -603,8 +603,8 @@ {% endif %} {% endif %} {% if v and v.admin_level>=3 %} - Pin - Unpin + Pin + Unpin {% if v==p.author %} Distinguish Undistinguish diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index c15c3af1a..966dad91e 100755 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -44,7 +44,7 @@
- {% if p.author.bio_html %}{{p.author.bio_html | safe}}{% endif %} + {% if p.author.bio_html %}{{p.author.bio_html.replace('src="/assets/images/loading.gif" data-', '') | safe}}{% endif %}
@@ -183,16 +183,16 @@ {% endfor %} {% endif %} {% if v and v.admin_level==6 and p.author.shadowbanned %}{% endif %} - {% if p.stickied %}{% endif %} + {% if p.stickied %}{% endif %} {% if p.distinguish_level %}{% endif %} - {% if p.is_pinned and request.path.startswith('/@') %}{% endif %} + {% if p.is_pinned and request.path.startswith('/@') %}{% endif %} {% if p.over_18 %}+18{% endif %} {% if p.is_bot %} {% endif %} {% if p.is_blocking %}{% endif %} {% if p.is_blocked %}{% endif %} {% if p.private %}Draft{% endif %} {% if p.active_flags %}{{p.active_flags}} Reports{% endif %} - {% if p.author.verified %} + {% if p.author.verified %} {% endif %} {{p.author.username}}{% if p.author.customtitle %}  {% if p.author.quadrant %}{% endif %}{{p.author.customtitle | safe}}{% endif %}  {{p.age_string}} @@ -239,8 +239,8 @@ Report {% if v and v.id==p.author_id %} - Pin to profile - Unpin from profile + Pin to profile + Unpin from profile {% if p.deleted_utc > 0 %} Undelete @@ -250,8 +250,8 @@ {% endif %} {% if v and v.admin_level>=3 %} - Pin - Unpin + Pin + Unpin {% if v==p.author %} Distinguish Undistinguish @@ -386,8 +386,8 @@ {% endif %} - - + + {% if p.deleted_utc > 0 %} @@ -418,8 +418,8 @@ {% endif %} {% if v.admin_level >=3 %} - - + + {% if v==p.author %} diff --git a/files/templates/userpage.html b/files/templates/userpage.html index cae0de909..9a4772aed 100755 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -87,7 +87,7 @@ {% endif %} - {% if u.verified %}{% endif %} + {% if u.verified %}{% endif %} {% if u.admin_level > 1 or (u.admin_level == 1 and (not v or v.admin_level < 2)) %} @@ -362,7 +362,7 @@
BANNED USER{% if u.ban_reason %}: {{u.ban_reason}}{% endif %}
{% if u.unban_utc %}
{{u.unban_string}}
{% endif %} {% endif %} - {% if u.verified %} {% endif %} + {% if u.verified %} {% endif %}

{{u.username}}

{% if u.username != u.original_username %}