From 8539eb8443f94892bf52d17e049ee5f6ca3d3548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E5=9D=A4?= Date: Tue, 20 Feb 2024 16:07:25 +0900 Subject: [PATCH] =?UTF-8?q?=E7=94=A8COMMIT=E8=87=AA=E5=B7=B1=E7=9A=84?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/main.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/main.ts b/web/main.ts index 5b5d13c4..e91e7802 100644 --- a/web/main.ts +++ b/web/main.ts @@ -4080,6 +4080,17 @@ function scrollToDot() { const commitParent = headDots[0].closest('.commit') as HTMLElement; if (commitParent) { + + let view = document.getElementById('view'); + if (view === null) { + return; + } + + // 获取commitHeadDot的bodor的颜色 + let headercolor = window.getComputedStyle(headDots[0] as HTMLElement).borderColor; + document.body.style.setProperty('--git-graph-flashPrimary', modifyColourOpacity(headercolor, 0.7)); + document.body.style.setProperty('--git-graph-flashSecondary', modifyColourOpacity(headercolor, 0.5)); + // 添加类以开始动画 commitParent.classList.add('flash');