From 2d7a5755ce5e4251552dd4db8b6dd688d1b58b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxi=20Quo=C3=9F?= Date: Thu, 26 Jan 2023 19:21:32 +0100 Subject: [PATCH] device card: add waiting spinner and add hover shadow --- frontend/src/components/DeviceCard.svelte | 22 +++++++++++++++++----- frontend/src/scss/main.scss | 8 ++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/DeviceCard.svelte b/frontend/src/components/DeviceCard.svelte index 47152f7d..ce7c1599 100644 --- a/frontend/src/components/DeviceCard.svelte +++ b/frontend/src/components/DeviceCard.svelte @@ -22,18 +22,17 @@
-
+
wake() : device.status == 'online' @@ -45,7 +44,19 @@ ? () => shutdown() : ''} > - + {#if device.status === 'pending'} +
+ Loading... +
+ {:else} +
+ +
+ {/if}
@@ -54,7 +65,8 @@
{#if device.link}

- {device.name} + {device.name}

{:else}

{device.name}

diff --git a/frontend/src/scss/main.scss b/frontend/src/scss/main.scss index e3fe16e2..cb8b5eed 100644 --- a/frontend/src/scss/main.scss +++ b/frontend/src/scss/main.scss @@ -39,6 +39,7 @@ $dropdown-min-width: 0; @import '../../node_modules/bootstrap/scss/forms'; @import '../../node_modules/bootstrap/scss/dropdown'; @import '../../node_modules/bootstrap/scss/buttons'; +@import '../../node_modules/bootstrap/scss/spinners'; @import '../../node_modules/bootstrap/scss/utilities/api'; @@ -93,6 +94,13 @@ section { border-radius: 0.5rem; } +.power-hover { + &:hover { + filter: drop-shadow(0px 0px 10px rgb(155, 155, 155)); + transition: all 0.1s; + } +} + html[data-bs-theme='light'] { html, body {