From 1f1b83e60454ae0188c0e2764c96e0b2917181d7 Mon Sep 17 00:00:00 2001 From: "smit.codes" Date: Fri, 29 May 2026 19:14:44 +0300 Subject: [PATCH] appview: zip download for repo Implementation of [issue #581](https://tangled.org/tangled.org/core/issues/581). Adds a `zip` download when downloading a repo. Defaults to zip for windows, and `tar.gz` for non-windows with a dropdown to choose the preferred format. Signed-off-by: Smit Patil --- .../repo/fragments/artifactList.html | 2 +- .../repo/fragments/cloneDropdown.html | 26 +++++-- appview/repo/archive.go | 51 ++++++++++++-- input.css | 7 +- knotmirror/xrpc/git_get_archive.go | 70 ++++++++++++++----- knotserver/git/cmd.go | 23 ++++++ knotserver/xrpc/repo_archive.go | 27 +++---- 7 files changed, 153 insertions(+), 53 deletions(-) diff --git a/appview/pages/templates/repo/fragments/artifactList.html b/appview/pages/templates/repo/fragments/artifactList.html index ec047857..eae6816f 100644 --- a/appview/pages/templates/repo/fragments/artifactList.html +++ b/appview/pages/templates/repo/fragments/artifactList.html @@ -13,7 +13,7 @@
{{ i "archive" "w-4 h-4" }} - + Source code (.tar.gz)
diff --git a/appview/pages/templates/repo/fragments/cloneDropdown.html b/appview/pages/templates/repo/fragments/cloneDropdown.html index d429a561..d2673917 100644 --- a/appview/pages/templates/repo/fragments/cloneDropdown.html +++ b/appview/pages/templates/repo/fragments/cloneDropdown.html @@ -53,13 +53,25 @@ For self-hosted knots, clone URLs may differ based on your setup.

- - {{ i "download" "w-4 h-4" }} - Download tar.gz - +
+
+ +