Skip to content

Commit b155c21

Browse files
feat(mobile): pool usage limits across selected environments (pingdotgg#10334)
1 parent e5d086c commit b155c21

11 files changed

Lines changed: 716 additions & 276 deletions

File tree

‎apps/mobile/src/Stack.tsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import { SettingsAuthRouteScreen } from "./features/settings/SettingsAuthRouteSc
5656
import { SettingsEnvironmentsRouteScreen } from "./features/settings/SettingsEnvironmentsRouteScreen";
5757
import { SettingsLegalRouteScreen } from "./features/settings/SettingsLegalRouteScreen";
5858
import { SettingsProjectGroupingRouteScreen } from "./features/settings/SettingsProjectGroupingRouteScreen";
59+
import { UsageLimitAccountScreen } from "./features/usage/UsageLimitsPooled";
5960
import { UsageRouteScreen } from "./features/usage/UsageRouteScreen";
6061
import { SettingsRouteScreen } from "./features/settings/SettingsRouteScreen";
6162
import { ShowcaseCaptureCoordinator } from "./features/showcase/ShowcaseCaptureCoordinator";
@@ -192,6 +193,10 @@ const SettingsContentStack = createNativeStackNavigator({
192193
title: "Client Storage",
193194
},
194195
}),
196+
SettingsUsageAccount: createNativeStackScreen({
197+
screen: UsageLimitAccountScreen,
198+
options: { title: "Account" },
199+
}),
195200
SettingsUsage: createNativeStackScreen({
196201
screen: UsageRouteScreen,
197202
linking: "usage",

‎apps/mobile/src/components/AppSymbol.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import IconChevronRight from "@tabler/icons-react-native/IconChevronRight";
3131
import IconChevronUp from "@tabler/icons-react-native/IconChevronUp";
3232
import IconCircleCheck from "@tabler/icons-react-native/IconCircleCheck";
3333
import IconCircleXFilled from "@tabler/icons-react-native/IconCircleXFilled";
34+
import IconTicket from "@tabler/icons-react-native/IconTicket";
3435
import IconClock from "@tabler/icons-react-native/IconClock";
3536
import IconCode from "@tabler/icons-react-native/IconCode";
3637
import IconCopy from "@tabler/icons-react-native/IconCopy";
@@ -116,6 +117,7 @@ const ANDROID_ICON_BY_SF_SYMBOL: Partial<Record<SFSymbol, Icon>> = {
116117
checkmark: IconCheck,
117118
"checkmark.circle": IconCircleCheck,
118119
clock: IconClock,
120+
ticket: IconTicket,
119121
cloud: IconCloud,
120122
cube: IconBox,
121123
"chevron.down": IconChevronDown,
@@ -138,6 +140,7 @@ const ANDROID_ICON_BY_SF_SYMBOL: Partial<Record<SFSymbol, Icon>> = {
138140
"info.circle": IconInfoCircle,
139141
laptopcomputer: IconDeviceLaptop,
140142
link: IconLink,
143+
"line.3.horizontal.decrease": IconFilter,
141144
"line.3.horizontal.decrease.circle": IconFilter,
142145
"line.3.horizontal.decrease.circle.fill": IconFilterFilled,
143146
// Tabler has no Apple desktops; the closest silhouettes stand in on Android.

‎apps/mobile/src/components/ControlPill.tsx‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ import {
99
useMemo,
1010
useRef,
1111
} from "react";
12-
import { Platform, Pressable, View, type ColorValue, type PressableProps } from "react-native";
12+
import {
13+
Platform,
14+
Pressable,
15+
View,
16+
type ColorValue,
17+
type PressableProps,
18+
type AccessibilityProps,
19+
} from "react-native";
1320
import { withUniwind } from "uniwind";
1421
import { useAppearancePreferences } from "../features/settings/appearance/AppearancePreferencesProvider";
1522

@@ -144,10 +151,11 @@ export function ControlPill(props: {
144151
// AppCompat popup can't be themed past its stock animation, metrics, and
145152
// submenu chrome.
146153
export function ControlPillMenu(
147-
props: Omit<ComponentProps<typeof MenuView>, "children" | "themeVariant"> & {
148-
readonly children: ReactNode;
149-
readonly className?: string;
150-
},
154+
props: Omit<ComponentProps<typeof MenuView>, "children" | "themeVariant"> &
155+
Pick<AccessibilityProps, "accessible" | "accessibilityLabel" | "accessibilityRole"> & {
156+
readonly children: ReactNode;
157+
readonly className?: string;
158+
},
151159
) {
152160
const { themeAppearance } = useAppearancePreferences();
153161
const isDarkMode = themeAppearance === "dark";

0 commit comments

Comments
 (0)