Some mobile styles, add dev mode option
This commit is contained in:
@@ -4,7 +4,7 @@ import {useLingui} from '@lingui/react'
|
|||||||
|
|
||||||
import {useGetTimeAgo} from '#/lib/hooks/useTimeAgo'
|
import {useGetTimeAgo} from '#/lib/hooks/useTimeAgo'
|
||||||
import {useAgeAssuranceContext} from '#/state/age-assurance'
|
import {useAgeAssuranceContext} from '#/state/age-assurance'
|
||||||
import {atoms as a, useTheme, type ViewStyleProp} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme, type ViewStyleProp} from '#/alf'
|
||||||
import {AgeAssuranceBadge} from '#/components/ageAssurance/AgeAssuranceBadge'
|
import {AgeAssuranceBadge} from '#/components/ageAssurance/AgeAssuranceBadge'
|
||||||
import {
|
import {
|
||||||
AgeAssuranceInitDialog,
|
AgeAssuranceInitDialog,
|
||||||
@@ -32,6 +32,7 @@ function Inner({style}: ViewStyleProp & {}) {
|
|||||||
const timeAgo = lastInitiatedAt
|
const timeAgo = lastInitiatedAt
|
||||||
? getTimeAgo(lastInitiatedAt, new Date())
|
? getTimeAgo(lastInitiatedAt, new Date())
|
||||||
: null
|
: null
|
||||||
|
const {gtPhone} = useBreakpoints()
|
||||||
|
|
||||||
if (!isAgeRestricted) return null
|
if (!isAgeRestricted) return null
|
||||||
|
|
||||||
@@ -72,7 +73,11 @@ function Inner({style}: ViewStyleProp & {}) {
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
style={[a.flex_row, a.justify_between, a.align_start, a.gap_xl]}>
|
style={[
|
||||||
|
a.justify_between,
|
||||||
|
a.align_start,
|
||||||
|
gtPhone ? [a.flex_row, a.gap_xl] : [a.gap_md],
|
||||||
|
]}>
|
||||||
<Text style={[a.text_sm, a.leading_snug]}>
|
<Text style={[a.text_sm, a.leading_snug]}>
|
||||||
<Trans>
|
<Trans>
|
||||||
You're using Bluesky from a location that legally requires you
|
You're using Bluesky from a location that legally requires you
|
||||||
|
|||||||
@@ -83,13 +83,17 @@ function Inner({style}: ViewStyleProp & {}) {
|
|||||||
a.gap_lg,
|
a.gap_lg,
|
||||||
]}>
|
]}>
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={[
|
||||||
|
a.leading_snug,
|
||||||
|
a.flex_1,
|
||||||
|
{
|
||||||
color: select(t.name, {
|
color: select(t.name, {
|
||||||
light: t.palette.primary_800,
|
light: t.palette.primary_800,
|
||||||
dark: t.palette.primary_800,
|
dark: t.palette.primary_800,
|
||||||
dim: t.palette.primary_800,
|
dim: t.palette.primary_800,
|
||||||
}),
|
}),
|
||||||
}}>
|
},
|
||||||
|
]}>
|
||||||
<Trans>Verification takes only a few minutes</Trans>
|
<Trans>Verification takes only a few minutes</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,11 @@ import {BroomSparkle_Stroke2_Corner2_Rounded as BroomSparkleIcon} from '#/compon
|
|||||||
import {CodeLines_Stroke2_Corner2_Rounded as CodeLinesIcon} from '#/components/icons/CodeLines'
|
import {CodeLines_Stroke2_Corner2_Rounded as CodeLinesIcon} from '#/components/icons/CodeLines'
|
||||||
import {Globe_Stroke2_Corner0_Rounded as GlobeIcon} from '#/components/icons/Globe'
|
import {Globe_Stroke2_Corner0_Rounded as GlobeIcon} from '#/components/icons/Globe'
|
||||||
import {Newspaper_Stroke2_Corner2_Rounded as NewspaperIcon} from '#/components/icons/Newspaper'
|
import {Newspaper_Stroke2_Corner2_Rounded as NewspaperIcon} from '#/components/icons/Newspaper'
|
||||||
|
import {ShieldCheck_Stroke2_Corner0_Rounded as Shield} from '#/components/icons/Shield'
|
||||||
import {Wrench_Stroke2_Corner2_Rounded as WrenchIcon} from '#/components/icons/Wrench'
|
import {Wrench_Stroke2_Corner2_Rounded as WrenchIcon} from '#/components/icons/Wrench'
|
||||||
import * as Layout from '#/components/Layout'
|
import * as Layout from '#/components/Layout'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
|
import {device} from '#/storage'
|
||||||
import {useDemoMode} from '#/storage/hooks/demo-mode'
|
import {useDemoMode} from '#/storage/hooks/demo-mode'
|
||||||
import {useDevMode} from '#/storage/hooks/dev-mode'
|
import {useDevMode} from '#/storage/hooks/dev-mode'
|
||||||
import {OTAInfo} from './components/OTAInfo'
|
import {OTAInfo} from './components/OTAInfo'
|
||||||
@@ -179,6 +181,20 @@ export function AboutSettingsScreen({}: Props) {
|
|||||||
</SettingsList.ItemText>
|
</SettingsList.ItemText>
|
||||||
</SettingsList.PressableItem>
|
</SettingsList.PressableItem>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<SettingsList.PressableItem
|
||||||
|
onPress={() => {
|
||||||
|
device.set(['geolocation'], {
|
||||||
|
countryCode: undefined,
|
||||||
|
isAgeRestrictedGeo: true,
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
label="Simulate age restriction">
|
||||||
|
<SettingsList.ItemIcon icon={Shield} />
|
||||||
|
<SettingsList.ItemText>
|
||||||
|
Simulate age restriction
|
||||||
|
</SettingsList.ItemText>
|
||||||
|
</SettingsList.PressableItem>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</SettingsList.Container>
|
</SettingsList.Container>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import {View} from 'react-native'
|
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {type NativeStackScreenProps} from '@react-navigation/native-stack'
|
import {type NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||||
@@ -115,21 +114,6 @@ export function AccountSettingsScreen({}: Props) {
|
|||||||
</SettingsList.ItemText>
|
</SettingsList.ItemText>
|
||||||
<SettingsList.Chevron />
|
<SettingsList.Chevron />
|
||||||
</SettingsList.PressableItem>
|
</SettingsList.PressableItem>
|
||||||
<SettingsList.Item>
|
|
||||||
<SettingsList.ItemIcon icon={BirthdayCakeIcon} />
|
|
||||||
<SettingsList.ItemText>
|
|
||||||
<Trans>Birthday</Trans>
|
|
||||||
</SettingsList.ItemText>
|
|
||||||
<SettingsList.BadgeButton
|
|
||||||
label={_(msg`Edit`)}
|
|
||||||
onPress={() => birthdayControl.open()}
|
|
||||||
/>
|
|
||||||
</SettingsList.Item>
|
|
||||||
|
|
||||||
<View style={[a.px_xl, a.pt_xs, a.pb_md]}>
|
|
||||||
<AgeAssuranceAccountCard />
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<SettingsList.Divider />
|
<SettingsList.Divider />
|
||||||
<SettingsList.PressableItem
|
<SettingsList.PressableItem
|
||||||
label={_(msg`Password`)}
|
label={_(msg`Password`)}
|
||||||
@@ -150,6 +134,17 @@ export function AccountSettingsScreen({}: Props) {
|
|||||||
</SettingsList.ItemText>
|
</SettingsList.ItemText>
|
||||||
<SettingsList.Chevron />
|
<SettingsList.Chevron />
|
||||||
</SettingsList.PressableItem>
|
</SettingsList.PressableItem>
|
||||||
|
<SettingsList.Item>
|
||||||
|
<SettingsList.ItemIcon icon={BirthdayCakeIcon} />
|
||||||
|
<SettingsList.ItemText>
|
||||||
|
<Trans>Birthday</Trans>
|
||||||
|
</SettingsList.ItemText>
|
||||||
|
<SettingsList.BadgeButton
|
||||||
|
label={_(msg`Edit`)}
|
||||||
|
onPress={() => birthdayControl.open()}
|
||||||
|
/>
|
||||||
|
</SettingsList.Item>
|
||||||
|
<AgeAssuranceAccountCard style={[a.px_xl, a.pt_xs, a.pb_md]} />
|
||||||
<SettingsList.Divider />
|
<SettingsList.Divider />
|
||||||
<SettingsList.PressableItem
|
<SettingsList.PressableItem
|
||||||
label={_(msg`Export my data`)}
|
label={_(msg`Export my data`)}
|
||||||
|
|||||||
Reference in New Issue
Block a user