Commit Graph

631 Commits (eb98740f972fe3e87e1b7d6757a0afa6792031a6)

Author SHA1 Message Date
Aevann1 ad1273995d notifications rework 2022-07-08 20:06:54 +02:00
Aevann1 b617321529 move all env-getting to .const 2022-07-08 18:21:13 +02:00
Snakes 6ad935e12a Permission flags UI visibility; start PERMS dict.
Original work started for WPD and LGB, who wish to restrict flags
visibility in the UI based on admin_level. To support this change and
upcoming changes, `const.PERMS: string -> int` was created.
Potentially targetting a future design where Permissions is a proper
business object integrated with the User model; however, for now just
looking toward getting admin_level magic numbers centralized.

This commit applies PERMS to: create_hole, flags visibility in UI,
flag removal in UI & backend. Flag visibility in Comment & Submission
json_raw methods is unaffected to avoid needing a user object to
build the JSON.
2022-07-06 23:45:33 -04:00
Aevann1 72013dcb43 fix 500 error 2022-07-04 03:05:26 +02:00
Snakes 9e1a3be278 Fix DMs improperly treating all users as blocked.
The changes to helpers/get.py @ get_user(...) in a6b7fed2fc resulted
in `is_blocking` no longer being present on all User objects retrieved
via `get_user`. This triggered a latent identifier shadow where the
property method `User.is_blocking` on the User model caused checks for
blocks on objects retrieved via `get_user` to always return True.

Notably: when the get_user return value left `is_blocking` unset and
thus implied False, the following expression yielded True due to the
presence of the first-class function at the same identifier:

    hasattr(user, 'is_blocking') and user.is_blocking
