Skip to content

Commit

Permalink
Show move/maximize only if there is more than a single chart
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-milovidov committed Oct 16, 2023
1 parent 8a865cd commit 95be5c7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions programs/server/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,10 @@
color: var(--auth-error-color);
}

#charts > div:only-child .display-only-if-more-than-one-chart {
display: none;
}

/* Source: https://cdn.jsdelivr.net/npm/[email protected]/dist/uPlot.min.css
* It is copy-pasted to lower the number of requests.
*/
Expand Down Expand Up @@ -931,6 +935,9 @@
saveState();
});

move.classList.add('display-only-if-more-than-one-chart');
maximize.classList.add('display-only-if-more-than-one-chart');

edit_buttons.appendChild(move);
edit_buttons.appendChild(maximize);
edit_buttons.appendChild(edit);
Expand Down

0 comments on commit 95be5c7

Please sign in to comment.