From 7d1aed83f4d0cdf096ec8758ff8a85ddccf1328d Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 19 Oct 2022 10:08:33 +0200 Subject: [PATCH] Disable the 'Add File' button when not able to edit repo (#21503) Previously, the button would render a dropdown with zero items when `.CanEnableEditor` was false (for example on a mirror repo). Now it disables the button instead which is better UX. image image Co-authored-by: Lauris BH Co-authored-by: Lunny Xiao --- templates/repo/home.tmpl | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index c523ce355..39e58d8e0 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -77,25 +77,23 @@ {{svg "octicon-file-moved" 15}} {{end}} {{if or .CanAddFile .CanUploadFile}} -