diff --git a/.gitignore b/.gitignore index 2f844f36d..049e87560 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ cache/ __pycache__/ *.py[cod] *$py.class -chart.png +chart.webp # C extensions *.so diff --git a/files/assets/images/star.png b/files/assets/images/fireflies.webp similarity index 100% rename from files/assets/images/star.png rename to files/assets/images/fireflies.webp diff --git a/files/assets/js/star.js b/files/assets/js/fireflies.js similarity index 97% rename from files/assets/js/star.js rename to files/assets/js/fireflies.js index c9e26df5b..6ef08aec7 100644 --- a/files/assets/js/star.js +++ b/files/assets/js/fireflies.js @@ -3,7 +3,7 @@ Released under MIT-style license. Original Screen Bug http://screen-bug.googlecode.com/git/index.html */ -var BugDispatch={options:{minDelay:500,maxDelay:1E4,minBugs:2,maxBugs:20,minSpeed:5,maxSpeed:10,maxLargeTurnDeg:150,maxSmallTurnDeg:10,maxWiggleDeg:5,imageSprite:"star.png",bugWidth:13,bugHeight:14,num_frames:5,zoom:10,canFly:!0,canDie:!0,numDeathTypes:3,monitorMouseMovement:!1,eventDistanceToBug:40,minTimeBetweenMultipy:1E3,mouseOver:"random"},initialize:function(a){this.options=mergeOptions(this.options,a);this.options.minBugs>this.options.maxBugs&&(this.options.minBugs=this.options.maxBugs); +var BugDispatch={options:{minDelay:500,maxDelay:1E4,minBugs:2,maxBugs:20,minSpeed:5,maxSpeed:10,maxLargeTurnDeg:150,maxSmallTurnDeg:10,maxWiggleDeg:5,imageSprite:"fireflies.webp",bugWidth:13,bugHeight:14,num_frames:5,zoom:10,canFly:!0,canDie:!0,numDeathTypes:3,monitorMouseMovement:!1,eventDistanceToBug:40,minTimeBetweenMultipy:1E3,mouseOver:"random"},initialize:function(a){this.options=mergeOptions(this.options,a);this.options.minBugs>this.options.maxBugs&&(this.options.minBugs=this.options.maxBugs); this.modes=["multiply","nothing"];this.options.canFly&&this.modes.push("fly","flyoff");this.options.canDie&&this.modes.push("die");-1==this.modes.indexOf(this.options.mouseOver)&&(this.options.mouseOver="random");this.transform=null;this.transforms={Moz:function(a){this.bug.style.MozTransform=a},webkit:function(a){this.bug.style.webkitTransform=a},O:function(a){this.bug.style.OTransform=a},ms:function(a){this.bug.style.msTransform=a},Khtml:function(a){this.bug.style.KhtmlTransform=a},w3c:function(a){this.bug.style.transform= a}};if("transform"in document.documentElement.style)this.transform=this.transforms.w3c;else{var b=["Moz","webkit","O","ms","Khtml"],c=0;for(c=0;c/awards") diff --git a/files/routes/posts.py b/files/routes/posts.py index b592df802..bc513325e 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -63,6 +63,10 @@ def publish(pid, v): cache.delete_memoized(frontlist) + for follow in v.followers: + user = get_account(follow.user_id) + send_notification(AUTOJANNY_ACCOUNT, user, f"@{v.username} has made a new post: [{post.title}](https://{site}{post.permalink})") + g.db.commit() return {"message": "Post published!"} @@ -616,10 +620,6 @@ def submit_post(v): if url.startswith("https://streamable.com/") and not url.startswith("https://streamable.com/e/"): url = url.replace("https://streamable.com/", "https://streamable.com/e/") - if "i.imgur.com" in url and "_d." not in url: - url = url.replace(".png", "_d.png").replace(".jpg", "_d.jpg").replace(".jpeg", "_d.jpeg") - if "_d." in url: url += "?maxwidth=9999" - repost = g.db.query(Submission).join(Submission.submission_aux).options(lazyload('*')).filter( SubmissionAux.url.ilike(url), Submission.deleted_utc == 0, diff --git a/files/routes/settings.py b/files/routes/settings.py index d8112d515..1e0bdad7d 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -318,25 +318,25 @@ def gumroad(v): if tier == 1: if v.discord_id: add_role(v, "1") grant_awards["shit"] = 1 - grant_awards["stars"] = 1 + grant_awards["fireflies"] = 1 elif tier == 2: if v.discord_id: add_role(v, "2") grant_awards["shit"] = 3 - grant_awards["stars"] = 3 + grant_awards["fireflies"] = 3 elif tier == 3: if v.discord_id: add_role(v, "3") grant_awards["shit"] = 5 - grant_awards["stars"] = 5 + grant_awards["fireflies"] = 5 grant_awards["ban"] = 1 elif tier == 4: if v.discord_id: add_role(v, "4") grant_awards["shit"] = 10 - grant_awards["stars"] = 10 + grant_awards["fireflies"] = 10 grant_awards["ban"] = 3 elif tier == 5 or tier == 8: if v.discord_id: add_role(v, "5") grant_awards["shit"] = 20 - grant_awards["stars"] = 20 + grant_awards["fireflies"] = 20 grant_awards["ban"] = 6 thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).first().id diff --git a/files/templates/admin/admin_home.html b/files/templates/admin/admin_home.html index 97f3679f7..a2373e269 100644 --- a/files/templates/admin/admin_home.html +++ b/files/templates/admin/admin_home.html @@ -23,7 +23,6 @@ #### Safety * [Banned Domains](/admin/banned_domains) -* [Remove image from imgur and from cloudflare cache](/admin/image_purge) * [Perceptive Hash Image Ban](/admin/image_ban) * [Multi Vote Analysis](/admin/alt_votes) diff --git a/files/templates/admin/image_purge.html b/files/templates/admin/image_purge.html deleted file mode 100644 index bb1604805..000000000 --- a/files/templates/admin/image_purge.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "default.html" %} - -{% block title %} -Purge Image - -{% endblock %} - -{% block content %} -

