add quota to the main screen
CI / verify (pull_request) Failing after 8s

This commit is contained in:
2026-09-17 22:06:45 +02:00
parent 9494936160
commit df61d9a282
4 changed files with 51 additions and 28 deletions
+1 -5
View File
@@ -237,11 +237,7 @@ export class QuotaTracker {
) {}
async init() {
try {
await this.resolveCredential();
} catch {
return;
}
await this.refresh();
}
private async resolveCredential(generation = this.generation) {
+10 -5
View File
@@ -60,9 +60,9 @@ export default Plugin.define({
setRevision((value) => value + 1);
});
const Slot = (props: { sessionID: string }) => {
const Slot = (props: { instance: string }) => {
const [status] = createResource(
() => `${props.sessionID}:${revision()}`,
() => `${props.instance}:${revision()}`,
() => loadQuotaStatus(() => quota.status({})),
);
return (
@@ -83,12 +83,17 @@ export default Plugin.define({
);
};
const remove = context.ui.slot({
const removeHome = context.ui.slot({
append: "home.footer.status",
render: () => <Slot instance="home" />,
});
const removeSidebar = context.ui.slot({
append: "sidebar.footer",
render: (input) => <Slot sessionID={input.sessionID} />,
render: (input) => <Slot instance={input.sessionID} />,
});
return () => {
remove();
removeHome();
removeSidebar();
unsubscribe();
clearInterval(retry);
};