Only request visible metrics

This commit is contained in:
Pixeldrain-Server committed 2026-01-29 23:40:27 +01:00
1 parent 0723cb5331
commit 2331d2b969
2 files changed
+30 -13

No files matched your search

+8
View File
@@ -8,6 +8,9 @@ export const toggle = () => {
const header_click = () => {
if (click_expand) {
toggle()
if (on_expand !== null) {
on_expand(expanded)
}
}
}
@@ -22,6 +25,7 @@ const keypress = e => {
let {
expanded = $bindable(false),
click_expand = false,
on_expand = null,
highlight = false,
header,
children
@@ -33,6 +37,10 @@ let {
// stopPropagation if you want to use other interactive elements in the
// title bar
click_expand?: boolean;
// Callback for when the user expands the view
on_expand?: (expanded: boolean) => void;
// Highlight the title bar if the user moves their mouse over it
highlight?: boolean;
header?: import('svelte').Snippet;