Page MenuHomePhabricator

D13118.id43489.diff
No OneTemporary

D13118.id43489.diff

diff --git a/native/account/registration/account-does-not-exist.react.js b/native/account/registration/account-does-not-exist.react.js
--- a/native/account/registration/account-does-not-exist.react.js
+++ b/native/account/registration/account-does-not-exist.react.js
@@ -4,10 +4,10 @@
import { Text, View, Image } from 'react-native';
import RegistrationButtonContainer from './registration-button-container.react.js';
-import RegistrationButton from './registration-button.react.js';
import RegistrationContainer from './registration-container.react.js';
import RegistrationContentContainer from './registration-content-container.react.js';
import type { RegistrationNavigationProp } from './registration-navigator.react.js';
+import PrimaryButton from '../../components/primary-button.react.js';
import commSwooshSource from '../../img/comm-swoosh.png';
import {
type NavigationRoute,
@@ -41,7 +41,7 @@
</View>
</RegistrationContentContainer>
<RegistrationButtonContainer>
- <RegistrationButton onPress={onSubmit} label="Next" variant="enabled" />
+ <PrimaryButton onPress={onSubmit} label="Next" variant="enabled" />
</RegistrationButtonContainer>
</RegistrationContainer>
);
diff --git a/native/account/registration/avatar-selection.react.js b/native/account/registration/avatar-selection.react.js
--- a/native/account/registration/avatar-selection.react.js
+++ b/native/account/registration/avatar-selection.react.js
@@ -10,7 +10,6 @@
} from 'lib/components/edit-user-avatar-provider.react.js';
import RegistrationButtonContainer from './registration-button-container.react.js';
-import RegistrationButton from './registration-button.react.js';
import RegistrationContainer from './registration-container.react.js';
import RegistrationContentContainer from './registration-content-container.react.js';
import { RegistrationContext } from './registration-context.js';
@@ -23,6 +22,7 @@
} from './registration-types.js';
import { enableSIWEBackupCreation } from './registration-types.js';
import EditUserAvatar from '../../avatars/edit-user-avatar.react.js';
+import PrimaryButton from '../../components/primary-button.react.js';
import { useCurrentLeafRouteName } from '../../navigation/nav-selectors.js';
import {
type NavigationRoute,
@@ -186,7 +186,7 @@
</View>
</RegistrationContentContainer>
<RegistrationButtonContainer>
- <RegistrationButton onPress={onProceed} label="Next" />
+ <PrimaryButton onPress={onProceed} label="Next" />
</RegistrationButtonContainer>
</RegistrationContainer>
);
diff --git a/native/account/registration/connect-ethereum.react.js b/native/account/registration/connect-ethereum.react.js
--- a/native/account/registration/connect-ethereum.react.js
+++ b/native/account/registration/connect-ethereum.react.js
@@ -19,12 +19,12 @@
siweNonceExpired,
} from './ethereum-utils.js';
import RegistrationButtonContainer from './registration-button-container.react.js';
-import RegistrationButton from './registration-button.react.js';
import RegistrationContainer from './registration-container.react.js';
import RegistrationContentContainer from './registration-content-container.react.js';
import { RegistrationContext } from './registration-context.js';
import type { RegistrationNavigationProp } from './registration-navigator.react.js';
import type { CoolOrNerdMode } from './registration-types.js';
+import PrimaryButton from '../../components/primary-button.react.js';
import { commRustModule } from '../../native-modules.js';
import {
type NavigationRoute,
@@ -260,7 +260,7 @@
let alreadyConnectedButton;
if (alreadyHasConnected) {
alreadyConnectedButton = (
- <RegistrationButton
+ <PrimaryButton
onPress={onUseAlreadyConnectedWallet}
label="Use connected Ethereum wallet"
variant="enabled"
@@ -282,12 +282,12 @@
</RegistrationContentContainer>
<RegistrationButtonContainer>
{alreadyConnectedButton}
- <RegistrationButton
+ <PrimaryButton
onPress={openPanel}
label={connectButtonText}
variant={connectButtonVariant}
/>
- <RegistrationButton
+ <PrimaryButton
onPress={onSkip}
label="Do not connect"
variant="outline"
diff --git a/native/account/registration/connect-farcaster.react.js b/native/account/registration/connect-farcaster.react.js
--- a/native/account/registration/connect-farcaster.react.js
+++ b/native/account/registration/connect-farcaster.react.js
@@ -8,7 +8,6 @@
import { siweNonceExpired } from './ethereum-utils.js';
import RegistrationButtonContainer from './registration-button-container.react.js';
-import RegistrationButton from './registration-button.react.js';
import RegistrationContainer from './registration-container.react.js';
import RegistrationContentContainer from './registration-content-container.react.js';
import { RegistrationContext } from './registration-context.js';
@@ -17,6 +16,7 @@
import FarcasterPrompt from '../../components/farcaster-prompt.react.js';
import FarcasterWebView from '../../components/farcaster-web-view.react.js';
import type { FarcasterWebViewState } from '../../components/farcaster-web-view.react.js';
+import PrimaryButton from '../../components/primary-button.react.js';
import {
type NavigationRoute,
ConnectEthereumRouteName,
@@ -194,7 +194,7 @@
}
return (
- <RegistrationButton
+ <PrimaryButton
onPress={onUseAlreadyConnectedAccount}
label="Use connected Farcaster account"
variant="enabled"
@@ -208,7 +208,7 @@
return undefined;
}
return (
- <RegistrationButton
+ <PrimaryButton
onPress={onSkip}
label="Do not connect"
variant="outline"
@@ -226,7 +226,7 @@
<FarcasterWebView onSuccess={onSuccess} webViewState={webViewState} />
<RegistrationButtonContainer>
{alreadyConnectedButton}
- <RegistrationButton
+ <PrimaryButton
onPress={onPressConnectFarcaster}
label={connectButtonText}
variant={connectButtonVariant}
diff --git a/native/account/registration/cool-or-nerd-mode-selection.react.js b/native/account/registration/cool-or-nerd-mode-selection.react.js
--- a/native/account/registration/cool-or-nerd-mode-selection.react.js
+++ b/native/account/registration/cool-or-nerd-mode-selection.react.js
@@ -5,7 +5,6 @@
import { Text } from 'react-native';
import RegistrationButtonContainer from './registration-button-container.react.js';
-import RegistrationButton from './registration-button.react.js';
import RegistrationContainer from './registration-container.react.js';
import RegistrationContentContainer from './registration-content-container.react.js';
import { RegistrationContext } from './registration-context.js';
@@ -15,6 +14,7 @@
RegistrationTileHeader,
} from './registration-tile.react.js';
import type { CoolOrNerdMode } from './registration-types.js';
+import PrimaryButton from '../../components/primary-button.react.js';
import {
type NavigationRoute,
KeyserverSelectionRouteName,
@@ -101,11 +101,7 @@
</RegistrationTile>
</RegistrationContentContainer>
<RegistrationButtonContainer>
- <RegistrationButton
- onPress={onSubmit}
- label="Next"
- variant={buttonState}
- />
+ <PrimaryButton onPress={onSubmit} label="Next" variant={buttonState} />
</RegistrationButtonContainer>
</RegistrationContainer>
);
diff --git a/native/account/registration/existing-ethereum-account.react.js b/native/account/registration/existing-ethereum-account.react.js
--- a/native/account/registration/existing-ethereum-account.react.js
+++ b/native/account/registration/existing-ethereum-account.react.js
@@ -18,11 +18,11 @@
import { usingCommServicesAccessToken } from 'lib/utils/services-utils.js';
import RegistrationButtonContainer from './registration-button-container.react.js';
-import RegistrationButton from './registration-button.react.js';
import RegistrationContainer from './registration-container.react.js';
import RegistrationContentContainer from './registration-content-container.react.js';
import { RegistrationContext } from './registration-context.js';
import type { RegistrationNavigationProp } from './registration-navigator.react.js';
+import PrimaryButton from '../../components/primary-button.react.js';
import type { RootNavigationProp } from '../../navigation/root-navigator.react.js';
import type {
NavigationRoute,
@@ -156,12 +156,12 @@
</View>
</RegistrationContentContainer>
<RegistrationButtonContainer>
- <RegistrationButton
+ <PrimaryButton
onPress={onProceedToLogIn}
label="Log in to account"
variant={logInPending ? 'loading' : 'enabled'}
/>
- <RegistrationButton
+ <PrimaryButton
onPress={goBack}
label="Use a different wallet"
variant="outline"
diff --git a/native/account/registration/keyserver-selection.react.js b/native/account/registration/keyserver-selection.react.js
--- a/native/account/registration/keyserver-selection.react.js
+++ b/native/account/registration/keyserver-selection.react.js
@@ -9,7 +9,6 @@
import { useIsKeyserverURLValid } from 'lib/shared/keyserver-utils.js';
import RegistrationButtonContainer from './registration-button-container.react.js';
-import RegistrationButton from './registration-button.react.js';
import RegistrationContainer from './registration-container.react.js';
import RegistrationContentContainer from './registration-content-container.react.js';
import { RegistrationContext } from './registration-context.js';
@@ -21,6 +20,7 @@
} from './registration-tile.react.js';
import type { CoolOrNerdMode } from './registration-types.js';
import CommIcon from '../../components/comm-icon.react.js';
+import PrimaryButton from '../../components/primary-button.react.js';
import {
type NavigationRoute,
ConnectFarcasterRouteName,
@@ -201,11 +201,7 @@
<View style={styles.error}>{errorText}</View>
</RegistrationContentContainer>
<RegistrationButtonContainer>
- <RegistrationButton
- onPress={onSubmit}
- label="Next"
- variant={buttonState}
- />
+ <PrimaryButton onPress={onSubmit} label="Next" variant={buttonState} />
</RegistrationButtonContainer>
</RegistrationContainer>
);
diff --git a/native/account/registration/password-selection.react.js b/native/account/registration/password-selection.react.js
--- a/native/account/registration/password-selection.react.js
+++ b/native/account/registration/password-selection.react.js
@@ -7,13 +7,13 @@
import sleep from 'lib/utils/sleep.js';
import RegistrationButtonContainer from './registration-button-container.react.js';
-import RegistrationButton from './registration-button.react.js';
import RegistrationContainer from './registration-container.react.js';
import RegistrationContentContainer from './registration-content-container.react.js';
import { RegistrationContext } from './registration-context.js';
import type { RegistrationNavigationProp } from './registration-navigator.react.js';
import RegistrationTextInput from './registration-text-input.react.js';
import type { CoolOrNerdMode } from './registration-types.js';
+import PrimaryButton from '../../components/primary-button.react.js';
import {
type NavigationRoute,
AvatarSelectionRouteName,
@@ -218,7 +218,7 @@
<View style={styles.error}>{errorText}</View>
</RegistrationContentContainer>
<RegistrationButtonContainer>
- <RegistrationButton
+ <PrimaryButton
onPress={onProceed}
label="Next"
variant={passwordsMatch && !passwordIsEmpty ? 'enabled' : 'disabled'}
diff --git a/native/account/registration/registration-terms.react.js b/native/account/registration/registration-terms.react.js
--- a/native/account/registration/registration-terms.react.js
+++ b/native/account/registration/registration-terms.react.js
@@ -7,7 +7,6 @@
import type { SIWEBackupSecrets } from 'lib/types/siwe-types.js';
import RegistrationButtonContainer from './registration-button-container.react.js';
-import RegistrationButton from './registration-button.react.js';
import RegistrationContainer from './registration-container.react.js';
import RegistrationContentContainer from './registration-content-container.react.js';
import { RegistrationContext } from './registration-context.js';
@@ -17,6 +16,7 @@
AccountSelection,
AvatarData,
} from './registration-types.js';
+import PrimaryButton from '../../components/primary-button.react.js';
import commSwooshSource from '../../img/comm-swoosh.png';
import { logInActionType } from '../../navigation/action-types.js';
import type { NavigationRoute } from '../../navigation/route-names.js';
@@ -148,7 +148,7 @@
</View>
</RegistrationContentContainer>
<RegistrationButtonContainer>
- <RegistrationButton
+ <PrimaryButton
onPress={onProceed}
label="Register"
variant={registrationInProgress ? 'loading' : 'enabled'}
diff --git a/native/account/registration/siwe-backup-message-creation.react.js b/native/account/registration/siwe-backup-message-creation.react.js
--- a/native/account/registration/siwe-backup-message-creation.react.js
+++ b/native/account/registration/siwe-backup-message-creation.react.js
@@ -8,7 +8,6 @@
import { type SIWEResult, SIWEMessageTypes } from 'lib/types/siwe-types.js';
import RegistrationButtonContainer from './registration-button-container.react.js';
-import RegistrationButton from './registration-button.react.js';
import RegistrationContainer from './registration-container.react.js';
import RegistrationContentContainer from './registration-content-container.react.js';
import { RegistrationContext } from './registration-context.js';
@@ -18,6 +17,7 @@
AccountSelection,
AvatarData,
} from './registration-types.js';
+import PrimaryButton from '../../components/primary-button.react.js';
import {
type NavigationRoute,
RegistrationTermsRouteName,
@@ -78,7 +78,7 @@
let useExistingSignatureButton;
if (onExistingWalletSignature) {
useExistingSignatureButton = (
- <RegistrationButton
+ <PrimaryButton
onPress={onExistingWalletSignature}
label="Encrypt with existing signature"
variant="enabled"
@@ -89,7 +89,7 @@
let onSkipButton;
if (onSkip) {
onSkipButton = (
- <RegistrationButton onPress={onSkip} label="Skip" variant="outline" />
+ <PrimaryButton onPress={onSkip} label="Skip" variant="outline" />
);
}
@@ -118,7 +118,7 @@
</RegistrationContentContainer>
<RegistrationButtonContainer>
{useExistingSignatureButton}
- <RegistrationButton
+ <PrimaryButton
onPress={openPanel}
label={newSignatureButtonText}
variant={newSignatureButtonVariant}
@@ -280,12 +280,12 @@
</View>
</RegistrationContentContainer>
<RegistrationButtonContainer>
- <RegistrationButton
+ <PrimaryButton
onPress={openPanel}
label="Decrypt with Ethereum signature"
variant="enabled"
/>
- <RegistrationButton onPress={onSkip} label="Skip" variant="outline" />
+ <PrimaryButton onPress={onSkip} label="Skip" variant="outline" />
</RegistrationButtonContainer>
</RegistrationContainer>
{siwePanel}
diff --git a/native/account/registration/username-selection.react.js b/native/account/registration/username-selection.react.js
--- a/native/account/registration/username-selection.react.js
+++ b/native/account/registration/username-selection.react.js
@@ -16,13 +16,13 @@
import { isValidEthereumAddress } from 'lib/utils/siwe-utils.js';
import RegistrationButtonContainer from './registration-button-container.react.js';
-import RegistrationButton from './registration-button.react.js';
import RegistrationContainer from './registration-container.react.js';
import RegistrationContentContainer from './registration-content-container.react.js';
import { RegistrationContext } from './registration-context.js';
import type { RegistrationNavigationProp } from './registration-navigator.react.js';
import RegistrationTextInput from './registration-text-input.react.js';
import type { CoolOrNerdMode } from './registration-types.js';
+import PrimaryButton from '../../components/primary-button.react.js';
import { commRustModule } from '../../native-modules.js';
import {
type NavigationRoute,
@@ -201,7 +201,7 @@
<View style={styles.error}>{errorText}</View>
</RegistrationContentContainer>
<RegistrationButtonContainer>
- <RegistrationButton
+ <PrimaryButton
onPress={onProceed}
label="Next"
variant={buttonVariant}
diff --git a/native/community-creation/community-configuration.react.js b/native/community-creation/community-configuration.react.js
--- a/native/community-creation/community-configuration.react.js
+++ b/native/community-creation/community-configuration.react.js
@@ -17,7 +17,6 @@
import CommunityCreationKeyserverLabel from './community-creation-keyserver-label.react.js';
import type { CommunityCreationNavigationProp } from './community-creation-navigator.react.js';
import RegistrationButtonContainer from '../account/registration/registration-button-container.react.js';
-import RegistrationButton from '../account/registration/registration-button.react.js';
import RegistrationContainer from '../account/registration/registration-container.react.js';
import RegistrationContentContainer from '../account/registration/registration-content-container.react.js';
import { useNavigateToThread } from '../chat/message-list-types.js';
@@ -26,6 +25,7 @@
ThreadSettingsCategoryHeader,
} from '../chat/settings/thread-settings-category.react.js';
import EnumSettingsOption from '../components/enum-settings-option.react.js';
+import PrimaryButton from '../components/primary-button.react.js';
import TextInput from '../components/text-input.react.js';
import { useCalendarQuery } from '../navigation/nav-selectors.js';
import { type NavigationRoute } from '../navigation/route-names.js';
@@ -155,7 +155,7 @@
</View>
<ThreadSettingsCategoryFooter type="full" />
<RegistrationButtonContainer>
- <RegistrationButton
+ <PrimaryButton
onPress={createNewCommunity}
label="Create community"
variant={
diff --git a/native/community-settings/tag-farcaster-channel/tag-farcaster-channel-by-name.react.js b/native/community-settings/tag-farcaster-channel/tag-farcaster-channel-by-name.react.js
--- a/native/community-settings/tag-farcaster-channel/tag-farcaster-channel-by-name.react.js
+++ b/native/community-settings/tag-farcaster-channel/tag-farcaster-channel-by-name.react.js
@@ -11,7 +11,7 @@
} from 'lib/shared/community-utils.js';
import type { TagFarcasterChannelNavigationProp } from './tag-farcaster-channel-navigator.react.js';
-import RegistrationButton from '../../account/registration/registration-button.react.js';
+import PrimaryButton from '../../components/primary-button.react.js';
import TextInput from '../../components/text-input.react.js';
import type { NavigationRoute } from '../../navigation/route-names.js';
import { useStyles, useColors } from '../../themes/colors.js';
@@ -96,7 +96,7 @@
/>
</View>
{errorMessage}
- <RegistrationButton
+ <PrimaryButton
onPress={onPressTagChannel}
label="Tag channel"
variant={submitButtonVariant}
diff --git a/native/components/connect-farcaster-bottom-sheet.react.js b/native/components/connect-farcaster-bottom-sheet.react.js
--- a/native/components/connect-farcaster-bottom-sheet.react.js
+++ b/native/components/connect-farcaster-bottom-sheet.react.js
@@ -12,7 +12,7 @@
import FarcasterWebView, {
type FarcasterWebViewState,
} from './farcaster-web-view.react.js';
-import RegistrationButton from '../account/registration/registration-button.react.js';
+import PrimaryButton from './primary-button.react.js';
import { BottomSheetContext } from '../bottom-sheet/bottom-sheet-provider.react.js';
import BottomSheet from '../bottom-sheet/bottom-sheet.react.js';
import type { RootNavigationProp } from '../navigation/root-navigator.react.js';
@@ -96,7 +96,7 @@
<View style={styles.promptContainer}>
<FarcasterPrompt textType="optional" />
</View>
- <RegistrationButton
+ <PrimaryButton
onPress={onPressConnect}
label="Connect Farcaster account"
variant={connectButtonVariant}
diff --git a/native/account/registration/registration-button.react.js b/native/components/primary-button.react.js
rename from native/account/registration/registration-button.react.js
rename to native/components/primary-button.react.js
--- a/native/account/registration/registration-button.react.js
+++ b/native/components/primary-button.react.js
@@ -3,15 +3,15 @@
import * as React from 'react';
import { Text, View, ActivityIndicator } from 'react-native';
-import Button from '../../components/button.react.js';
-import { useColors, useStyles } from '../../themes/colors.js';
+import Button from './button.react.js';
+import { useColors, useStyles } from '../themes/colors.js';
type Props = {
+onPress: () => mixed,
+label: string,
+variant?: 'enabled' | 'disabled' | 'loading' | 'outline',
};
-function RegistrationButton(props: Props): React.Node {
+function PrimaryButton(props: Props): React.Node {
const { onPress, label, variant } = props;
const styles = useStyles(unboundStyles);
@@ -98,4 +98,4 @@
},
};
-export default RegistrationButton;
+export default PrimaryButton;
diff --git a/native/profile/farcaster-account-settings.react.js b/native/profile/farcaster-account-settings.react.js
--- a/native/profile/farcaster-account-settings.react.js
+++ b/native/profile/farcaster-account-settings.react.js
@@ -6,10 +6,10 @@
import { useCurrentUserFID, useUnlinkFID } from 'lib/utils/farcaster-utils.js';
import type { ProfileNavigationProp } from './profile.react.js';
-import RegistrationButton from '../account/registration/registration-button.react.js';
import FarcasterPrompt from '../components/farcaster-prompt.react.js';
import FarcasterWebView from '../components/farcaster-web-view.react.js';
import type { FarcasterWebViewState } from '../components/farcaster-web-view.react.js';
+import PrimaryButton from '../components/primary-button.react.js';
import type { NavigationRoute } from '../navigation/route-names.js';
import { useStyles } from '../themes/colors.js';
import { unknownErrorAlertDetails } from '../utils/alert-messages.js';
@@ -77,7 +77,7 @@
const button = React.useMemo(() => {
if (fid) {
return (
- <RegistrationButton
+ <PrimaryButton
onPress={onPressDisconnect}
label="Disconnect"
variant={disconnectButtonVariant}
@@ -86,7 +86,7 @@
}
return (
- <RegistrationButton
+ <PrimaryButton
onPress={onPressConnectFarcaster}
label="Connect Farcaster account"
variant={connectButtonVariant}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 5:44 AM (18 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2684162
Default Alt Text
D13118.id43489.diff (23 KB)

Event Timeline