make service url gate friendlier (#3841)
This commit is contained in:
parent
67b0cdf649
commit
aeed4786db
2 changed files with 32 additions and 24 deletions
|
@ -50,7 +50,6 @@ import {HandIcon, HashtagIcon} from 'lib/icons'
|
|||
import {makeProfileLink} from 'lib/routes/links'
|
||||
import {CommonNavigatorParams, NativeStackScreenProps} from 'lib/routes/types'
|
||||
import {NavigationProp} from 'lib/routes/types'
|
||||
import {useGate} from 'lib/statsig/statsig'
|
||||
import {colors, s} from 'lib/styles'
|
||||
import {AccountDropdownBtn} from 'view/com/util/AccountDropdownBtn'
|
||||
import {SelectableBtn} from 'view/com/util/forms/SelectableBtn'
|
||||
|
@ -61,11 +60,9 @@ import {Text} from 'view/com/util/text/Text'
|
|||
import * as Toast from 'view/com/util/Toast'
|
||||
import {UserAvatar} from 'view/com/util/UserAvatar'
|
||||
import {ScrollView} from 'view/com/util/Views'
|
||||
import {useDmServiceUrlStorage} from '#/screens/Messages/Temp/useDmServiceUrlStorage'
|
||||
import {useTheme} from '#/alf'
|
||||
import {useDialogControl} from '#/components/Dialog'
|
||||
import {BirthDateSettingsDialog} from '#/components/dialogs/BirthDateSettings'
|
||||
import * as TextField from '#/components/forms/TextField'
|
||||
import {navigate, resetToTab} from '#/Navigation'
|
||||
import {Email2FAToggle} from './Email2FAToggle'
|
||||
import {ExportCarDialog} from './ExportCarDialog'
|
||||
|
@ -190,11 +187,6 @@ export function SettingsScreen({}: Props) {
|
|||
const {pendingDid, onPressSwitchAccount} = useAccountSwitcher()
|
||||
const isSwitchingAccounts = !!pendingDid
|
||||
|
||||
// TODO: TEMP REMOVE WHEN CLOPS ARE RELEASED
|
||||
const gate = useGate()
|
||||
const {serviceUrl: dmServiceUrl, setServiceUrl: setDmServiceUrl} =
|
||||
useDmServiceUrlStorage()
|
||||
|
||||
// const primaryBg = useCustomPalette<ViewStyle>({
|
||||
// light: {backgroundColor: colors.blue0},
|
||||
// dark: {backgroundColor: colors.blue6},
|
||||
|
@ -807,22 +799,6 @@ export function SettingsScreen({}: Props) {
|
|||
<Trans>System log</Trans>
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
{gate('dms') && (
|
||||
<TextField.Root>
|
||||
<TextField.Input
|
||||
value={dmServiceUrl}
|
||||
onChangeText={(text: string) => {
|
||||
if (text.length > 9 && text.endsWith('/')) {
|
||||
text = text.slice(0, -1)
|
||||
}
|
||||
setDmServiceUrl(text)
|
||||
}}
|
||||
autoCapitalize="none"
|
||||
keyboardType="url"
|
||||
label="🐴"
|
||||
/>
|
||||
</TextField.Root>
|
||||
)}
|
||||
{__DEV__ ? (
|
||||
<>
|
||||
<TouchableOpacity
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue