diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-11-08 22:42:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-08 22:42:18 +0000 |
commit | 5da3f29498fda9ab1181df19a718e37099cb2cf6 (patch) | |
tree | 4989300fe333edc3ad1c12c7b0d03e6ff5112ee3 /src/view/com/util/AccountDropdownBtn.tsx | |
parent | e8a03058bb993bda993e78d24877884d39666d63 (diff) | |
download | voidsky-5da3f29498fda9ab1181df19a718e37099cb2cf6.tar.zst |
[Settings] Ungate, and remove old settings (#6144)
* move export car dialog * move disableemail2fadialog * delete old settings screens * fix type error * Update Navigation.tsx * Delete AccountDropdownBtn.tsx * remove old change handle modal * delete add app paswords * forgot to actually delete the change handle modal
Diffstat (limited to 'src/view/com/util/AccountDropdownBtn.tsx')
-rw-r--r-- | src/view/com/util/AccountDropdownBtn.tsx | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/view/com/util/AccountDropdownBtn.tsx b/src/view/com/util/AccountDropdownBtn.tsx deleted file mode 100644 index e7985bccf..000000000 --- a/src/view/com/util/AccountDropdownBtn.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import React from 'react' -import {Pressable} from 'react-native' -import { - FontAwesomeIcon, - FontAwesomeIconStyle, -} from '@fortawesome/react-native-fontawesome' -import {msg} from '@lingui/macro' -import {useLingui} from '@lingui/react' - -import {usePalette} from '#/lib/hooks/usePalette' -import {s} from '#/lib/styles' -import {SessionAccount, useSessionApi} from '#/state/session' -import {useDialogControl} from '#/components/Dialog' -import * as Prompt from '#/components/Prompt' -import * as Toast from '../../com/util/Toast' -import {DropdownItem, NativeDropdown} from './forms/NativeDropdown' - -export function AccountDropdownBtn({account}: {account: SessionAccount}) { - const pal = usePalette('default') - const {removeAccount} = useSessionApi() - const removePromptControl = useDialogControl() - const {_} = useLingui() - - const items: DropdownItem[] = [ - { - label: _(msg`Remove account`), - onPress: removePromptControl.open, - icon: { - ios: { - name: 'trash', - }, - android: 'ic_delete', - web: ['far', 'trash-can'], - }, - }, - ] - return ( - <> - <Pressable accessibilityRole="button" style={s.pl10}> - <NativeDropdown - testID="accountSettingsDropdownBtn" - items={items} - accessibilityLabel={_(msg`Account options`)} - accessibilityHint=""> - <FontAwesomeIcon - icon="ellipsis-h" - style={pal.textLight as FontAwesomeIconStyle} - /> - </NativeDropdown> - </Pressable> - <Prompt.Basic - control={removePromptControl} - title={_(msg`Remove from quick access?`)} - description={_( - msg`This will remove @${account.handle} from the quick access list.`, - )} - onConfirm={() => { - removeAccount(account) - Toast.show(_(msg`Account removed from quick access`)) - }} - confirmButtonCta={_(msg`Remove`)} - confirmButtonColor="negative" - /> - </> - ) -} |