From 3d6c8b7f05f392adb9d6e2a409d67c5780afa640 Mon Sep 17 00:00:00 2001 From: Bert Verhelst Date: Fri, 1 Oct 2021 12:49:49 +0200 Subject: [PATCH] fix(heartbeat-bar): cleanup css styling and minor syntax issues --- src/assets/app.scss | 4 ++-- src/components/HeartbeatBar.vue | 23 +++++++++++++---------- src/components/MonitorList.vue | 24 ++++++++++++------------ src/components/Uptime.vue | 16 ++++++++-------- 4 files changed, 35 insertions(+), 32 deletions(-) diff --git a/src/assets/app.scss b/src/assets/app.scss index 34a4560c5..80ec08c28 100644 --- a/src/assets/app.scss +++ b/src/assets/app.scss @@ -321,7 +321,7 @@ h2 { .item { display: block; text-decoration: none; - padding: 13px 15px 10px 15px; + padding: 10px 15px 10px 15px; border-radius: 10px; transition: all ease-in-out 0.15s; @@ -413,4 +413,4 @@ h2 { // Localization -@import "localization.scss"; \ No newline at end of file +@import "localization.scss"; diff --git a/src/components/HeartbeatBar.vue b/src/components/HeartbeatBar.vue index 4dc2c712c..459a4ad6f 100644 --- a/src/components/HeartbeatBar.vue +++ b/src/components/HeartbeatBar.vue @@ -38,7 +38,7 @@ export default { beatMargin: 4, move: false, maxBeat: -1, - } + }; }, computed: { @@ -69,12 +69,12 @@ export default { if (start < 0) { // Add empty placeholder for (let i = start; i < 0; i++) { - placeholders.push(0) + placeholders.push(0); } start = 0; } - return placeholders.concat(this.beatList.slice(start)) + return placeholders.concat(this.beatList.slice(start)); }, wrapStyle() { @@ -84,7 +84,7 @@ export default { return { padding: `${topBottom}px ${leftRight}px`, width: "100%", - } + }; }, barStyle() { @@ -94,12 +94,12 @@ export default { return { transition: "all ease-in-out 0.25s", transform: `translateX(${width}px)`, - } + }; } return { transform: "translateX(0)", - } + }; }, @@ -109,7 +109,7 @@ export default { height: this.beatHeight + "px", margin: this.beatMargin + "px", "--hover-scale": this.hoverScale, - } + }; }, }, @@ -120,7 +120,7 @@ export default { setTimeout(() => { this.move = false; - }, 300) + }, 300); }, deep: true, }, @@ -162,7 +162,7 @@ export default { methods: { resize() { if (this.$refs.wrap) { - this.maxBeat = Math.floor(this.$refs.wrap.clientWidth / (this.beatWidth + this.beatMargin * 2)) + this.maxBeat = Math.floor(this.$refs.wrap.clientWidth / (this.beatWidth + this.beatMargin * 2)); } }, @@ -170,7 +170,7 @@ export default { return `${this.$root.datetime(beat.time)} - ${beat.msg}`; } }, -} +};