diff --git a/aurweb/config.py b/aurweb/config.py index 2a865b9b..eea156f5 100644 --- a/aurweb/config.py +++ b/aurweb/config.py @@ -6,7 +6,7 @@ from typing import Any # Publicly visible version of aurweb. This is used to display # aurweb versioning in the footer and must be maintained. # Todo: Make this dynamic/automated. -AURWEB_VERSION = "v6.0.13" +AURWEB_VERSION = "v6.0.14" _parser = None diff --git a/aurweb/packages/requests.py b/aurweb/packages/requests.py index 724249d4..6aaa59ab 100644 --- a/aurweb/packages/requests.py +++ b/aurweb/packages/requests.py @@ -201,9 +201,11 @@ def handle_request(request: Request, reqtype_id: int, # This is done to increase tracking of actions occurring # through the website. if not to_accept: + utcnow = time.utcnow() with db.begin(): pkgreq = db.create(PackageRequest, ReqTypeID=reqtype_id, + RequestTS=utcnow, User=request.user, PackageBase=pkgbase, PackageBaseName=pkgbase.Name, diff --git a/aurweb/routers/packages.py b/aurweb/routers/packages.py index 8f6cb7d6..d4e85d20 100644 --- a/aurweb/routers/packages.py +++ b/aurweb/routers/packages.py @@ -15,7 +15,7 @@ from aurweb.packages.search import PackageSearch from aurweb.packages.util import get_pkg_or_base from aurweb.pkgbase import actions as pkgbase_actions from aurweb.pkgbase import util as pkgbaseutil -from aurweb.templates import make_context, render_template +from aurweb.templates import make_context, make_variable_context, render_template logger = logging.get_logger(__name__) router = APIRouter() @@ -125,7 +125,7 @@ async def packages_get(request: Request, context: Dict[str, Any], @router.get("/packages") async def packages(request: Request) -> Response: - context = make_context(request, "Packages") + context = await make_variable_context(request, "Packages") return await packages_get(request, context) diff --git a/aurweb/routers/pkgbase.py b/aurweb/routers/pkgbase.py index 845c6372..4c0b8a67 100644 --- a/aurweb/routers/pkgbase.py +++ b/aurweb/routers/pkgbase.py @@ -150,13 +150,13 @@ async def pkgbase_flag_post(request: Request, name: str, has_cred = request.user.has_credential(creds.PKGBASE_FLAG) if has_cred and not pkgbase.OutOfDateTS: - notif = notify.FlagNotification(request.user.ID, pkgbase.ID) now = time.utcnow() with db.begin(): pkgbase.OutOfDateTS = now pkgbase.Flagger = request.user pkgbase.FlaggerComment = comments - notif.send() + + notify.FlagNotification(request.user.ID, pkgbase.ID).send() return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) diff --git a/pyproject.toml b/pyproject.toml index 6ba0ff52..50691228 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ # [tool.poetry] name = "aurweb" -version = "v6.0.13" +version = "v6.0.14" license = "GPL-2.0-only" description = "Source code for the Arch User Repository's website" homepage = "https://aur.archlinux.org" diff --git a/templates/partials/packages/search_results.html b/templates/partials/packages/search_results.html index 680891c4..c3b4427c 100644 --- a/templates/partials/packages/search_results.html +++ b/templates/partials/packages/search_results.html @@ -9,7 +9,7 @@ {% if SB == "n" %} {% set order = "d" if order == "a" else "a" %} {% endif %} - + {{ "Name" | tr }} @@ -19,7 +19,7 @@ {% if SB == "v" %} {% set order = "d" if order == "a" else "a" %} {% endif %} - + {{ "Votes" | tr }} @@ -28,7 +28,7 @@ {% if SB == "p" %} {% set order = "d" if order == "a" else "a" %} {% endif %} - {{ "Popularity" | tr }}? + {{ "Popularity" | tr }}? {% if request.user.is_authenticated() %} @@ -36,7 +36,7 @@ {% if SB == "w" %} {% set order = "d" if order == "a" else "a" %} {% endif %} - + {{ "Voted" | tr }} @@ -45,7 +45,7 @@ {% if SB == "o" %} {% set order = "d" if order == "a" else "a" %} {% endif %} - + {{ "Notify" | tr }} @@ -56,7 +56,7 @@ {% if SB == "m" %} {% set order = "d" if order == "a" else "a" %} {% endif %} - + {{ "Maintainer" | tr }}