Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: continued color theme through object detection app and styled photo selection view page #110

Merged
merged 20 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
eec7862
docs: updated installation instructions and began organizing the head…
Jazmin915 Apr 21, 2024
2faa034
Merge branch 'cdiddy77:main' into main
Jazmin915 Apr 23, 2024
bbed326
fix: resolved broken link issue and fixed the nav bar
Jazmin915 Apr 23, 2024
ee45174
Merge branch 'cdiddy77:main' into main
Jazmin915 Apr 24, 2024
f2fce90
fix: changed formatting in the operating systems section on the dicsite
Jazmin915 Apr 24, 2024
6a94e85
Merge branch 'cdiddy77:main' into main
Jazmin915 Apr 29, 2024
f63ab47
Merge branch 'cdiddy77:main' into main
Jazmin915 Apr 30, 2024
4b80a4f
Merge branch 'cdiddy77:main' into main
Jazmin915 May 1, 2024
21646ad
docs: create a trouble shooting section for the docsite and added lon…
Jazmin915 May 4, 2024
b40959d
docs: created a trouble shooting section for the docsite and added lo…
Jazmin915 May 4, 2024
e5fcdf8
Merge branch 'cdiddy77:main' into main
Jazmin915 May 7, 2024
6a9e829
fix: added some styling to the mic and camera permissions page in the…
Jazmin915 May 7, 2024
0aa9373
Merge branch 'cdiddy77:main' into main
Jazmin915 May 13, 2024
354c755
Merge branch 'cdiddy77:main' into main
Jazmin915 May 13, 2024
0b7175b
Merge branch 'cdiddy77:main' into main
Jazmin915 May 14, 2024
9ed0773
fix: added consistent color theme to the permissions page to match ou…
Jazmin915 May 15, 2024
4b6bc81
fix: added consistent color theme to the permissio
Jazmin915 May 16, 2024
fe7a312
Merge branch 'main' into main
cdiddy77 May 24, 2024
ad94439
Merge branch 'cdiddy77:main' into main
Jazmin915 May 26, 2024
0566aa4
fix: continued color theme through object detection app and styled ph…
Jazmin915 May 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/objectdetection/src/CameraStream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const styles = StyleSheet.create({
margin: 15,
},
permsButtonText: {
fontSize: 17,
fontSize: 20,
color: "black",
fontWeight: "bold",
},
Expand All @@ -181,8 +181,8 @@ const styles = StyleSheet.create({
},
cameraSwitchButton: {
position: "absolute",
padding: 10,
backgroundColor: "#F95F48",
padding: 15,
backgroundColor: CustomColors.elecBlue,
borderRadius: 20,
top: 20,
right: 20,
Expand Down
73 changes: 62 additions & 11 deletions examples/objectdetection/src/Photo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ImagePicker from "react-native-image-crop-picker";
import { objectDetectionOnImage, type Dims } from "react-native-mediapipe";
import { useSettings } from "./app-settings";
import { Canvas } from "@shopify/react-native-skia";
import { CustomColors } from "./colors";
import {
ObjectFrame,
convertObjectDetectionFrame,
Expand Down Expand Up @@ -89,28 +90,78 @@ export const Photo: React.FC<Props> = () => {
)}
{screenState === "error" && (
<>
<Text style={styles.errorText}>Error! Please try again.</Text>
<Pressable style={styles.selectButton} onPress={onClickSelectPhoto}>
<Text style={styles.selectButtonText}>Select a photo</Text>
</Pressable>
</>
<View style={styles.errorBox}>
<Text style={styles.errorText}>Error!</Text>
<Text style={styles.errorInfoText}>Please make sure you have selected a photo.</Text>
</View>
Comment on lines +93 to +96
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't really seem right and also seems like it will conflict with #82 #98

<Pressable style={styles.selectButton} onPress={onClickSelectPhoto}>
<Text style={styles.selectButtonText}>Select a photo</Text>
</Pressable>
</>
)}
</View>
);
};

const styles = StyleSheet.create({
root: { flex: 1, alignItems: "center", justifyContent: "center" },
selectButton: { backgroundColor: "blue", padding: 10, borderRadius: 5 },
selectButtonText: { fontSize: 20, color: "white" },
photoContainer: { width: PHOTO_SIZE.width, height: PHOTO_SIZE.height },
photo: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 },
root: {
flex: 1,
alignItems: "center",
justifyContent: "center",
backgroundColor: CustomColors.backgroundGrayBlue,
},

selectButton: {
backgroundColor: CustomColors.elecBlue,
padding: 15.5,
paddingRight: 25,
paddingLeft: 25,
borderRadius: 5 },

selectButtonText: {
fontSize: 20,
color: "black",
fontWeight: "bold",
},

photoContainer: {
width: PHOTO_SIZE.width,
height: PHOTO_SIZE.height },

photo: {
position: "absolute",
top: 0, left: 0,
right: 0,
bottom: 0 },

objectsOverlay: {
position: "absolute",
top: 0,
left: 0,
right: 0,
bottom: 0,
},
errorText: { fontSize: 30, color: "red" },
errorText: {
fontSize: 25,
color: "black",
bottom: 10,
fontWeight: "bold",
textAlign: "center",

},
errorInfoText: {
fontSize: 15.5,
color: CustomColors.teal,

},
errorBox: {
backgroundColor: CustomColors.lightGray,
padding: 20,
borderRadius: 12,
borderWidth: 1,
borderColor: CustomColors.teal,
bottom: 25,

}

});
Loading