From e460b6ef4da02aa03e7eaa9baa23dbd62898fc44 Mon Sep 17 00:00:00 2001 From: gempir Date: Sun, 12 Feb 2023 03:34:46 +0100 Subject: [PATCH] Fix PR file tree folders no longer collapsing (#22864) Collapsing folders currently just throws a console error ``` index.js?v=1.19.0~dev-403-gb6b8feb3d:10 TypeError: this.$set is not a function at Proxy.handleClick (index.js?v=1.19.0~dev-403-gb6b8feb3d:58:7159) at index.js?v=1.19.0~dev-403-gb6b8feb3d:58:6466 at index.js?v=1.19.0~dev-403-gb6b8feb3d:10:93922 at ce (index.js?v=1.19.0~dev-403-gb6b8feb3d:10:1472) at Q (index.js?v=1.19.0~dev-403-gb6b8feb3d:10:1567) at HTMLDivElement.$e (index.js?v=1.19.0~dev-403-gb6b8feb3d:10:79198) ``` This PR fixes this and allows folders to be collapsed again. Also: - better cursor interaction with folders - added some color to the diff detail stats - remove green link color from all the file names Screenshots: ![image](https://user-images.githubusercontent.com/9765622/218269712-2f3dda55-6d70-407f-8d34-2a5d9c8df548.png) ![image](https://user-images.githubusercontent.com/9765622/218269714-6ce8a954-daea-4ed6-9eea-8b2323db4d8f.png) --------- Co-authored-by: zeripath Co-authored-by: Lunny Xiao --- web_src/js/components/DiffFileTreeItem.vue | 7 +++++-- web_src/less/_repository.less | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/web_src/js/components/DiffFileTreeItem.vue b/web_src/js/components/DiffFileTreeItem.vue index 4089e5141..40d56b226 100644 --- a/web_src/js/components/DiffFileTreeItem.vue +++ b/web_src/js/components/DiffFileTreeItem.vue @@ -10,7 +10,7 @@ /> {{ item.name }} we need to style with nth-of-type + + .diff-detail-stats strong:nth-of-type(1) { + color: var(--color-yellow); + } + + .diff-detail-stats strong:nth-of-type(2) { + color: var(--color-green); + } + + .diff-detail-stats strong:nth-of-type(3) { + color: var(--color-red); + } + .diff-detail-stats { @media (max-width: 480px) { font-size: 0;