Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(auth): separate diagnostics and usage permissions #9790

Mergedjuliusmarmingemerged 12 commits intot3code/auth-preview-scope fromrefs/pull/9790/headmerged by juliusmarminge View on GitHub

Showing 15 changed files with 71 additions and 10 deletions (loading 12).

x
0 of 15 viewed, 15 left
26 additions and 6 deletionsapps/mobile/src/features/usage/UsageRouteScreen.tsxModified
View file
@@ -125,6 +125,9 @@
+ const canReadDiagnostics = selectedEnvironments.some(
+ (environment) => environment.canReadDiagnostics,
+ );
​
const days = useMemo(
() => enumerateDays(window.sinceDay, window.untilDay),
@@ -272,10 +275,12 @@
contentContainerClassName="gap-6 px-5 pt-4"
contentContainerStyle={{ paddingBottom: Math.max(insets.bottom, 18) + 18 }}
refreshControl={
- <RefreshControl
- refreshing={showingLimits ? limits.refreshing : refreshingUsage}
- onRefresh={showingLimits ? () => void limits.refresh() : refreshWindow}
- />
+ showingLimits || canReadDiagnostics ? (
+ <RefreshControl
+ refreshing={showingLimits ? limits.refreshing : refreshingUsage}
+ onRefresh={showingLimits ? () => void limits.refresh() : refreshWindow}
+ />
+ ) : undefined
<SegmentedControl options={TAB_OPTIONS} selected={tab} onSelect={setTab} role="tab" />
@@ -335,6 +340,20 @@