Commit graph

116 commits

Author SHA1 Message Date
Jelle van der Waa
edef6cc6ac chore(css): drop old vendor prefixes
All of these vendor prefixes are already supported by all browsers for
quite a while.
2022-06-30 21:57:52 +02:00
Kevin Morris
49c5a3facf
feat: display stats about total & active TUs on proposals
This patch brings in two new features:
- when viewing proposal listings, there is a new Statistics section,
  containing the total and active number of Trusted Users found in the
  database.
- when viewing a proposal directly, the number of active trusted users
  assigned when the proposal was added is now displayed in the details
  section.

Closes #323

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-03-08 20:28:09 -08:00
Yaron Shahrabani
82972d28e2 All the RTL related changes 2022-01-26 17:19:39 +02:00
Kevin Morris
c07c40bcb6
fix: clean up package action templates (merge, delete, disown)
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-17 11:53:05 -08:00
Kevin Morris
d675c0dc26
feat(python): catch all exceptions thrown through fastapi route paths
This commit does quite a bit:
- Catches unhandled exceptions raised in the route handler and
  produces a 500 Internal Server Error Arch-themed response.
- Each unhandled exception causes a notification to be sent to new
  `notifications.postmaster` email with a "Traceback ID."
- Traceback ID is logged to the server along with the traceback which
  caused the 500: `docker-compose logs fastapi | grep '<traceback_id>'`
- If `options.traceback` is set to `1`, traceback is displayed in
  the new 500.html template.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-09 23:10:02 -08:00
Kevin Morris
9bfe2b07ba
fix(fastapi): render Logged-in as page on authenticated /login
This was missed during the initial porting of the /login route.

Modifications:
-------------
- A form is now used for the [Logout] link and some css was
  needed to deal with positioning.

Closes #186

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-29 19:40:55 -08:00
Kevin Morris
fd8d23a379
fix(fastapi): fix new Logout nav item css
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-29 19:04:55 -08:00
Kevin Morris
69eb17cb0d
change(fastapi): remove the GET /logout route; replaced with POST
Had to add some additional CSS in to style a form button the same
as <a> links are styled.

