From 85ff5a94a4836c212b91edd6bf9d26a0bbb70adc Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 18 Oct 2022 23:15:05 +0200 Subject: [PATCH 1/2] Disable the 'Add File' button when not able to edit repo Previously, the button would render a dropdown with zero items when `.CanEnableEditor` was false. Now it disables the button instead which is better UX. --- 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 9d4842579fa1b..cb6d2ff3e85c5 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}} -