Move /platform/detection vars into /env (#9707)

* Add platform vars to env

* Replace /platform/detection with /env
This commit is contained in:
Eric Bailey
2026-01-16 16:28:17 -06:00
committed by GitHub
parent bd510d8468
commit 0589bd7d9e
244 changed files with 789 additions and 789 deletions
@@ -6,7 +6,6 @@ import {useLingui} from '@lingui/react'
import {MAX_ALT_TEXT} from '#/lib/constants'
import {isOverMaxGraphemeCount} from '#/lib/strings/helpers'
import {LANGUAGES} from '#/locale/languages'
import {isWeb} from '#/platform/detection'
import {useLanguagePrefs} from '#/state/preferences'
import {atoms as a, useTheme, web} from '#/alf'
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
@@ -17,6 +16,7 @@ import {PageText_Stroke2_Corner0_Rounded as PageTextIcon} from '#/components/ico
import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times'
import {Warning_Stroke2_Corner0_Rounded as WarningIcon} from '#/components/icons/Warning'
import {Text} from '#/components/Typography'
import {IS_WEB} from '#/env'
import {SubtitleFilePicker} from './SubtitleFilePicker'
const MAX_NUM_CAPTIONS = 1
@@ -37,9 +37,9 @@ export function SubtitleDialogBtn(props: Props) {
return (
<View style={[a.flex_row, a.my_xs]}>
<Button
label={isWeb ? _(msg`Captions & alt text`) : _(msg`Alt text`)}
label={IS_WEB ? _(msg`Captions & alt text`) : _(msg`Alt text`)}
accessibilityHint={
isWeb
IS_WEB
? _(msg`Opens captions and alt text dialog`)
: _(msg`Opens alt text dialog`)
}
@@ -52,7 +52,11 @@ export function SubtitleDialogBtn(props: Props) {
}}>
<ButtonIcon icon={CCIcon} />
<ButtonText>
{isWeb ? <Trans>Captions & alt text</Trans> : <Trans>Alt text</Trans>}
{IS_WEB ? (
<Trans>Captions & alt text</Trans>
) : (
<Trans>Alt text</Trans>
)}
</ButtonText>
</Button>
<Dialog.Outer control={control}>
@@ -134,7 +138,7 @@ function SubtitleDialogInner({
</Text>
)}
{isWeb && (
{IS_WEB && (
<>
<View
style={[
@@ -182,7 +186,7 @@ function SubtitleDialogInner({
<View style={web([a.flex_row, a.justify_end])}>
<Button
label={_(msg`Done`)}
size={isWeb ? 'small' : 'large'}
size={IS_WEB ? 'small' : 'large'}
color="primary"
variant="solid"
onPress={() => {