Commit Graph

15930 Commits (58c4b621635e52f55a2c287ef1ab3aff7db8add2)

Author SHA1 Message Date
float-trip 58c4b62163 Some fixes (#300)
* Narrow emoji_regex

* Fix mirrored pat emojis

* Fix ban icon on posts/comments
2022-06-02 19:18:10 -04:00
Aevann1 c839dd5103 sneed 2022-06-02 23:00:01 +00:00
Aevann1 738ab0bb5d sneed 2022-06-02 13:00:02 +00:00
Snakes 2008c09136 Add 'filter' to allowed_styles. 2022-06-02 06:14:20 -04:00
Snakes 71b0022d5c Fix df3127785a9: broke JSON syntax. 2022-06-02 05:28:12 -04:00
Snakes df3127785a Rename 'shit emojis.json' for sanity. 2022-06-02 05:15:41 -04:00
Snakes f799612b66 emoji content: hard wrap json, add 4 more. 2022-06-02 05:13:30 -04:00
Aevann1 e6f05da9c2 sneed 2022-06-02 08:55:47 +00:00
Aevann1 007a1110fb sneed 2022-06-02 08:28:10 +00:00
Aevann1 64e6c91d21 sneed 2022-06-02 08:27:50 +00:00
Snakes 793e580ed3 Move badge_defs SQL from seed-db to sneed.
The recent commit 9168676f78 expanded schema.sql to contain the
badge_defs table contents. Because seed-db.sql was never properly
maintained, I see it as more desirable to have it exported by our
(slightly janky) server auto-commit pipeline.

Additionally, seed-db.sql had badge_defs INSERTs removed.
While working on the file, the bulk `INSERT INTO marseys...` line was
hard-wrapped for clarity and sanity.
2022-06-01 22:38:59 -04:00
Aevann1 9168676f78 sneed 2022-06-02 02:32:38 +00:00
Aevann1 659818c978 sneed 2022-06-02 02:00:02 +00:00
Aevann1 12f51a33cf sneed 2022-06-02 00:38:34 +00:00
Snakes 9bb84baf61 theme: Fix dramblr readability. 2022-06-01 20:01:26 -04:00
Snakes aa9b59e1cb Improve lottery UI theme compat. 2022-06-01 18:07:02 -04:00
Snakes fd1429a82f PCM content: swap banner. 2022-06-01 16:08:33 -04:00
float-trip d1fd7d4cc3 Remove margin-bottom on header tags in blockquotes (#299) 2022-06-01 02:31:34 -04:00
Snakes 227ddbec0e Truncate notifs with too-long bodies.
In general, we don't do a great job of length validating body_html
fields. Lots of ways to get 500 errors by providing too long of
input. Really ought to find a way to fix it in the classes/comment.py
and classes/submission.py classes. In the interim, the recent gifts
messages change is salient because the notification can 500 out
mid-way through performing coin transactions.

Recommended to find a better way of truncating or safely bubbling
the exception up. Truncating probably not best long-term solution
because it could hypothetically permit strings that would otherwise
be considered unsanitized.
2022-06-01 00:54:05 -04:00
Snakes 1d49012c16 Revise 16587cdf7cf5, expand assetcache.
Assetcache: now supports js/userpage.js & js/userpage_v.js.
The three userpage*.html templates now implement it.

Revising gift messages 16587cdf7cf5:
  - routes/users.py: Deduplicate code, more descriptive var name.
  - templates/userpage.html: Move post-tax gift line below reasons
    box. Ultimately just an aesthetic change.
2022-06-01 00:11:23 -04:00
Ubuntu 453d5f57a3 added a gift message to go with coin and bux transfers 2022-06-01 00:10:33 -04:00
Snakes 49622b3268 Lottery: add admin participants listing. 2022-05-31 23:20:39 -04:00
Snakes 193adb82d2 Lottery: fix page ready listener. 2022-05-31 22:55:31 -04:00
Snakes 8ae84214a3 Disable modal backdrop when !animations setting.
Some users have complained about performance with the backdrop-filter
on .modal-backdrop.show. Partially as a kludge to avoid adding another
toggle, the 'animations' user setting now also disables the backdrop
filter. In practice, this may turn into a more general setting to
remove performance-intensive UI effects.
2022-05-31 21:03:04 -04:00
Snakes 79e338de38 Treasure: raise minimum reward 10 -> 12.
A rare case where users receive 0 lotto tickets from a treasure chest
occurs when they received 10 or 11 coins from a chest pre-conversion
to lotto tickets. Rather than change ticket_count to the ceil of
dividing coins by ticket cost, it seems less distortionary to instead
imperceptibly raise the minimum to avoid this case.
2022-05-31 20:23:19 -04:00
Aevann1 ac8f726d88 sneed 2022-05-31 22:00:02 +00:00
Aevann1 d8265bb1db sneed 2022-05-31 21:00:01 +00:00
Aevann1 931582d033 sneed 2022-05-31 20:00:01 +00:00
Aevann1 6c9c1c7c89 sneed 2022-05-31 19:00:01 +00:00
Snakes b63e7c3d36 Cachebust badge images. 2022-05-31 13:07:08 -04:00
Aevann1 e21acd77af sneed 2022-05-31 17:00:01 +00:00
Aevann1 64c9422d1b sneed 2022-05-31 06:00:01 +00:00
Snakes 5d56e71cc9 Rate limiter: fix 81e2a5a for logged-out. 2022-05-30 23:50:56 -04:00
Snakes 4ba2098612 Rate limiter: whitelist admins.
Due to presently hitting perpetual 429s after a mishap with lottery
polling on production, among past events where admins have gotten
rate-limited for doing otherwise normal admin behavior, the
flask_limiter.Limiter now has a request filter to whitelist JL2+.
Despite running on every request, I don't anticipate this undermining
the DoS prevention power of the Limiter.

It is yet unknown whether there are edge cases where running
get_logged_in_user in a different spot in the request pipeline might
e.g. subtly break the logged-in counters. This is not expected at
present, however.
2022-05-30 23:01:18 -04:00
Snakes c73f97c183 Finalize assets for lottery page. 2022-05-30 22:44:32 -04:00
outruncolors c2f598a17f Move lottery to own page (#296) 2022-05-30 22:40:38 -04:00
Snakes b85f23becb assetcache: Bust 2dda7529a4, expand. 2022-05-30 20:20:14 -04:00
outruncolors 2dda7529a4 Minor styling changes (#295) 2022-05-30 20:13:25 -04:00
Aevann1 be53792dd2 sneed 2022-05-30 16:00:02 +00:00
Snakes 04a878a8c4 Make betting polls respect can_gamble. 2022-05-30 08:13:11 -04:00
Snakes e32a4bda48 Add set/unset nsfw on comment to modlog. 2022-05-30 08:00:16 -04:00
Snakes 75758dd511 Feeds: make RSS valid, part trois.
Hopefully finishes the RSS fix saga. This one done in-house rather
than by patch, as 5d6d4f9ca0 and 29fdc774a9 had been.

This final change ensures the <updated> tag is always used, even
for un-edited posts. This appears to pass the W3C Validator using
local test data. We shall see how it behaves with data on prod.
2022-05-30 07:27:52 -04:00
Aevann1 ddc4fe756e Merge branch 'frost' of https://github.com/Aevann1/Drama into frost 2022-05-30 13:07:35 +02:00
Aevann1 d1eda8c28c fixing https://chapotraphouse.club/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/2021592?context=8#context 2022-05-30 13:07:03 +02:00
Snakes 29fdc774a9 Feeds: make valid, part deux.
Continuation of 5d6d4f9ca0. Again, h/t to our friends at WPD
for providing a patch.
2022-05-30 06:58:42 -04:00
Snakes b3604cca9f Remove chat icon from mobile header.
3106823511 added a chat icon to the navbar on mobile. I forgot that
the bottom navbar on mobile already had one. It has therefore been
removed, thus totally alleviating issues with wrapping when a user
is both an admin and has a high notification count.
2022-05-30 06:31:07 -04:00
Aevann1 6b62f49456 sneed 2022-05-30 09:40:22 +00:00
Snakes 81e19b1aed Add can_gamble user setting.
Users now have a toggleable can_gamble setting which disables their
ability to use all chance-based gains on the site: viz. slots,
blackjack, the lottery, and treasure chests.

This only applies on invocation of commands that start gambling
games, so it should cause no bugs when toggled with e.g. active
blackjack games.

This was added for the benefit of users with actual problems with
gambling, be they past addiction or religious conviction. All future
gambling features are humbly requested to respect it.
2022-05-30 05:32:45 -04:00
Snakes 470a3c76f5 Cache-bust main.css for d19a73c82. 2022-05-30 04:54:46 -04:00
Snakes 15d2be85f2 Remove delayed color change on voting. 2022-05-30 04:52:33 -04:00