From 83f9fc95b925bec1fcbc14702959e7c8ee5e68a1 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Thu, 19 May 2022 17:21:38 +0800 Subject: [PATCH 1/2] fix issue --- web_src/js/features/contexmenu.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web_src/js/features/contexmenu.js b/web_src/js/features/contexmenu.js index b357af71b..6fde05e77 100644 --- a/web_src/js/features/contexmenu.js +++ b/web_src/js/features/contexmenu.js @@ -48,6 +48,10 @@ export default async function initContextMenu() { let btn = a.currentTarget.parentNode.nextElementSibling.getElementsByTagName("button")[0] btn.addEventListener('click', function (e) { let postUrl = btn.getAttribute('data-postbasepath') + const postUrlArr = postUrl.split('/') + postUrlArr[postUrlArr.length - 1] = encodeURIComponent(postUrlArr[postUrlArr.length - 1]) + postUrl = postUrlArr.join('/') + console.log(postUrl) let last_commit = btn.getAttribute('data-commit') let tree_path = btn.getAttribute('data-treepath') + e.target.parentNode.previousElementSibling.getElementsByTagName("input")[0].value let csrf = $("input[name='_csrf']").val() From 69fc5db4d64e7ee8c8fef57a2cbceed25f0e046b Mon Sep 17 00:00:00 2001 From: Gitea Date: Thu, 19 May 2022 17:40:23 +0800 Subject: [PATCH 2/2] fix issue --- templates/repo/view_list.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 39300dcfa..747c64f12 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -131,7 +131,8 @@
- +