Skip to content

Commit

Permalink
Add alternative loading indicator for fields (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwbonner committed Sep 26, 2024
1 parent dbffd5b commit 44b1641
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
5 changes: 3 additions & 2 deletions src/hub/Sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
18 changes: 6 additions & 12 deletions www/hub.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 44b1641

Please sign in to comment.