From 8943fd5ccb8501aedd3e94d4fe16e7daf456fd1b Mon Sep 17 00:00:00 2001 From: whereareiam Date: Mon, 9 Nov 2026 19:35:30 +0100 Subject: [PATCH] Code: Fixed the missing folder downloads A folder now has GitHub's "More options" button beside Add file, with Copy path, Copy permalink and Forgejo's Download ZIP and Download TAR.GZ for that folder. On phones the same menu keeps Go to file and the Add file actions. Fixes #180 Co-Authored-By: Claude Opus 5.5 --- styles/templates/repo/home.ts | 3 ++- templates/repo/view_content.tmpl | 27 +++++++++++++++++++++------ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/styles/templates/repo/home.ts b/styles/templates/repo/home.ts index f8bc962f..9d06f6bf 100644 --- a/styles/templates/repo/home.ts +++ b/styles/templates/repo/home.ts @@ -305,7 +305,8 @@ const repositoryHome = css` } } @media (min-width: 544px) { - .page-content.repository.file.list .repo-mobile-actions { + .page-content.repository.file.list .repo-mobile-actions:not(.repo-folder-actions), + .page-content.repository.file.list .repo-folder-actions .repo-mobile-action { display: none !important; } } diff --git a/templates/repo/view_content.tmpl b/templates/repo/view_content.tmpl index 315ef094..ff677e9d 100644 --- a/templates/repo/view_content.tmpl +++ b/templates/repo/view_content.tmpl @@ -68,14 +68,29 @@ {{end}} -
- {{svg "octicon-kebab-horizontal" 16}} + {{/* + On phones this menu holds Go to file and Add file. In a folder it is GitHub's "More options" button at every + width and also holds the folder's path, permalink and Forgejo's folder archives. + */}} + {{$isFolder := and (not $isTreePathRoot) (not .IsViewFile)}} +
+ {{svg "octicon-kebab-horizontal" 16}}