From 7c8c78b18f5610b1fd150158d0eaec948b11801c Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 8 Jan 2025 19:22:04 +0000 Subject: [ELI5] Tweaks to hosting provider (#6935) * minimal hosting provider * change wording and move back up * first time user nudge * move tip * reexport ticket svg * fix ticket fr this time * text tweak + add minHeight --- src/view/com/auth/server-input/index.tsx | 42 ++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 10 deletions(-) (limited to 'src/view/com/auth/server-input/index.tsx') diff --git a/src/view/com/auth/server-input/index.tsx b/src/view/com/auth/server-input/index.tsx index 74b0d2315..f9a5c84bf 100644 --- a/src/view/com/auth/server-input/index.tsx +++ b/src/view/com/auth/server-input/index.tsx @@ -1,11 +1,14 @@ import React from 'react' import {View} from 'react-native' +import {useWindowDimensions} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {BSKY_SERVICE} from '#/lib/constants' import * as persisted from '#/state/persisted' +import {useSession} from '#/state/session' import {atoms as a, useBreakpoints, useTheme} from '#/alf' +import {Admonition} from '#/components/Admonition' import {Button, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' import * as TextField from '#/components/forms/TextField' @@ -23,12 +26,16 @@ export function ServerInputDialog({ }) { const {_} = useLingui() const t = useTheme() + const {height} = useWindowDimensions() const {gtMobile} = useBreakpoints() const [pdsAddressHistory, setPdsAddressHistory] = React.useState( persisted.get('pdsAddressHistory') || [], ) const [fixedOption, setFixedOption] = React.useState([BSKY_SERVICE]) const [customAddress, setCustomAddress] = React.useState('') + const {accounts} = useSession() + + const isFirstTimeUser = accounts.length === 0 const onClose = React.useCallback(() => { let url @@ -66,19 +73,18 @@ export function ServerInputDialog({ ]) return ( - + - Choose Service + Choose your account provider -

- Select the service that hosts your data. -

- + {fixedOption[0] === BSKY_SERVICE && isFirstTimeUser && ( + + + Bluesky is an open network where you can choose your own + provider. If you're new here, we recommend sticking with the + default Bluesky Social option. + + + )} + {fixedOption[0] === 'custom' && ( - - Bluesky is an open network where you can choose your hosting - provider. If you're a developer, you can host your own server. - {' '} + {isFirstTimeUser ? ( + + If you're a developer, you can host your own server. + + ) : ( + + Bluesky is an open network where you can choose your hosting + provider. If you're a developer, you can host your own server. + + )}{' '} -- cgit 1.4.1