From 9fc5a3329f7db09733c40c27726fb3b05e903c6f Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 18 May 2022 20:16:50 +0800 Subject: [PATCH] Revert #1208, due to the break animation --- src/assets/app.scss | 2 +- src/components/HeartbeatBar.vue | 47 +++--------------------------- src/components/PublicGroupList.vue | 8 ++--- 3 files changed, 9 insertions(+), 48 deletions(-) diff --git a/src/assets/app.scss b/src/assets/app.scss index 8eaff499..c3f2fa79 100644 --- a/src/assets/app.scss +++ b/src/assets/app.scss @@ -367,7 +367,7 @@ textarea.form-control { .item { display: block; text-decoration: none; - padding: 15px; + padding: 13px 15px 10px 15px; border-radius: 10px; transition: all ease-in-out 0.15s; diff --git a/src/components/HeartbeatBar.vue b/src/components/HeartbeatBar.vue index 10b1f761..ce888a98 100644 --- a/src/components/HeartbeatBar.vue +++ b/src/components/HeartbeatBar.vue @@ -1,6 +1,6 @@ @@ -174,28 +170,6 @@ export default { return `${this.$root.datetime(beat.time)}` + ((beat.msg) ? ` - ${beat.msg}` : ""); }, - // Toggling the activeSibling class on hover over the current hover item - toggleActivateSibling(e) { - // Variable definition - const element = e.target; - const previous = element.previousSibling; - const next = element.nextSibling; - - // Return if the hovered element has empty class - if (element.classList.contains("empty")) { - return; - } - - // Check if Previous Sibling is heartbar element and doesn't have the empty class - if (previous.children && !previous.classList.contains("empty")) { - previous.classList.toggle("active-sibling"); - } - - // Check if Next Sibling is heartbar element and doesn't have the empty class - if (next.children && !next.classList.contains("empty")) { - next.classList.toggle("active-sibling"); - } - } }, }; @@ -211,10 +185,9 @@ export default { .hp-bar-big { .beat { + display: inline-block; background-color: $primary; border-radius: $border-radius; - display: inline-block; - transition: all ease 0.6s; &.empty { background-color: aliceblue; @@ -228,23 +201,11 @@ export default { background-color: $warning; } - .beat-inner { - border-radius: $border-radius; - display: inline-block; - height: 100%; - width: 5px; - } - &:not(.empty):hover { - transition: all ease 0.15s; + transition: all ease-in-out 0.15s; opacity: 0.8; transform: scale(var(--hover-scale)); } - - &.active-sibling { - transform: scale(1.15); - transition: all ease 0.15s; - } } } diff --git a/src/components/PublicGroupList.vue b/src/components/PublicGroupList.vue index 4d0ada5c..98c0b7ff 100644 --- a/src/components/PublicGroupList.vue +++ b/src/components/PublicGroupList.vue @@ -33,19 +33,19 @@