From 7aea6aa210a8939ac208fb7540d1b46ba69a995f Mon Sep 17 00:00:00 2001
From: Alan Pearce
Date: Wed, 15 Jan 2025 22:25:33 +0100
Subject: feat: enable searching via program names for multi-program packages
implements: https://todo.sr.ht/~alanpearce/searchix/6
---
internal/components/packageDetail.templ | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
(limited to 'internal/components')
diff --git a/internal/components/packageDetail.templ b/internal/components/packageDetail.templ
index 65c74aa..84d2bdf 100644
--- a/internal/components/packageDetail.templ
+++ b/internal/components/packageDetail.templ
@@ -1,8 +1,6 @@
package components
-import (
- "go.alanpearce.eu/searchix/internal/nix"
-)
+import "go.alanpearce.eu/searchix/internal/nix"
func licenseName(l nix.License) string {
if l.FullName != "" {
@@ -32,6 +30,18 @@ templ PackageDetail(pkg nix.Package) {
{ pkg.MainProgram }
}
+ if len(pkg.Programs) > 0 {
+
{ p }
+