Commit Graph

423 Commits

Author SHA1 Message Date
Eldeberen f10d5404c2
forum: fix #84 2021-02-21 20:17:48 +01:00
Eragon f3bb8858f0
Vérification de l'existence d'une signature pour l'afficher 2021-02-21 12:17:55 +01:00
Eldeberen 0c7474d8ba
pclink: add handle for topics
rewrite some handles in french
2021-02-21 12:02:12 +01:00
Eldeberen cd8ce4f5bc
admin: fix name edition through admin panel (#85) 2021-02-20 19:32:18 +01:00
Eldeberen 894a0b6549
pclink: fix link for users 2021-02-20 19:09:30 +01:00
Lephe 1d457d7e65
topic: fix model preventing Post from polymorphic loading as Topic 2021-02-20 19:03:14 +01:00
Eldeberen d0714d87b0
poll: phoque it. XML is much more restrictive than html 2021-02-20 18:43:37 +01:00
Eldeberen e2c84df6e3
poll: fixed a ***** bug 2021-02-20 18:31:40 +01:00
Eldeberen 5efcadb23e
Merge branch 'polls' into dev 2021-02-20 17:52:59 +01:00
Eldeberen b5630e0079
md: add pclink for users 2021-02-20 17:36:36 +01:00
Lephe c8661ca50f
master: update groups without deleting them 2021-02-20 17:34:56 +01:00
Eldeberen 9d08f81342
poll,md: adds pclink for polls 2021-02-20 17:17:33 +01:00
Darks b08085d54e Merge branch 'dev' into polls 2021-02-20 15:48:30 +01:00
Eldeberen 85dfde3811
md: improved markdown 2021-02-20 15:39:52 +01:00
Eldeberen cd8efcced8
Merge branch 'dev' of gitea.planet-casio.com:devs/PCv5 into polls 2021-02-20 01:36:04 +01:00
Eldeberen fabad32955
polls: add a panel to manage own polls 2021-02-20 01:28:08 +01:00
Eldeberen 0801b8ec16
poll: add poll creation form 2021-02-20 00:39:22 +01:00
Eldeberen 473448ab5b
poll: add ability to vote
Fixed some bugs too
2021-02-20 00:33:34 +01:00
Eldeberen ec3f33ead0
polls: updated templates 2021-02-19 23:26:10 +01:00
Eldeberen 3b1aa2fc1d
admin-panel: fix users registration date 2021-02-19 22:23:26 +01:00
Eldeberen 169aca8304
polls: added migration 2021-02-19 22:07:43 +01:00
Eldeberen d2c5ddd874
polls: added models 2021-02-19 22:07:31 +01:00
Eldeberen c0bb2f5448
misc: small fixes 2021-02-18 00:04:28 +01:00
Eragon 9273430f9a
#84 Configuration de la durée avant nécropost 2021-01-12 17:34:50 +01:00
Eragon 4ddf60353c
#84 Passage du dernier post en cas de nécropost 2021-01-12 17:30:54 +01:00
Eragon c0ae3cc8ab
#84 Confirmation anti-nécropost 2021-01-12 16:40:52 +01:00
Darks 243ae43783
dev: added support for local development test files 2020-11-13 01:45:55 +01:00
Darks 4aa1802afb
polls: created backbone of models (#72) 2020-11-12 00:11:33 +01:00
Darks 63baae9683
Merge branch 'glados' of gitea.planet-casio.com:devs/PCv5 into dev 2020-11-11 13:47:24 +01:00
Darks 98de289ea1
glados: added glados socket and example wrapper 2020-11-11 13:28:53 +01:00
Lephe 1d38f906ee
admin/members: add a dynamic regex/logic filter for the member list
This commit introduces a client-side table filter that supports regexes
and propositional logic to filter table rows.

A table can be filtered if it has the [filter-target] class and its
first row has <th> tags with a [data-filter] attribute specifying column
names.

The filter itself is a div with the [form] and [filter] classes, and a
[data-target] attribute pointing to the table to filter. The filter
contains a text <input> which is passed to filter_update() when the
filter expression is validated.

The client-side filter code runs the expression through a basic lexer
and parser, then matches the result for every row in the target table.
The [textContent] of each cell is used for string and regex matching.
2020-11-02 14:38:28 +01:00
Lephe 13b2bd2671
admin/members: add a full member list
... which can someday be filtered for names, shared IPs, registration
dates, and other useful tools.
2020-11-01 16:12:15 +01:00
Lephe 0be0d5ab65
admin/groups: show only users with groups or special privileges 2020-11-01 15:59:38 +01:00
Lephe 8155cf1550
threads: fix misplaced </td> in template 2020-11-01 15:59:25 +01:00
Lephe 75f3a90f20
master.py: update forums with stateful logic
The create-forums function has been replaced with an [update] subcommand
of [forums]. This new function tries its best to keep existing forum
objects, which is especially important once content has been created.

Forums are identified by their URL. Changing the URL means the forum
needs to be recreated. If the URL doesn't changed, metadata is updated
without removing topics and subforums in that forum.

* Improve the update model for forums in master.py
* Fix a typo in the prefix for the tool projects subforum
* Add the admin and assoc boards for permission testing
2020-11-01 10:50:52 +01:00
Lephe cf9cb8a8c6
forum: add true, recursive deletion methods
Each object has a .delete() which removes it and its owned subcontents.
This delete() unfortunately has to commit the database session because
circularly-dependent objects (such as a thread and its top comment)
cannot be deleted together; two commits are needed.
2020-11-01 10:49:24 +01:00
Lephe bb6450bda2
editor: don't autofocus by default
Autofocus prompts the browser to scroll to the editor when the page
loads, which makes little to no sense on topic pages where the important
information is at the top.
2020-10-31 22:15:03 +01:00
Lephe 36ccb16536
thread: use the thread widget for top comments
This allows the top comment to be permalinked and edited as any comment,
following the intent of pinning normal comments to the top.
2020-10-31 15:35:00 +01:00
Lephe c7846c4f8b
threads: improve layout and flow of messages
* When there is enough space, put links and date on the right
* On small screens, compact profile information
* On small screens, leave links and date on the right to maximize
  message width
2020-10-31 15:35:00 +01:00
Lephe 05c16b8fa8
threads: hide signature delimiter if there is no signature 2020-10-31 15:35:00 +01:00
Darks ee01a4c768
master.py: split generation of trophies and generation of icons
May be used in development environment when database is populated and 
deleting/recreating trophies throws an error because it will broke 
non-null relationships.
2020-10-31 10:15:07 +01:00
Lephe 93e5fc380a
admin: improve display of trophies 2020-10-31 09:53:55 +01:00
Lephe a95a88f3b1
app: send cookies with Secure and SameSite=Lax (#60)
Sending cookies without Secure and without SameSite causes Firefox to
ignore or invalidate them, which disconnects accounts seemingly randomly.
2020-10-30 14:06:33 +01:00
Lephe e06363715e
forum: match topic title length in creation form with model
Model has titles of up to 128 characters, but the form limits that input
to 32 characters. Bump that to 128 too.
2020-10-30 09:36:21 +01:00
Darks ed231f6524
fix CSRF token for message preview (#77) 2020-10-07 21:47:21 +02:00
Eragon 227087ebbc
Issue #76 Refactoriser les messages flash
Javascript :
Supression du javascript inutile, l'entièreté du bloc du flash.

CSS :
Alignement plus correct des notifications flash, fini le fixed, 15%
place au margin auto.
Ajout d'une marge pour éviter l'effet «bloc».
Héritage des propriétés de couleur du texte et du fond de la classe supèrieure.

Modification des templates :
Les messages sont désormais chargés avant le contenu et après le header.
2020-10-01 22:16:15 +02:00
Darks 510b57c08c
posts: fix attachements deletion 2020-09-26 15:17:55 +02:00
Darks 3b188e3bab
posts: add deletion 2020-09-26 14:55:55 +02:00
Darks 0d8dd70956
security: add CSRF protection globally
The decorator @check_csrf can be used to check CSRF protection when 
using GET links (like delete a post or logout)
2020-09-26 14:48:30 +02:00
Darks 8edeb052e2
templates: added <hr> separation between comment and signature 2020-09-26 12:31:17 +02:00