-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71cf8f8
commit 07f6c9a
Showing
5 changed files
with
1,424 additions
and
1,608 deletions.
There are no files selected for viewing
Submodule CustomFontCLI
added at
72a161
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
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,46 +1,56 @@ | ||
import React from "react"; | ||
import { StyledProvider } from "@gluestack-style/react" | ||
import { ImageBackground, StyleSheet, TouchableOpacity } from "react-native"; | ||
import { StyledProvider } from "@gluestack-style/react"; | ||
import { config } from "@gluestack-ui/config"; | ||
import { GluestackUIProvider, Text, Box, View } from "@gluestack-ui/themed"; | ||
import { ButtonText } from "@gluestack-ui/themed"; | ||
import { Box, View } from "@gluestack-ui/themed"; | ||
import { Images } from "../Components/Images"; | ||
import { StyledButton } from "../Components/Buttons"; | ||
import { StyledText } from "../Components/Text"; | ||
import * as Linking from "expo-linking"; | ||
|
||
function Login() { | ||
const authUrl = "https://api.reflectionsprojections.org/auth/login/mobile"; | ||
return ( | ||
<StyledProvider config={config}> | ||
<Box width="100%" height="100%" justifyContent="space-between" alignItems="center" paddingVertical={100} flex={1}> | ||
<Images | ||
variant="loginLogo" | ||
source={{uri: "https://i.pinimg.com/originals/2e/60/07/2e60079f1e36b5c7681f0996a79e8af4.jpg"}} | ||
alt="RP Logo" | ||
/> | ||
<StyledText variant='bigText' >Welcome to</StyledText> | ||
<StyledText variant='bigbold' marginTop={-30}>R|P 2024!</StyledText> | ||
<StyledText variant='basic' marginTop={100} marginBottom={-10}>Powered by SPONSOR!!!</StyledText> | ||
<StyledButton | ||
styleVariant="login" | ||
action="primary" | ||
isDisabled={false} | ||
isFocusVisible={false} | ||
onPress={() => { | ||
console.log("logged in!"); | ||
Linking.openURL(authUrl) | ||
.catch(err => { | ||
console.error("Failed to open URL:", err.message); | ||
alert("Failed to open URL") | ||
}) | ||
}} | ||
> | ||
<ButtonText color={"$black"}>LOGIN</ButtonText> | ||
</StyledButton> | ||
</Box> | ||
</StyledProvider> | ||
) | ||
const authUrl = "https://api.reflectionsprojections.org/auth/login/mobile"; | ||
const handleBoxPress = () => { | ||
// Handle box press action here | ||
Linking.openURL(authUrl); // Example: open a URL | ||
}; | ||
|
||
return ( | ||
<StyledProvider config={config}> | ||
<Box width="100%" height="100%"> | ||
<ImageBackground | ||
source={require("../assets/loginScreen.png")} | ||
style={{ flex: 1, justifyContent: "flex-end", alignItems: "center" }} | ||
resizeMode="cover" | ||
> | ||
<TouchableOpacity | ||
style={styles.redBox} | ||
isDisabled={false} | ||
isFocusVisible={false} | ||
onPress={() => { | ||
console.log("logged in!"); | ||
Linking.openURL(authUrl).catch((err) => { | ||
console.error("Failed to open URL:", err.message); | ||
alert("Failed to open URL"); | ||
}); | ||
}} | ||
> | ||
{/* Content inside the red box */} | ||
</TouchableOpacity> | ||
</ImageBackground> | ||
</Box> | ||
</StyledProvider> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
redBox: { | ||
width: "40%", // Adjust width as a percentage of the parent container | ||
height: 65, // Adjust height as needed | ||
borderRadius: 8, // Optional: Adjust border radius for rounded corners | ||
marginBottom: 75, // Adjust margin from bottom as a percentage | ||
marginLeft: 40, | ||
}, | ||
}); | ||
|
||
export default Login; |
Oops, something went wrong.