-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from TaskRatchet/Working
email/help button on login and home screen
- Loading branch information
Showing
14 changed files
with
140 additions
and
84 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1 @@ | ||
# This `.xcode.env` file is versioned and is used to source the environment | ||
# used when running script phases inside Xcode. | ||
# To customize your local environment, you can create an `.xcode.env.local` | ||
# file that is not versioned. | ||
|
||
# NODE_BINARY variable contains the PATH to the node executable. | ||
# | ||
# Customize the NODE_BINARY variable here. | ||
# For example, to use nvm with brew, add the following line | ||
# . "$(brew --prefix nvm)/nvm.sh" --no-use | ||
export NODE_BINARY=$(command -v node) | ||
export NODE_BINARY=/Users/lukearthur/.nvm/versions/node/v18.19.0/bin/node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,16 @@ import { | |
View, | ||
} from 'react-native'; | ||
|
||
import helpIconBlack from '../../assets/icons/help_circle(black).png'; | ||
import helpIconWhite from '../../assets/icons/help_circle(white).png'; | ||
import logoBordered from '../../assets/images/logo_taskratchet_512_bordered.png'; | ||
import logo from '../../assets/images/[email protected]'; | ||
import {Props} from '../components/types'; | ||
import themeProvider from '../providers/themeProvider'; | ||
import {login} from '../services/taskratchet/login'; | ||
import {styles} from '../styles/loginScreenStyle'; | ||
import useIsDarkMode from '../utils/checkDarkMode'; | ||
import {handleHelpButtonPress} from '../utils/handleHelpButtonPress'; | ||
|
||
export default function LoginScreen({navigation}: Props): JSX.Element { | ||
const isDarkMode = useIsDarkMode(); | ||
|
@@ -58,6 +61,16 @@ export default function LoginScreen({navigation}: Props): JSX.Element { | |
source={logo as ImageSourcePropType} | ||
/> | ||
<SafeAreaView> | ||
<Pressable style={styles.topButtonBox} onPress={handleHelpButtonPress}> | ||
<Image | ||
style={styles.helpImageStyle} | ||
source={ | ||
isDarkMode | ||
? (helpIconWhite as ImageSourcePropType) | ||
: (helpIconBlack as ImageSourcePropType) | ||
} | ||
/> | ||
</Pressable> | ||
<KeyboardAvoidingView style={styles.container}> | ||
<Image | ||
style={styles.logoBordered} | ||
|
@@ -67,7 +80,6 @@ export default function LoginScreen({navigation}: Props): JSX.Element { | |
<Text style={[textColorStyle, styles.title]}>TaskRatchet</Text> | ||
<Text style={[textColorStyle, styles.title]}>Login</Text> | ||
</View> | ||
|
||
<View style={styles.credentials}> | ||
<View style={styles.inputGroup}> | ||
<Text style={[textColorStyle, styles.inputTitle]}>Username</Text> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Linking} from 'react-native'; | ||
|
||
export function handleHelpButtonPress() { | ||
Linking.openURL('mailto:[email protected]').catch(err => | ||
console.error('An error occurred', err), | ||
); | ||
} |