Commit Graph

68 Commits

Author SHA1 Message Date
1e61522f7a Delete posts after a ban is created for them
After a user is banned for a post, that post now gets deleted. There's
no way to turn this off yet.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-23 21:49:04 -07:00
a5510d9552 Add board selection to ban creation and post ID to ban model
* Board selection is allowed for when you want to make a global ban
* Post ID is added to ban model for referencing later

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-23 18:57:23 -07:00
b64559aba9 Add report record admin and template search
When creating a ban, you can type in to do a search, this is useful for
quickly banning users.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-23 18:16:00 -07:00
789bd0efe9 Ban window now has a more appropriate window color
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-23 16:15:18 -07:00
470a10d2a7 Add ability to create bans from reports
This is done in the admin view and opens a new iframed window. The ban
form is pretty barebones and doesn't have full functionality yet, but
that is coming.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-23 16:03:09 -07:00
28ccd7d73b Add IP bans
Users can be banned by IP address now, either by singular IP or in an IP
range. If they are banned and attempt to post, they will be met with a
"you are banned until X date" screen.

There are a few loose threads with this, and IP bans may be obsolete if
I decide to go the accounts-required-for-posting route. But I think this
is a good start for 4chan style posting.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-20 15:26:35 -07:00
6bda7f4f2d Big upheaval of how the reports system works
* There are now Reports and ReportRecords.
* Reports coordinate to what moderators see, and ReportRecords
  coordinate with the reports that are created by individual users.
* Reports keep track of the report reason and the creating user.
* ReportRecords keep track of the total weight and whether this report
  requires urgent attention or not.
* ReportRecord keeps track of its own weight and urgency because then we
  can sort by weight and urgency in the admin view.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-19 22:03:01 -07:00
fb14fbd4fc Update report success close to actually be one second
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-19 19:26:19 -07:00
b838663d50 Add preliminary report system
The report system is pretty low-tech. However the scaffolding is there
for a lot of new stuff. What we currently have:

* Users can create reports
* Staff can view reports
* Admins can create report templates

There's a post drop-down menu available on all posts now, too. This is
where "report post" menu item lives and other things like that can be
added too.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-14 14:56:50 -07:00
ec011dc047 Add winbox.js to base.html
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-11 23:59:26 -07:00
6d16db0762 Remove unused html file
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 17:39:24 -07:00
bd6a86169d Add redirect to page 1 from bare URL
Previously, you could browse /board/ and /board/page/1/ in the browser
and they would be the same thing. Now, /board/ redirects to
/board/page/1/ to keep things unambiguous.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 16:31:32 -07:00
439035f1d8 Add return link to thread view
When you're looking at a post, there is now a "return" link that will
take you back to page 1 of the board.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 16:30:32 -07:00
994e4904a6 Add page count and links to bottom of board view
Current page shows up on the bottom of every board with next/prev links
where applicable.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 15:14:50 -07:00
fe8ea04d18 Add support for i18n and l10n
The majority of the words on the site are user-generated, but I've tried
to surround everything else with localization calls. I don't know
another language so this will have to do until someone decides to
translate it lol

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 14:19:06 -07:00
6ed47f9957 Add max image upload size limit
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-04 21:14:00 -07:00
e6c60ff93c Add image upload support
Images can be uploaded, thumbnails are created, they're displayed within
the threads themselves. Just like four chans!

There is not an upload size limit set yet. Gotta get on that next.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-04 19:45:36 -07:00
126db039e2 Initial commit
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-03 18:02:04 -07:00