Closes #188

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-29 16:52:10 -08:00
Steven Guikal
a54a09f61d fix(FastAPI): fix padding on email inputs
Signed-off-by: Steven Guikal <void@fluix.one>
2021-10-05 17:50:22 -04:00
Kevin Morris
5cf7062092
feat(FastAPI): add /packages (get) search
In terms of performance, most queries on this page win over
PHP in query times, with the exception of sorting by Voted or
Notify (https://gitlab.archlinux.org/archlinux/aurweb/-/issues/102).
Otherwise, there are a few modifications: described below.

* Pagination
    * The `paginate` Python module has been used in the FastAPI
      project
      here to implement paging on the packages search page. This
      changes how pagination is displayed, however it serves the
      same purpose. We'll take advantage of this module in other
      places as well.
* Form action
    * The form action for actions now use `POST /packages` to
      perform. This is currently implemented and will be
      addressed in a follow-up commit.
* Input names and values
    * Input names and values have been modified to satisfy the
      snake_case naming convention we'd like to use as much as
      possible.
    * Some input names and values were modified to comply with
      FastAPI Forms: (IDs[<id>]) -> (IDs, <id>).

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-09-19 12:44:19 -07: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
85ba4a33a8 add /tu/{proposal_id} (get, post) routes
This commit ports the `/tu/?id={proposal_id}` PHP routes to
FastAPI into two individual GET and POST routes.

With this port of the single proposal view and POST logic,
several things have changed.

- The only parameter used is now `decision`, which
  must contain `Yes`, `No`, or `Abstain` as a string.
  When an invalid value is given, a BAD_REQUEST response
  is returned in plaintext: Invalid 'decision' value.
- The `doVote` parameter has been removed.
- The details section has been rearranged into a set
  of divs with specific classes that can be used for
  testing. CSS has been added to persist the layout with
  the element changes.
- Several errors that can be discovered in the POST path
  now trigger their own non-200 HTTPStatus codes.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-06-26 01:11:52 -07:00
Jelle van der Waa
d7603fa4d3
Port package details page to pure JavaScript
Use a CSS animation for jQuery.Animate and replace the rest with pure
vanilla JavaScript.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2021-06-21 15:19:22 -04:00
Justin Kromlinger
8d9f20939c Add modified packages RSS feed to frontend 2021-06-12 20:09:56 -07:00
Lukas Fleischer
dd0e090301 Sync CSS with archweb
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2019-10-19 00:19:16 -04:00
Lukas Fleischer
fc9c519852 Display warning when flagging VCS packages
VCS packages should not be flagged out-of-date when the package version
does not match the most recent commit.

Implements FS#62733.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2019-05-25 19:01:33 -04:00
Lukas Fleischer
5a66a381fb Sync CSS with archweb
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2019-05-25 12:40:18 -04:00
Vladimir Panteleev
e3ca3c96e5 Add "Enable notifications" checkbox in "Add Comment" form
Currently, it is a little to easy to forget to enable notifications
for a package after leaving a comment, thus never being notified of a
reply. Even though the "Enable notifications" link is on the same
page, it is not part of the flow for posting a new comment, and so,
easy to miss.

Most web forums and comment systems include a checkbox to enable
notifications when posting for the first time in a thread. This patch
implements this in aurweb, as well.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2019-04-28 08:58:29 -04:00
Johannes Löthberg
3578e77ad4 Allow listing all comments from a user
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2018-08-06 06:03:58 +02:00
Lukas Fleischer
41a4189d20 Sync CSS with archweb
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2018-07-07 15:57:47 +02:00
Lukas Fleischer
3be28d016f Sync CSS with archweb
This partially fixes FS#56472.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-11-28 08:52:12 +01:00
Lukas Fleischer
4abde895a5 Use JavaScript to collapse long comments
Instead of using CSS to limit the height of package comments as
implemented in 7b13203 (Limit comment height to 15 lines, 2016-03-12),
use JavaScript to collapse long comments and add a link to expand them.
Clicking the same link twice results in the corresponding comment being
collapsed again.

If JavaScript is disabled, the full comments are shown (without any
possibility to collapse or expand).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-04-20 07:03:54 +02:00
Eric Engestrom
7b13203b81 Limit comment height to 15 lines
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-13 09:14:25 +01:00
Marcel Korpel
1664a24198 Remove 'new' tag from updates table
It was hard to make it consistent with the other new icons from Open
Iconic and it hadn't much use after all.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-31 20:12:56 +01:00
Marcel Korpel
7d7fc18405 Make RSS icon dark gray and only blue on hover
The other new icons (in package comments) behave the same way.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-31 20:03:50 +01:00
Marcel Korpel
bd85441cf6 Add comment undeletion functionality
Only Developers and Trusted Users can undelete comments.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-23 11:50:03 +01:00
Mark Weiman
e9fe1a9eb1 Add link to flag OOD comment
Implements: FS#46546

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-15 17:46:18 +01:00
Mark Weiman
7d4c0c9ffa Implement capability to pin comments above others
Adds capability to pin comments before others.

Implements FS#10863.

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-12 15:09:47 +01:00
Lukas Fleischer
66d12f0c37 Highlight broken dependencies
If a dependency neither exists in the official repositories nor in the
AUR, make it appear bold red.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-24 18:59:04 +02:00
Marcel Korpel
54d812ec79 pkg_comments.php: Add JavaScript function to edit comments
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
9cde6b0566 Show dateline when a comment is edited or deleted
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
92e19e95f3 Add comment edit icon and form
Show an icon next to the comment deletion icon, which leads to a
comment edit form.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:23 +02:00
Marcel Korpel
8375d21210 Use SVG image for comment deletion icon
This also puts the icon to the right and the timestamp in the byline
and wipes out a repeated instance of the byline.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:23 +02:00
Johannes Löthberg
d841357d7f Make merge into label of width 'auto'
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Johannes Löthberg
d1fe28ff7e Make confirmation label of width 'auto'
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Marcel Korpel
d852da79e4 pkgbase_details.php/pkg_details.php: Show keywords
Keywords are hyperlinked so a user can search for other packages with
the same name and/or keyword.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-19 14:40:08 +02:00
Leonidas Spyropoulos
74c7cf70ff Add explanation for Popularity field in search results
Fixes FS#45327.

Signed-off-by: Leonidas Spyropoulos <artafinde@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-15 22:37:45 +02:00
Lukas Fleischer
1537f3be1a Redesign the home page
* Make the home page look even more like the archweb home page.
* Add information on package requests.
* Improve texts on discussion and bug reporting.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11 23:39:51 +02:00
Lukas Fleischer
5b5950e51d Add more details on the SSH public key field
Also, reorder the fields such that optional fields come last.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-31 19:26:07 +02:00
Lukas Fleischer
cc1e8aed30 Rename the AUR software to aurweb
Rename the project to help differentiate between the software providing
access to the Arch User Repository and the collection of source packages
itself.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-02-04 09:50:01 +01:00
Lukas Fleischer
ada3a8eab3 Use the AUR footer in cgit
Use the footer that is already used in other parts of the AUR website
instead of the footer from the main Arch Linux website.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-29 11:34:02 +01:00
Lukas Fleischer
8e06a607c8 Use a custom logo
Currently, the AUR sites are hard to distinguish from the official
website, especially when browsing Git repositories in cgit. Add "user
repository" to the logo to make it distinguishable from the official
site.

In order to avoid confusion, also change the link in the logo to the AUR
home page instead of the main Arch Linux website.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-29 11:30:04 +01:00
Lukas Fleischer
662f31cdb7 Add cgit configuration and style sheet
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-28 21:09:26 +01:00
Lukas Fleischer
daceef50eb Make deleted comments visible to Trusted Users
This allows Trusted Users to check whether a user posted a politically
incorrect comment, even if he already deleted it.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-25 11:30:32 +02:00
Lukas Fleischer
436eabf39c Remove extra space from text buttons in Firefox
Fixes FS#41052.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:28:08 +02:00
Lukas Fleischer
fc1db28c9b Allow for closing package requests
This allows Trusted Users to close package requests via the request
list. Also, entries are now sorted such that open requests are shown
before closed requests.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 11:34:31 +02:00
Lukas Fleischer
ea25f982dc Avoid overflow in updates table
Fixes FS#40206.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-05-22 16:01:16 +02:00
Lukas Fleischer
9864988517 Highlight the AUR link in the navigation bar
Fixes FS#38498.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-02-10 20:26:11 +01:00
canyonknight
42c9957e41 account_details.php: Add link to edit a user's account
This improves the ability to edit a user's account directly through
UI features rather than manually appending 'edit' to the URL or
searching for the account and selecting edit.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-02-03 21:16:36 +01:00
Lukas Fleischer
77f1b264ca Sync CSS with archweb
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-09-03 13:14:39 +02:00