mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat: Indicate dependency source
Dependencies might reside in the AUR or official repositories. Add "AUR" as superscript letters to indicate if a package/provider is present in the AUR. Signed-off-by: moson <moson@archlinux.org>
This commit is contained in:
parent
1433553c05
commit
0a7b02956f
5 changed files with 72 additions and 7 deletions
|
@ -83,9 +83,11 @@ def package_link(package: Union[Package, OfficialProvider]) -> str:
|
|||
|
||||
@register_filter("provides_markup")
|
||||
def provides_markup(provides: Providers) -> str:
|
||||
return ", ".join(
|
||||
[f'<a href="{package_link(pkg)}">{pkg.Name}</a>' for pkg in provides]
|
||||
)
|
||||
links = []
|
||||
for pkg in provides:
|
||||
aur = "ᴬᵁᴿ" if not pkg.is_official else ""
|
||||
links.append(f'<a href="{package_link(pkg)}">{pkg.Name}</a>{aur}')
|
||||
return ", ".join(links)
|
||||
|
||||
|
||||
def get_pkg_or_base(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue