From 370cfde35e5b54902cf335581f15fa1d43529b43 Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 19 May 2021 05:16:02 +0200 Subject: [PATCH] Fix and restyle menu on code line (#15913) * Fix and restyle menu on code line * fix multiline and more tweaks * move to separate files * remove has-context-menu class Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao Co-authored-by: techknowlogick --- templates/repo/diff/box.tmpl | 4 +- templates/repo/view_file.tmpl | 2 +- web_src/js/code/linebutton.js | 11 +++++ web_src/js/index.js | 58 ++---------------------- web_src/js/svg.js | 2 + web_src/less/_base.less | 29 ++++++------ web_src/less/_repository.less | 7 --- web_src/less/code/linebutton.less | 24 ++++++++++ web_src/less/index.less | 1 + web_src/less/themes/theme-arc-green.less | 6 --- 10 files changed, 60 insertions(+), 84 deletions(-) create mode 100644 web_src/js/code/linebutton.js create mode 100644 web_src/less/code/linebutton.less diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 582b66d5db6..d8678c95c6e 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -117,7 +117,7 @@
-
+
{{if $file.IsBin}}
{{$.i18n.Tr "repo.diff.bin_not_shown"}}
{{else}} @@ -131,7 +131,7 @@ {{end}}
{{if or $isImage $isCsv}} -
+
{{if $isImage}} {{template "repo/diff/image_diff" dict "file" . "root" $}} diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index e3a52a88708..8c73f1252b8 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -112,7 +112,7 @@
{{if $.Permission.CanRead $.UnitTypeIssues}} -