This commit is contained in:
+1
-5
@@ -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
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user