Imgur and Cloudflare Image Purge

-

Paste an image link here to remove it from imgur and from cloudflare cache. You need to enter the full url of the image like this "https://i.imgur.com/63OclpM_d.png?maxwidth=9999"

- -
- - - -
- - -{% endblock %} \ No newline at end of file diff --git a/files/templates/email/2fa_remove.html b/files/templates/email/2fa_remove.html index 34cffae45..850ea1d76 100644 --- a/files/templates/email/2fa_remove.html +++ b/files/templates/email/2fa_remove.html @@ -1,37 +1,37 @@ {% extends "email/default.html" %} -{% block image %}verify.png{% endblock %} +{% block image %}verify.webp{% endblock %} {% block title %}Remove Two-Factor Authentication{% endblock %} {% block preheader %}Remove Two-Factor Authentication.{% endblock %} {% block content %} -

We received a request to remove two-factor authentication from your account. In 72 hours, click the link below.

-

If you didn't make this request, change your password and use the Log Out Everywhere feature in your Security Settings to permanently invalidate the link.

- - - - - - -

Please note that {{'SITE_NAME' | app_config}} will never ask you for your email, password, or two-factor token via email, text, or phone.

- - - - - +

We received a request to remove two-factor authentication from your account. In 72 hours, click the link below.

+

If you didn't make this request, change your password and use the Log Out Everywhere feature in your Security Settings to permanently invalidate the link.

+ + + + + + +

Please note that {{'SITE_NAME' | app_config}} will never ask you for your email, password, or two-factor token via email, text, or phone.

+ + + + + {% endblock %} diff --git a/files/templates/mobile_navigation_bar.html b/files/templates/mobile_navigation_bar.html index 3f3e44d77..2bc3342a0 100644 --- a/files/templates/mobile_navigation_bar.html +++ b/files/templates/mobile_navigation_bar.html @@ -9,7 +9,7 @@
- {% if v %} - {% else %} - {% if v and v.id==p.author_id %} {% if p.private %} - + {% endif %} @@ -119,21 +119,21 @@ {% endif %} {% endif %} - + {% if v and v.id!=p.author_id %} {% endif %} {% if v %} - + - + {% endif %} {% if v %} - - + + {% if v.admin_level >=3 or v.id == p.author.id and v.paid_dues %} @@ -158,7 +158,7 @@ {% endif %} {% if v.admin_level >=4 and p.oauth_app %} - + {% endif %} {% endif %} @@ -179,8 +179,8 @@ {% endif %} {% if v and v.admin_level == 6 and v.id!=p.author_id %} - - + + {% endif %}
@@ -207,13 +207,13 @@ {% endif %} -{% if p.award_count("stars") %} - - {% set minbugs = 10*p.award_count("stars") if p.award_count("stars") <= 5 else 50 %} - {% set maxbugs = 20*p.award_count("stars") if p.award_count("stars") <= 5 else 100 %} +{% if p.award_count("fireflies") %} + + {% set minbugs = 10*p.award_count("fireflies") if p.award_count("fireflies") <= 5 else 50 %} + {% set maxbugs = 20*p.award_count("fireflies") if p.award_count("fireflies") <= 5 else 100 %}