about summary refs log tree commit diff
path: root/src/view/shell/mobile/accounts-menu.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-10-10 21:13:25 -0500
committerPaul Frazee <pfrazee@gmail.com>2022-10-10 21:13:25 -0500
commitba6580101e5b8f2f994d37be14ae61fd4c3ef1ee (patch)
treeed0d720d27183cd3a679da71871dadc2894387ae /src/view/shell/mobile/accounts-menu.tsx
parent287f2992fa6400fbac520bf7b9693bd5dcc6e7db (diff)
downloadvoidsky-ba6580101e5b8f2f994d37be14ae61fd4c3ef1ee.tar.zst
Rework footer controls
Diffstat (limited to 'src/view/shell/mobile/accounts-menu.tsx')
-rw-r--r--src/view/shell/mobile/accounts-menu.tsx108
1 files changed, 0 insertions, 108 deletions
diff --git a/src/view/shell/mobile/accounts-menu.tsx b/src/view/shell/mobile/accounts-menu.tsx
deleted file mode 100644
index ec0e6bf40..000000000
--- a/src/view/shell/mobile/accounts-menu.tsx
+++ /dev/null
@@ -1,108 +0,0 @@
-import React from 'react'
-import {
-  Image,
-  StyleSheet,
-  Text,
-  TouchableOpacity,
-  TouchableWithoutFeedback,
-  View,
-} from 'react-native'
-import RootSiblings from 'react-native-root-siblings'
-import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
-import {DEF_AVATER} from '../../lib/assets'
-import {s, colors} from '../../lib/styles'
-
-export function createAccountsMenu({
-  debug_onPressItem,
-  onPressLogout,
-}: {
-  debug_onPressItem: () => void
-  onPressLogout: () => void
-}): RootSiblings {
-  const onPressItem = (_index: number) => {
-    sibling.destroy()
-    debug_onPressItem() // TODO
-  }
-  const onOuterPress = () => sibling.destroy()
-  const sibling = new RootSiblings(
-    (
-      <>
-        <TouchableWithoutFeedback onPress={onOuterPress}>
-          <View style={styles.bg} />
-        </TouchableWithoutFeedback>
-        <View style={[styles.menu]}>
-          <TouchableOpacity
-            style={[styles.menuItem]}
-            onPress={() => onPressItem(0)}>
-            <Image style={styles.avi} source={DEF_AVATER} />
-            <Text style={[styles.label, s.bold]}>Alice</Text>
-          </TouchableOpacity>
-          <TouchableOpacity
-            style={[styles.menuItem, styles.menuItemBorder]}
-            onPress={() => onPressItem(0)}>
-            <FontAwesomeIcon style={styles.icon} icon="plus" />
-            <Text style={styles.label}>New Account</Text>
-          </TouchableOpacity>
-          <TouchableOpacity
-            style={[styles.menuItem, styles.menuItemBorder]}
-            onPress={() => {
-              sibling.destroy()
-              onPressLogout()
-            }}>
-            <FontAwesomeIcon
-              style={styles.icon}
-              icon="arrow-right-from-bracket"
-            />
-            <Text style={styles.label}>Log out</Text>
-          </TouchableOpacity>
-        </View>
-      </>
-    ),
-  )
-  return sibling
-}
-
-const styles = StyleSheet.create({
-  bg: {
-    position: 'absolute',
-    top: 0,
-    right: 0,
-    bottom: 0,
-    left: 0,
-    backgroundColor: '#000',
-    opacity: 0.1,
-  },
-  menu: {
-    position: 'absolute',
-    left: 4,
-    top: 70,
-    backgroundColor: '#fff',
-    borderRadius: 14,
-    opacity: 1,
-    paddingVertical: 2,
-  },
-  menuItem: {
-    flexDirection: 'row',
-    alignItems: 'center',
-    paddingVertical: 8,
-    paddingLeft: 10,
-    paddingRight: 30,
-  },
-  menuItemBorder: {
-    borderTopWidth: 1,
-    borderTopColor: colors.gray1,
-  },
-  avi: {
-    width: 28,
-    height: 28,
-    marginRight: 8,
-    borderRadius: 14,
-  },
-  icon: {
-    marginLeft: 6,
-    marginRight: 6,
-  },
-  label: {
-    fontSize: 16,
-  },
-})