From 44b1641bc8d22fd343ad911fcbece3e5bfaa8e9d Mon Sep 17 00:00:00 2001 From: Jonah <47046556+jwbonner@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:28:36 -0400 Subject: [PATCH] Add alternative loading indicator for fields (#201) --- src/hub/Sidebar.ts | 5 +++-- www/hub.css | 18 ++++++------------ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/hub/Sidebar.ts b/src/hub/Sidebar.ts index 9ca39bbd..dc052fa4 100644 --- a/src/hub/Sidebar.ts +++ b/src/hub/Sidebar.ts @@ -545,8 +545,9 @@ export default class Sidebar { label.appendChild(labelSpan); labelSpan.innerText = title; } - label.style.fontStyle = field.fullKey === null ? "normal" : "italic"; - label.style.cursor = field.fullKey === null ? "auto" : "grab"; + if (field.fullKey !== null) { + label.classList.add("full-key"); + } if (field.fullKey) { { let typeWarningSpan = document.createElement("span"); diff --git a/www/hub.css b/www/hub.css index 9a28ab9f..6ea89307 100644 --- a/www/hub.css +++ b/www/hub.css @@ -499,20 +499,14 @@ div.field-item-label { text-overflow: clip; } -div.field-item-label.loading { - animation: Pulse 0.7s ease infinite; +div.field-item-label.full-key { + cursor: grab; + font-style: italic; } -@keyframes Pulse { - 10% { - opacity: 1; - } - 50% { - opacity: 0.5; - } - 90% { - opacity: 1; - } +div.field-item-label.loading { + cursor: progress; + opacity: 0.5; } div.field-item-label.known > span:first-child {