2022-07-03 13:55:25 -04:00
Aevann1 ed86ec1c14 more query optimization v3 2022-07-03 13:56:40 +02:00
Aevann1 3245656787 show timestamps in the user timezone 2022-07-03 09:41:25 +02:00
Aevann1 1f0f0ef0be messing with joins 2022-07-03 08:12:53 +02:00
Aevann1 6c5b5a5314 add a "subscribed" tab in ur profile page to show posts u subscribed to 2022-07-03 04:43:49 +02:00
Aevann1 d0d15c319a Poll rework (#312)
* poll rework

* forgot to do joinedload on comments

* Fix logic errors with voting, SQL syntax.

Kitchen sink commit from review of poll-rework changes:
  1. Fix seed-db.sql syntax error.
  2. Fix SQL patch file duplication of *submissions* tables rather
     than one set of submissions and one for comments.
  3. Start makeshift SQL patch folder, since this is a large change
     that contributors may wish to apply to their local instances.
  4. Fix checkbox (non-`exclusive`) polls being unable to be
     unchecked. For consistency with `exclusive` polls, they should.
  5. Fix changing the option of an `exclusive` poll when both
     exclusive and non-exclusive options are present in one comment/
     post causing the non-exclusive options to become unchecked.
     (which, by my reading of SQLAlchemy `Query.one_or_none()`
     really could break quite badly in some cases).

* link relationships with their counterparts

* small modification to poll unchecking

Co-authored-by: TLSM <duolsm@outlook.com>
2022-07-02 08:48:04 +02:00
Aevann1 5661cdb271 Revert "try to cut down on number of db queries"
This reverts commit c674c6a056.
2022-06-29 08:43:20 +02:00
Aevann1 c674c6a056 try to cut down on number of db queries 2022-06-29 08:14:25 +02:00
Aevann1 c341be2866 show posts by users who block you 2022-06-29 05:07:00 +02:00
Aevann1 b1ef8e4c62 add poorcel mode 2022-06-27 04:14:53 +02:00
Aevann1 2a8b7bf281 undefer css (1 less query) 2022-06-26 07:39:46 +02:00
Aevann1 e36adb5bf4 reduce query volume, badge edition 2022-06-26 07:11:25 +02:00
Aevann1 3b8188fd67 fixed version of d83d47e280 2022-06-26 03:22:05 +02:00
Aevann1 a1b137447e Revert "reduce query volume #1"
This reverts commit d83d47e280.
2022-06-26 03:12:31 +02:00
Aevann1 cff34fb3a4 reducing query volume, #2 2022-06-26 03:11:02 +02:00
Aevann1 cd4b3b7d3b Merge branch 'frost' of https://github.com/Aevann1/Drama into frost 2022-06-26 02:50:49 +02:00
Aevann1 d83d47e280 reduce query volume #1 2022-06-26 02:50:47 +02:00
Snakes 7b38be0101 Reduce query volume in user.user_awards.
The User model class method user_awards previously made one query
per type of award. This has been replaced with a new query that
retrieves all owned award quantities at once using GROUP BY.
2022-06-25 20:22:56 -04:00
Aevann1 ceb72a470c add more @lazy to functions 2022-06-23 18:36:39 +02:00
Aevann1 3023a45d75 fix posts refactor 2022-06-22 22:03:10 +02:00
Aevann1 10a47ca837 refactor sorting posts 2022-06-22 21:57:57 +02:00
Aevann1 8ecb4582d0 refactor sorting comments 2022-06-22 21:50:20 +02:00
Aevann1 d704592bdd cache-bust all previously broken images 2022-06-22 17:59:47 +02:00
Aevann1 20585ca543 add a shortened endpoint for static images and rename loading.webp to l.webp (to save bytes) 2022-06-22 17:51:19 +02:00
Snakes e2cd25db67 WPD: limit hole creation to JL2+. 2022-06-21 01:20:21 -04:00
Snakes f6b6997f61 Persist activity timestamp to users. 2022-06-20 16:25:03 -04:00
Snakes dee8eb5154 Replace loading.webp with new marseyloading. 2022-06-19 22:15:33 -04:00
Aevann1 f1f30635b2 hide deleted posts and comments from userpages (frequently requested) 2022-06-19 01:55:45 +02:00
Aevann1 f60db1598d replace "g.db.query" on pkeys with the much more efficient "g.db.get" 2022-06-18 02:57:23 +02:00
Snakes 564f5b38f1 Clarify notif color logic, extend to modaction.
Previously, notification bell linking & color logic was interspersed
between templates and the user model. It doesn't _really_ belong in
the user model, but it's been moved out of the templates to there to
at least centralize it. This was also used as an opportunity to make
the modactions inbox color the bell appropriately.
2022-06-15 01:43:34 -04:00
Snakes acde2c856b Enable JL2 viewing shadowbanned comments. 2022-06-12 05:48:27 -04:00
Aevann1 545f276940 add created_utc column to badges for ordering them on userpages 2022-06-10 23:40:43 +02:00
Aevann1 2db414f12d Merge branch 'frost' of https://github.com/Aevann1/Drama into frost 2022-06-10 14:48:14 +02:00
Aevann1 2b82f95a98 Make hole cost constant instead of variable 2022-06-10 14:48:11 +02:00
Snakes 4db48a6ec9 Separate modaction notifs from inbox. 2022-06-10 08:28:46 -04:00
Snakes 8709ca816d Add Y'all Seein' Eye award v2 for offsitementions.
Reusing the assets and design for the ill-fated YSE in a0f441a67d.
This time, the award provides access to our offsite mentions (reddit
notifs).
2022-06-10 07:12:19 -04:00
Snakes dc7f13304e Add following holes for notifications. 2022-06-09 16:24:24 -04: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 5b6ba1ac82 Merge remote-tracking branch 'mccoxmaul/add-lottershe' into frost 2022-05-29 23:52:04 -04:00
Aevann1 aff30db1fe make sure the post/comment for which someone was banned is linked everywhere (for convenience) 2022-05-30 04:55:51 +02:00
Snakes 0a73083e8a Add settings toggle for UI animations. 2022-05-29 03:08:28 -04:00
Outrun Colors, LLC 469c39dca6 Configure admin section and purchasing a ticket full flow 2022-05-28 22:33:44 -05:00
Aevann1 f823396239 sdf 2022-05-27 02:08:28 +02:00
Aevann1 2a9df987b3 fsd 2022-05-27 02:03:04 +02:00
Aevann1 de40b074ac yes 2022-05-26 03:30:25 +02:00
Aevann1 163267c88c Revert "Add Y'all Seein' Eye award."
This reverts commit a0f441a67d.
2022-05-26 02:51:42 +02:00
Aevann1 65388d3e57 sfd 2022-05-26 01:50:13 +02:00
Snakes a0f441a67d Add Y'all Seein' Eye award.
Adds award to enable viewing profile visitors for non-mops and
non-patrons. This commit should encompass all frontend, backend, and
database changes necessary. Perhaps usable as a model for other
user upgrade flag awards.
2022-05-25 19:44:34 -04:00
Aevann1 50b995d3a0 fds 2022-05-25 22:16:26 +02:00
Aevann1 3706d3d22c sdf 2022-05-25 20:36:09 +02:00
Aevann1 5b1477acfc certified good commit 2022-05-25 19:01:29 +02:00
Aevann1 b08d374b4b fds 2022-05-25 17:47:15 +02:00
Snakes 53a80af241 Restore old agendaposter pfps system, add more.
Restores agendaposter pfps from 1576fcd57d and adds 52-57.
Also restores code in classes/user.py which implements them.
2022-05-25 00:41:23 -04:00
Snakes cc75375c82 Un-deploy Birthgay event.
Removes temporary changes for the Birthgay 2022 event, ending
approximately at 2022-05-23 0600Z. Changes:
 - Double XP disabled.
 - Lootboxes disabled.
 - Three event awards given real descriptions and colors.
 - Partyhats: restored to cakeday-only condition and tooltip.
 - Header UI: balloons removed, text visibility outline removed,
   journoid banner reverted, marseyjam as header icon.
 - Birthgay banners: removed from template, moved to new storage dir.

Confetti, though remaining as a permanent award, has been temporarily
removed pending a less performance-intensive implementation and one
that doesn't require maintaining a third-party package in the codebase.
2022-05-23 01:48:25 -04:00
Aevann1 969d1898b5 vid refactor 2022-05-22 18:13:19 +02:00
Aevann1 20cc20d806 fsd 2022-05-21 14:36:22 +02:00
Aevann1 aed84df4ad fsd 2022-05-20 20:45:12 +02:00
Snakes c789f6923e Merge remote-tracking branch 'upstream/frost' into birthgay-staging 2022-05-19 17:59:35 -04:00
Snakes 69dec16f55 Shop badge discount: fix Spender, add Roller disc.
The shop discount from Big Spender badges was incorrectly implemented:
intended behavior was for 2pp per badge. However, the values in
const.py were set as if a user could only have one Spender badge at
once, while user.py @ discount was implemented as if they were
additive. Since users factually do have multiple big spender badges,
the values in const were adjusted to reflect this fact.

Also, lootbox Roller badges now each offer a 1pp discount.
users.py @ discount was improved to check against the `discounts`
keys for appropriate badges, rather than a hardcoded list.
2022-05-19 13:41:04 -04:00
Aevann1 45da8f0f35 sdf 2022-05-09 14:15:23 +02:00
Aevann1 b71ae6cc74 sf 2022-05-09 13:21:49 +02:00
Aevann1 f2039d7713 sfd 2022-05-07 06:13:19 +02:00
Aevann1 c5f5342373 sdf 2022-05-06 00:55:34 +02:00
Aevann1 2008bc76c1 cakedays 2022-05-05 01:31:11 +02:00
Aevann1 6b10d097a2 mn 2022-05-05 01:09:46 +02:00
Aevann1 5e2da5673c fsd 2022-05-03 06:28:42 +02:00
Aevann1 9eeb214a24 fsd 2022-05-02 03:45:22 +02:00
Aevann1 ccfbbba09a fsd 2022-05-02 03:42:59 +02:00
Aevann1 f59286b202 fsd 2022-05-02 03:41:08 +02:00
Aevann1 bc2a20cd4b sfd 2022-05-01 23:44:38 +02:00
Aevann1 a6b26ece67 fsd 2022-04-29 17:19:50 +02:00
Aevann1 d961ffc913 fds 2022-04-28 02:04:01 +02:00
Aevann1 957c97f2c7 sfd 2022-04-26 15:33:39 +02:00
Aevann1 0f05bf3f94 fsd 2022-04-26 00:28:20 +02:00
Aevann1 5c21180705 Revert "vxc"
This reverts commit 4d0c7ba456.
2022-04-25 23:59:12 +02:00
Aevann1 4d0c7ba456 vxc 2022-04-25 18:38:06 +02:00
Aevann1 c7d3401b62 fds 2022-04-18 00:47:30 +02:00
Aevann1 ee7063f70e fds 2022-04-16 01:28:02 +02:00
Aevann1 2e07356b3e vdvg 2022-04-16 01:21:30 +02:00
Aevann1 6a8eff8393 fds 2022-04-16 01:19:27 +02:00
Aevann1 99cb01d9fc fdsfds 2022-04-15 18:28:08 +02:00
Aevann1 a158c2b4ea fds 2022-04-14 19:29:53 +02:00
Aevann1 543b9a73cb rfds 2022-04-14 19:20:00 +02:00
Aevann1 b15786fb2b fds 2022-04-11 12:23:52 +02:00
Aevann1 51ebba5bca gf 2022-04-10 20:42:58 +02:00
Aevann1 30833f8130 fsd 2022-04-10 01:12:59 +02:00
Aevann1 16c16e28b2 fsd 2022-04-06 23:54:07 +02:00
Aevann1 3af80e37e9 fsd 2022-04-06 23:53:14 +02:00
Aevann1 cc2b6eb006 fsd 2022-04-05 21:08:06 +02:00
Aevann1 67d9629eac fds 2022-04-04 01:21:06 +02:00
Aevann1 724ef551fd dgf 2022-04-03 20:12:37 +02:00
Aevann1 2dd4e6a573 sfd 2022-04-03 20:08:59 +02:00
Aevann1 73af57f141 fsd 2022-04-03 20:05:11 +02:00
Aevann1 2d177ed1d8 spaghetti 2022-04-03 20:01:11 +02:00
Aevann1 2cb4d68267 fsd 2022-04-03 19:37:20 +02:00
Aevann1 7d9b0867c1 fds 2022-04-03 18:20:31 +02:00
Aevann1 7713fd891d fsd 2022-04-02 19:11:35 +02:00
Aevann1 b538d2a24c gdfg 2022-03-31 18:28:53 +02:00
Aevann1 6fc9de8278 deflector award 2022-03-24 00:42:33 +02:00
Aevann1 762f5c5acc gf 2022-03-21 23:46:10 +02:00
Aevann1 fbb30b8bcf fsd 2022-03-18 23:29:06 +02:00
Aevann1 e108147ce1 fds 2022-03-18 23:28:50 +02:00
Aevann1 83c88a9834 sfd 2022-03-17 18:30:13 +02:00
Aevann1 b99de4e936 fds 2022-03-09 04:26:05 +02:00
Aevann1 b35bab0672 hole 2022-03-09 04:04:37 +02:00
Aevann1 514d6ec126 right 2022-03-09 03:44:53 +02:00
Aevann1 b2c5cd93a5 fsd 2022-03-06 21:18:01 +02:00
Aevann1 fd5a0ae9ca subs toggle 2022-03-06 01:53:43 +02:00
Aevann1 770643b4a6 no more quadrants y'all cant behave 2022-03-06 00:16:40 +02:00
Aevann1 f58ce817f6 yeah yeah 2022-03-05 23:01:33 +02:00
Aevann1 ddc7f2d52d blegh 2022-03-05 23:00:01 +02:00
Aevann1 bf391394a8 bad PR 2022-03-05 22:53:39 +02:00
Aevann1 7d44f8456f uk 2022-03-05 21:46:47 +02:00
Aevann1 94f2a69167 N 2022-03-01 01:30:44 +02:00
Aevann1 1576fcd57d farts on u 2022-02-28 04:06:15 +02:00
Aevann1 e139f8d9ad fartin 2022-02-26 16:39:47 +02:00
Aevann1 6cc9cddef0 fug 2022-02-26 16:21:07 +02:00
Aevann1 06e496bc8f annoying 2022-02-26 15:31:49 +02:00
Aevann1 871ad7c6c8 fdfd 2022-02-25 15:26:56 +02:00
Aevann1 1d6190009d fd 2022-02-25 12:52:47 +02:00
Aevann1 14c7148eed fd 2022-02-24 10:28:13 +02:00
Aevann1 791fff3d37 fds 2022-02-24 04:52:46 +02:00
Aevann1 d93f2b2191 fds 2022-02-24 03:55:18 +02:00
Aevann1 8529839d7c cxvfd 2022-02-23 07:19:57 +02:00
Aevann1 5d4b09ef62 fd 2022-02-23 07:02:07 +02:00
Aevann1 fb9c0a23dc exiles 2022-02-16 06:33:13 +02:00
Aevann1 729e4a4c62 g 2022-02-16 03:16:01 +02:00
Aevann1 ec9797ff18 f 2022-02-16 00:54:17 +02:00
Aevann1 d75f70c431 Many to many (#210)
* 8 legs of love

* 8 legs of love 2
2022-02-14 14:25:44 -08:00
Aevann1 6e7bcb5694 gfd 2022-02-14 23:07:31 +02:00
Aevann1 315dcef46a hfg 2022-02-14 21:02:05 +02:00
Aevann1 6d71e8a73a vbc 2022-02-14 18:27:54 +02:00
Aevann1 dc696bf473 cvx 2022-02-14 03:22:26 +02:00
Aevann1 8db4b363f8 nb 2022-02-14 00:35:55 +02:00
Aevann1 bf3e14bba3 big big chungus big chungus big chungus 2022-02-13 03:08:12 +02:00
Aevann1 22eaa9e7f8 xvc 2022-02-13 01:10:29 +02:00
BuckFromRdrama 0da9c36a07 Show modded subs on userpage (#205)
* show modded subs

* remove print lol

* added links
2022-02-11 15:33:25 -08:00
Aevann1 97febe0080 big chungus commit 2022-02-12 01:32:14 +02:00
Aevann1 b9ea8a882f xvc 2022-02-11 20:32:39 +02:00
Aevann1 03f1a106b4 dude subdramas lmao 2022-02-10 22:35:16 +02:00
Aevann1 90fc18bcb8 xvc 2022-02-10 01:29:34 +02:00
Aevann1 8a37c6d118 vxc 2022-02-10 01:12:17 +02:00
Aevann1 c810421821 bv 2022-02-10 01:08:55 +02:00
Aevann1 09b9213a9a fds 2022-02-06 11:29:18 +02:00
Aevann1 fd7fce8ecb dsf 2022-02-06 00:31:11 +02:00
Aevann1 ff60c3c821 ffsd 2022-02-05 23:16:51 +02:00
Aevann1 1eeebf9400 crisis 2022-02-05 23:09:17 +02:00
Aevann1 dbdcb5d56b fds\ 2022-02-05 13:31:05 +02:00
Aevann1 9cde8a1688 fsd 2022-02-05 12:25:36 +02:00
Aevann1 b0b1b4650f hjg 2022-02-04 13:13:59 +02:00
Aevann1 492579d805 Bhm (#189)
* Update user.py

* Update awards.py

* Update comments.py

* Update const.py

* Update awards.py

* Update user.py

* Update const.py

* Update awards.py

* Update comments.py

* use bhm banners

* bhm pfps (#194)

Co-authored-by: beese_buck <16601315+geese-suck@users.noreply.github.com>
Co-authored-by: geese_suck <16601315+cant-be-blenk@users.noreply.github.com>
2022-01-31 20:20:31 -08:00
Aevann1 b0cd33dcf7 biggest money 2022-01-31 03:41:04 +02:00
Aevann1 7d5fc1b090 sdf 2022-01-30 15:40:11 +02:00
Aevann1 c831ca7d2e zxc 2022-01-29 15:57:55 +02:00
Aevann1 5f0b7d9ea7 dfs 2022-01-29 15:53:45 +02:00
Aevann1 e79fb81819 gdfdfg 2022-01-29 15:43:29 +02:00
Aevann1 380f23d356 xcv 2022-01-29 05:19:47 +02:00
Aevann1 951f873a91 fds 2022-01-29 04:48:34 +02:00
Aevann1 70813c686a dfs 2022-01-29 03:20:02 +02:00
Aevann1 c7bab4ec6c fsd 2022-01-28 23:42:09 +02:00
Aevann1 716b4ee2ea czx 2022-01-28 22:02:35 +02:00
Aevann1 0bd1afc70e fsd 2022-01-25 03:59:58 +02:00
Aevann1 c93070b213 bv 2022-01-24 23:38:03 +02:00
Aevann1 dedb9bbaa0 vc 2022-01-24 22:04:23 +02:00
Aevann1 b094e976dc cvvc 2022-01-24 18:49:23 +02:00
Aevann1 823a86b03e cvcv 2022-01-24 18:44:54 +02:00
Aevann1 9b4bd19c74 cxvxc 2022-01-22 18:37:58 +02:00
Aevann1 04f64d494d fdsfd 2022-01-22 18:36:01 +02:00
Aevann1 18a9903086 vxc 2022-01-21 13:55:53 +02:00
Aevann1 a1c94e8869 fds 2022-01-19 14:51:52 +02:00
Aevann1 81078c5877 fds 2022-01-19 11:07:16 +02:00
Aevann1 a16fd4989e df 2022-01-17 20:35:06 +02:00
Aevann1 45c80f01f9 1k 2022-01-17 17:03:51 +02:00
Aevann1 a93b2a1781 bb 2022-01-16 08:06:16 +02:00
Aevann1 db678ed227 bbb 2022-01-16 03:04:31 +02:00
Aevann1 700ade344e bbb 2022-01-16 02:54:04 +02:00
Aevann1 43e2aedbd2 bbbb 2022-01-15 08:01:39 +02:00
Aevann1 ebac7acaec bbb 2022-01-14 14:11:59 +02:00
Aevann1 6ecf15476a g 2022-01-14 01:29:15 +02:00
Aevann1 837410187c bbb 2022-01-13 23:15:36 +02:00
Aevann1 7c6397354e bb 2022-01-13 04:59:17 +02:00
Aevann1 999c24de4d bb 2022-01-13 04:35:00 +02:00
Aevann1 b5762b2e86 fv 2022-01-12 03:19:13 +02:00
Aevann1 a195489edf cc 2022-01-09 19:33:16 +02:00
Aevann1 101aa43006 fds 2022-01-06 22:30:08 +02:00
Aevann1 2c7a98e433 big one 2022-01-06 18:46:09 +02:00
Aevann1 c92c96b498 fds 2022-01-04 15:18:37 +02:00
Aevann1 6357a86ecf fds 2022-01-04 15:13:02 +02:00
kek7198 1ea0a03e8f fix 2022-01-02 19:54:13 -06:00
Aevann1 69f860aa4c fdsfsd 2022-01-02 23:09:48 +02:00
Aevann1 edc7f951d1 fsd 2022-01-02 20:03:51 +02:00
Aevann1 00e5e1c048 fsd 2022-01-02 02:06:46 +02:00
Aevann1 1f885af866 fd 2022-01-02 02:05:22 +02:00
Aevann1 29a8c604e1 big update 2022-01-01 01:45:27 +02:00
Aevann1 2797adc57a fdsfds 2021-12-29 08:43:20 +02:00
Aevann1 c31cf11a1f fds 2021-12-28 21:32:34 +02:00