+
Usage limits
+ {pools.map((pool) => (
+
+
+ {getDriverOption(pool.driver)?.label ?? String(pool.driver)}
+ {pool.accounts.length > 1 ? (
+
+ {pool.accounts.length} accounts
+
+ ) : null}
+
+ {pool.windows.map((window) => {
+ const nextRefill = window.resets.find((reset) => reset.restoresPercent > 0);
+ return (
+
+
+ {window.label}
+
+ {window.remainingPercent}% left
+
+
+
+ {nextRefill ? (
+
+ +{nextRefill.restoresPercent}%{" "}
+ {nextRefill.at <= now ? "now" : `in ${formatDuration(nextRefill.at - now)}`}
+
+ ) : null}
+
+ );
+ })}
+
+ ))}
+ {pools.length === 0 && notices.length === 0 ?
No subscription limits reported.
: null}
+ {notices.length > 0 ? (
+
+ {notices.map((notice) => (
+ -
+ {notice}
+
+ ))}
+
+ ) : null}
+
+ );
+}
+
+export function UsageLimitsTooltip({ id }: { readonly id: string }) {
+ return (
+