Commit graph

21 commits

Author SHA1 Message Date
moson
f540c79580
housekeep: TU rename - UI elements
Rename all UI elements and translations.

Signed-off-by: moson <moson@archlinux.org>
2023-09-30 16:45:04 +02:00
Kevin Morris
8657fd336e
feat: GET|POST /account/{name}/delete
Closes #348

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-09-30 05:08:50 -07:00
Leonidas Spyropoulos
02d114d575
fix: hide email when account's email hidden is set
Fixes: 362
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2022-05-12 22:51:22 +01:00
Kevin Morris
1545eab81d
feat: add timezone to datetime display across the board
- the "Flagged Out-of-date on ..." link in the package action panel does
  not contain a timezone specifier.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-02-05 18:35:50 -08:00
Kevin Morris
8310357029
fix: only display registration time when RegistrationTS is valid
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-02-04 15:49:45 -08:00
Kevin Morris
80ee7f3d4b
fix(routers.accounts): use User.can_edit_user across the board
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-27 16:05:01 -08:00
Kevin Morris
224a0de784
fix(python): add logged in date field to account/show.html
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-04 01:16:14 -08:00
Kevin Morris
2ea4559b60
fix(python): use correct Status field in account/show.html
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-04 00:54:03 -08:00
Kevin Morris
f8bef16d32
Merge branch 'fix-account-links' into pu 2021-12-04 00:25:57 -08:00
Kevin Morris
973dbf0482
fix(python): use creds to determine account links to display
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-04 00:15:34 -08:00
Kevin Morris
bfa916c7b2
fix(fastapi): fix PGP Key Fingerprint display for account/show.html
There's a space between every 4 characters in the fingerprint
in PHP; we were missing it in FastAPI. This commit fixes that
inconsistency.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-03 23:40:16 -08:00
Kevin Morris
dbe5cb4a33
fix(fastapi): only include comment-edit.js where needed
Closes: #178

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-18 16:42:26 -08:00
Kevin Morris
8dcdc7ff38
change(fastapi): decouple account comment templates
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-10-29 18:28:14 -07:00
Kevin Morris
46c39399ff
fix(fastapi): fix /account/{username} links
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-10-29 17:18:54 -07:00
Kevin Morris
691b7b9091
feat(fastapi): add comment actions to /account/{username}/comments
With this change, we've decoupled some partials shared between
`/pkgbase/{name}` and `/account/{username}/comments`. The comment
actions template now resolves its package base via the `comment`
instance instead of requiring `pkgbase`.

We've also modified the existing package comment routes to
support execution from any location using the `next` parameter.
This allows us to reuse code from package comments for
account comments actions.

Moved the majority of comment editing javascript to its own
.js file.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-10-29 17:18:49 -07:00
Kevin Morris
adb6252f85
feat(fastapi): add /account/{username}/comments
This commit contains a base template of account comments
in sorted order (based on ColumnTS.desc).

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-10-28 13:21:16 -07:00
Kevin Morris
267f2cb2c4
fix(fastapi): remove trailing slashes from fastapi-driven links
With our FastAPI server, trailing slashes causes a 307 redirect
which ends up redirecting users to routes which do not contain
trailing slashes. This removes trailing slashes from our templates
where FastAPI is concerned to avoid unnecessary redirects.

There may still be links or usages around which have unnecessary
usages of a trailing slash; please keep a look out for these and
remove them where possible.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-10-18 22:42:40 -07:00
Steven Guikal
7f72d78dcc fix(FastAPI): correct HTML tags and indentation
Signed-off-by: Steven Guikal <void@fluix.one>
2021-10-18 14:51:01 -04:00
Kevin Morris
021a1c8fb6 add /accounts/ (get, post) routes
Slight markup changes, same style overall and same
form parameters as the PHP implementation.

In addition, we've disabled the "left" and "right"
navigation buttons when we're at the border of the
table.

CSS Changes:

- Added similar styling to submit `<buttons>` that submit `<input>` had.
- Added .results tr td[align="{left,right}"] styling to align
  the result table's `More -->` button to the right of the table.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-07-01 11:08:56 -07:00
Kevin Morris
4f928b4577 add account (view) route
+ Added get /account/{username} route.
+ Added account/show.html template which shows a single use

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-06-05 20:11:17 -07:00
Kevin Morris
4e9ef6fb00 add account edit (settings) routes
* Added account_url filter to jinja2 environment. This produces a path
  to the user's account url (/account/{username}).
* Updated archdev-navbar to link to new edit route.
+ Added migrate_cookies(request, response) to aurweb.util, a function
  that simply migrates the request cookies to response and returns it.
+ Added account_edit tests to test_accounts_routes.py.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-06-05 20:11:17 -07:00