Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
EmidWife-New
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2023-24-005
EmidWife-New
Commits
82cf4e3e
Commit
82cf4e3e
authored
May 15, 2024
by
Devin B
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional_symptoms
parent
73172d28
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
546 additions
and
163 deletions
+546
-163
src/screens/home/skin/AdditionalSymptoms.js
src/screens/home/skin/AdditionalSymptoms.js
+131
-40
src/screens/home/skin/AdditionalSymptoms1.js
src/screens/home/skin/AdditionalSymptoms1.js
+2
-2
src/screens/home/skin/AdditionalSymptoms2.js
src/screens/home/skin/AdditionalSymptoms2.js
+103
-30
src/screens/home/skin/AdditionalSymptoms3.js
src/screens/home/skin/AdditionalSymptoms3.js
+103
-30
src/screens/home/skin/AdditionalSymptoms4.js
src/screens/home/skin/AdditionalSymptoms4.js
+103
-30
src/screens/home/skin/AdditionalSymptoms5.js
src/screens/home/skin/AdditionalSymptoms5.js
+103
-30
src/screens/home/skin/SkinRisk.js
src/screens/home/skin/SkinRisk.js
+1
-1
src/screens/home/skin/skinassets/QR1.png
src/screens/home/skin/skinassets/QR1.png
+0
-0
src/screens/home/skin/skinassets/scanme.png
src/screens/home/skin/skinassets/scanme.png
+0
-0
No files found.
src/screens/home/skin/AdditionalSymptoms.js
View file @
82cf4e3e
This diff is collapsed.
Click to expand it.
src/screens/home/skin/AdditionalSymptoms1.js
View file @
82cf4e3e
...
...
@@ -17,7 +17,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
const
[
controlsVisible
,
setControlsVisible
]
=
useState
(
false
);
const
hideTimer
=
useRef
(
null
);
const
URL_link
=
"
https://res.cloudinary.com/dl207ux6g/video/upload/v17153745
40/3D/biile6hyrj1aiqvyvedi
.mp4
"
;
const
URL_link
=
"
https://res.cloudinary.com/dl207ux6g/video/upload/v17153745
37/3D/ulxecngohldnmcizzrej
.mp4
"
;
const
videoRef
=
useRef
(
null
);
...
...
@@ -81,7 +81,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
ScrollView
style
=
{
styles
.
scrollContainer
}
>
<
View
style
=
{
styles
.
topContainer
}
>
<
Text
style
=
{
styles
.
topicText
}
>
Pupp
Hives
Additional
Symptoms
<
/Text
>
<
Text
style
=
{
styles
.
topicText
}
>
patechiae
Additional
Symptoms
<
/Text
>
<
View
style
=
{
styles
.
videoBox
}
>
<
Text
style
=
{
styles
.
descriptionText
}
>
Self
diagnose
with
the
3
D
Model
...
...
src/screens/home/skin/AdditionalSymptoms2.js
View file @
82cf4e3e
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'
react
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
,
TouchableOpacity
,
ActivityIndicator
,
}
from
'
react-native
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
,
TouchableOpacity
,
ActivityIndicator
,
Image
}
from
'
react-native
'
;
import
{
COLORS
,
IMGS
,
ROUTES
}
from
'
../../../constants
'
;
import
CheckBox
from
'
@react-native-community/checkbox
'
;
// Make sure to install this package
import
Video
from
'
react-native-video
'
;
// Make sure to install this package
import
Button
from
'
../../../components/Button
'
;
import
{
SafeAreaView
}
from
'
react-native-safe-area-context
'
;
const
AdditionalSymptomsScreen
=
({
navigation
})
=>
{
const
[
selectedSymptoms
,
setSelectedSymptoms
]
=
useState
({
symptom1
:
false
,
symptom2
:
false
,
symptom3
:
false
,});
const
[
loading
,
setLoading
]
=
useState
(
true
);
const
[
videoPaused
,
setVideoPaused
]
=
useState
(
true
);
const
[
fullscreen
,
setFullscreen
]
=
useState
(
false
);
const
[
controlsVisible
,
setControlsVisible
]
=
useState
(
false
);
const
hideTimer
=
useRef
(
null
);
const
URL_link
=
"
https://res.cloudinary.com/dl207ux6g/video/upload/v1715374525/3D/tu1jhgaa6hvcyby5zybr.mp4
"
;
const
videoRef
=
useRef
(
null
);
const
handleLoad
=
()
=>
{
...
...
@@ -36,30 +43,70 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// Navigate or perform next steps
};
const
toggleFullscreen
=
()
=>
{
if
(
videoRef
.
current
)
{
if
(
!
fullscreen
)
{
videoRef
.
current
.
presentFullscreenPlayer
();
// This will open the video in fullscreen
}
else
{
videoRef
.
current
.
dismissFullscreenPlayer
();
// This will exit the fullscreen mode
}
setFullscreen
(
!
fullscreen
);
// Toggle the fullscreen state
}
};
const
togglePlayPause
=
()
=>
{
setVideoPaused
(
!
videoPaused
);
showControlsTemporarily
();
// Toggle the pause state of the video
};
const
showControlsTemporarily
=
()
=>
{
setControlsVisible
(
true
);
if
(
hideTimer
.
current
)
{
clearTimeout
(
hideTimer
.
current
);
}
hideTimer
.
current
=
setTimeout
(()
=>
{
setControlsVisible
(
false
);
},
3000
);
// Hide controls after 3 seconds of inactivity
};
useEffect
(()
=>
{
return
()
=>
{
if
(
hideTimer
.
current
)
{
clearTimeout
(
hideTimer
.
current
);
}
};
},
[]);
return
(
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
c
ontainer
}
>
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
ScrollView
style
=
{
styles
.
scrollC
ontainer
}
>
<
View
style
=
{
styles
.
topContainer
}
>
<
Text
style
=
{
styles
.
topicText
}
>
Maculopapular
Additional
Symptoms
<
/Text
>
<
Text
style
=
{
styles
.
topicText
}
>
Cytomegalovirus
Additional
Symptoms
<
/Text
>
<
View
style
=
{
styles
.
videoBox
}
>
<
Text
style
=
{
styles
.
descriptionText
}
>
Watch
the
3
D
Model
Video
to
Identify
Additional
Symptoms
and
Check
the
Boxes
for
Your
Experience
Self
diagnose
with
the
3
D
Model
<
/Text
>
<
View
style
=
{
styles
.
videoContainer
}
>
<
TouchableOpacity
style
=
{
styles
.
videoContainer
}
onPress
=
{
showControlsTemporarily
}
>
<
Video
source
=
{
require
(
"
./skinassets/add1.mp4
"
)}
// Replace with the path to your video file
s
tyle
=
{
styles
.
video
}
controls
=
{
true
}
// ref={videoRef}
s
ource
=
{{
uri
:
URL_link
}}
// Replace with the path to your video file
style
=
{[
styles
.
video
,
{
height
:
fullscreen
?
'
100%
'
:
300
}]
}
paused
=
{
videoPaused
}
resizeMode
=
"
contain
"
// This ensures the video fits within its container
onLoad
=
{
handleLoad
}
onBuffer
=
{
handleBuffer
}
onLoad
=
{()
=>
setVideoPaused
(
false
)}
onError
=
{(
error
)
=>
console
.
error
(
'
Video playback error:
'
,
error
)}
/
>
<
/View
>
{
controlsVisible
&&
(
<
TouchableOpacity
style
=
{
styles
.
playPauseButton
}
onPress
=
{
togglePlayPause
}
>
<
Image
style
=
{
styles
.
playPauseIcon
}
source
=
{
videoPaused
?
require
(
'
./skinassets/play.png
'
)
:
require
(
'
./skinassets/pause.png
'
)}
/
>
<
/TouchableOpacity
>
)}
<
/TouchableOpacity
>
<
/View
>
<
Text
style
=
{
styles
.
checkboxLabel
}
>
Check
the
related
box
<
/Text
>
<
ScrollView
style
=
{
styles
.
scrollContainer
}
>
<
View
style
=
{
styles
.
checkboxContainer
}
>
{
/* Repeat this CheckBox component for each symptom */
}
<
View
style
=
{
styles
.
individualCheckboxContainer
}
>
...
...
@@ -84,7 +131,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
<
Text
style
=
{
styles
.
checkboxText
}
>
Yellow
discharges
<
/Text
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/View
>
<
Button
...
...
@@ -92,21 +139,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
style
=
{
styles
.
nextButton
}
onPress
=
{()
=>
navigation
.
navigate
(
ROUTES
.
SKIN_RISK
)}
/
>
<
/
View
>
<
/Scroll
View
>
<
/SafeAreaView
>
);
};
const
styles
=
StyleSheet
.
create
({
scrollContainer
:
{
padding
:
40
,
backgroundColor
:
COLORS
.
lightBlue
,
// Use a light pastel blue color
borderRadius
:
25
,
width
:
'
110%
'
,
marginBottom
:
-
20
,
paddingTop
:
-
100
,
flexGrow
:
1
,
},
...
...
@@ -115,7 +155,7 @@ const styles = StyleSheet.create({
backgroundColor
:
COLORS
.
white
,
},
topContainer
:
{
flex
:
3
,
flex
:
1
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
backgroundColor
:
COLORS
.
white
,
...
...
@@ -138,12 +178,13 @@ const styles = StyleSheet.create({
checkboxContainer
:
{
padding
:
60
,
backgroundColor
:
COLORS
.
lightBlue
,
// Use a light pastel blue color
borderRadius
:
25
,
width
:
'
130%
'
,
marginBottom
:
10
,
marginLeft
:
40
width
:
'
100%
'
,
marginLeft
:
197
,
paddingTop
:
10
},
...
...
@@ -195,9 +236,10 @@ const styles = StyleSheet.create({
aspectRatio
:
16
/
9
,
// You can adjust this aspect ratio as needed
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
backgroundColor
:
'
black
'
},
video
:
{
width
:
'
1
0
0%
'
,
width
:
'
1
1
0%
'
,
height
:
'
100%
'
,
},
...
...
@@ -215,6 +257,16 @@ const styles = StyleSheet.create({
},
fullscreenButton
:
{
marginTop
:
10
,
backgroundColor
:
'
rgba(0, 0, 0, 0.8)
'
,
padding
:
10
,
borderRadius
:
5
,
},
fullscreenButtonText
:
{
color
:
'
#fff
'
,
},
videoBox
:
{
backgroundColor
:
COLORS
.
white
,
// Set background color to white
borderWidth
:
2
,
// Set the border width
...
...
@@ -222,7 +274,7 @@ const styles = StyleSheet.create({
borderRadius
:
10
,
// Set border radius for rounded corners
padding
:
20
,
// Add padding around the content
marginBottom
:
20
,
// Add bottom margin for spacing
width
:
'
9
0%
'
,
// Adjust the width as necessary
width
:
'
10
0%
'
,
// Adjust the width as necessary
alignSelf
:
'
center
'
,
// Center the box within its container
// Add shadows for elevation effect (optional)
shadowColor
:
"
#000
"
,
...
...
@@ -234,6 +286,27 @@ const styles = StyleSheet.create({
shadowRadius
:
3.84
,
elevation
:
5
,
},
playPauseButton
:
{
position
:
'
absolute
'
,
top
:
'
50%
'
,
left
:
'
50%
'
,
bottom
:
'
30%
'
,
transform
:
[{
translateX
:
-
25
},
{
translateY
:
-
25
}],
width
:
50
,
height
:
50
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
},
playPauseIcon
:
{
width
:
50
,
height
:
50
,
},
contentContainer
:
{
paddingBottom
:
20
,
// Adds padding at the bottom
},
// ... possibly other styles
});
...
...
src/screens/home/skin/AdditionalSymptoms3.js
View file @
82cf4e3e
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'
react
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
,
TouchableOpacity
,
ActivityIndicator
,
}
from
'
react-native
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
,
TouchableOpacity
,
ActivityIndicator
,
Image
}
from
'
react-native
'
;
import
{
COLORS
,
IMGS
,
ROUTES
}
from
'
../../../constants
'
;
import
CheckBox
from
'
@react-native-community/checkbox
'
;
// Make sure to install this package
import
Video
from
'
react-native-video
'
;
// Make sure to install this package
import
Button
from
'
../../../components/Button
'
;
import
{
SafeAreaView
}
from
'
react-native-safe-area-context
'
;
const
AdditionalSymptomsScreen
=
({
navigation
})
=>
{
const
[
selectedSymptoms
,
setSelectedSymptoms
]
=
useState
({
symptom1
:
false
,
symptom2
:
false
,
symptom3
:
false
,});
const
[
loading
,
setLoading
]
=
useState
(
true
);
const
[
videoPaused
,
setVideoPaused
]
=
useState
(
true
);
const
[
fullscreen
,
setFullscreen
]
=
useState
(
false
);
const
[
controlsVisible
,
setControlsVisible
]
=
useState
(
false
);
const
hideTimer
=
useRef
(
null
);
const
URL_link
=
"
https://res.cloudinary.com/dl207ux6g/video/upload/v1715374517/3D/q2zk6ka9aqamthwgn1vv.mp4
"
;
const
videoRef
=
useRef
(
null
);
const
handleLoad
=
()
=>
{
...
...
@@ -36,30 +43,70 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// Navigate or perform next steps
};
const
toggleFullscreen
=
()
=>
{
if
(
videoRef
.
current
)
{
if
(
!
fullscreen
)
{
videoRef
.
current
.
presentFullscreenPlayer
();
// This will open the video in fullscreen
}
else
{
videoRef
.
current
.
dismissFullscreenPlayer
();
// This will exit the fullscreen mode
}
setFullscreen
(
!
fullscreen
);
// Toggle the fullscreen state
}
};
const
togglePlayPause
=
()
=>
{
setVideoPaused
(
!
videoPaused
);
showControlsTemporarily
();
// Toggle the pause state of the video
};
const
showControlsTemporarily
=
()
=>
{
setControlsVisible
(
true
);
if
(
hideTimer
.
current
)
{
clearTimeout
(
hideTimer
.
current
);
}
hideTimer
.
current
=
setTimeout
(()
=>
{
setControlsVisible
(
false
);
},
3000
);
// Hide controls after 3 seconds of inactivity
};
useEffect
(()
=>
{
return
()
=>
{
if
(
hideTimer
.
current
)
{
clearTimeout
(
hideTimer
.
current
);
}
};
},
[]);
return
(
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
c
ontainer
}
>
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
ScrollView
style
=
{
styles
.
scrollC
ontainer
}
>
<
View
style
=
{
styles
.
topContainer
}
>
<
Text
style
=
{
styles
.
topicText
}
>
Melanoma
Additional
Symptoms
<
/Text
>
<
Text
style
=
{
styles
.
topicText
}
>
Herpes
Additional
Symptoms
<
/Text
>
<
View
style
=
{
styles
.
videoBox
}
>
<
Text
style
=
{
styles
.
descriptionText
}
>
Watch
the
3
D
Model
Video
to
Identify
Additional
Symptoms
and
Check
the
Boxes
for
Your
Experience
Self
diagnose
with
the
3
D
Model
<
/Text
>
<
View
style
=
{
styles
.
videoContainer
}
>
<
TouchableOpacity
style
=
{
styles
.
videoContainer
}
onPress
=
{
showControlsTemporarily
}
>
<
Video
source
=
{
require
(
"
./skinassets/add1.mp4
"
)}
// Replace with the path to your video file
s
tyle
=
{
styles
.
video
}
controls
=
{
true
}
// ref={videoRef}
s
ource
=
{{
uri
:
URL_link
}}
// Replace with the path to your video file
style
=
{[
styles
.
video
,
{
height
:
fullscreen
?
'
100%
'
:
300
}]
}
paused
=
{
videoPaused
}
resizeMode
=
"
contain
"
// This ensures the video fits within its container
onLoad
=
{
handleLoad
}
onBuffer
=
{
handleBuffer
}
onLoad
=
{()
=>
setVideoPaused
(
false
)}
onError
=
{(
error
)
=>
console
.
error
(
'
Video playback error:
'
,
error
)}
/
>
<
/View
>
{
controlsVisible
&&
(
<
TouchableOpacity
style
=
{
styles
.
playPauseButton
}
onPress
=
{
togglePlayPause
}
>
<
Image
style
=
{
styles
.
playPauseIcon
}
source
=
{
videoPaused
?
require
(
'
./skinassets/play.png
'
)
:
require
(
'
./skinassets/pause.png
'
)}
/
>
<
/TouchableOpacity
>
)}
<
/TouchableOpacity
>
<
/View
>
<
Text
style
=
{
styles
.
checkboxLabel
}
>
Check
the
related
box
<
/Text
>
<
ScrollView
style
=
{
styles
.
scrollContainer
}
>
<
View
style
=
{
styles
.
checkboxContainer
}
>
{
/* Repeat this CheckBox component for each symptom */
}
<
View
style
=
{
styles
.
individualCheckboxContainer
}
>
...
...
@@ -84,7 +131,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
<
Text
style
=
{
styles
.
checkboxText
}
>
Yellow
discharges
<
/Text
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/View
>
<
Button
...
...
@@ -92,21 +139,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
style
=
{
styles
.
nextButton
}
onPress
=
{()
=>
navigation
.
navigate
(
ROUTES
.
SKIN_RISK
)}
/
>
<
/
View
>
<
/Scroll
View
>
<
/SafeAreaView
>
);
};
const
styles
=
StyleSheet
.
create
({
scrollContainer
:
{
padding
:
40
,
backgroundColor
:
COLORS
.
lightBlue
,
// Use a light pastel blue color
borderRadius
:
25
,
width
:
'
110%
'
,
marginBottom
:
-
20
,
paddingTop
:
-
100
,
flexGrow
:
1
,
},
...
...
@@ -115,7 +155,7 @@ const styles = StyleSheet.create({
backgroundColor
:
COLORS
.
white
,
},
topContainer
:
{
flex
:
3
,
flex
:
1
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
backgroundColor
:
COLORS
.
white
,
...
...
@@ -138,12 +178,13 @@ const styles = StyleSheet.create({
checkboxContainer
:
{
padding
:
60
,
backgroundColor
:
COLORS
.
lightBlue
,
// Use a light pastel blue color
borderRadius
:
25
,
width
:
'
130%
'
,
marginBottom
:
10
,
marginLeft
:
40
width
:
'
100%
'
,
marginLeft
:
197
,
paddingTop
:
10
},
...
...
@@ -195,9 +236,10 @@ const styles = StyleSheet.create({
aspectRatio
:
16
/
9
,
// You can adjust this aspect ratio as needed
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
backgroundColor
:
'
black
'
},
video
:
{
width
:
'
1
0
0%
'
,
width
:
'
1
1
0%
'
,
height
:
'
100%
'
,
},
...
...
@@ -215,6 +257,16 @@ const styles = StyleSheet.create({
},
fullscreenButton
:
{
marginTop
:
10
,
backgroundColor
:
'
rgba(0, 0, 0, 0.8)
'
,
padding
:
10
,
borderRadius
:
5
,
},
fullscreenButtonText
:
{
color
:
'
#fff
'
,
},
videoBox
:
{
backgroundColor
:
COLORS
.
white
,
// Set background color to white
borderWidth
:
2
,
// Set the border width
...
...
@@ -222,7 +274,7 @@ const styles = StyleSheet.create({
borderRadius
:
10
,
// Set border radius for rounded corners
padding
:
20
,
// Add padding around the content
marginBottom
:
20
,
// Add bottom margin for spacing
width
:
'
9
0%
'
,
// Adjust the width as necessary
width
:
'
10
0%
'
,
// Adjust the width as necessary
alignSelf
:
'
center
'
,
// Center the box within its container
// Add shadows for elevation effect (optional)
shadowColor
:
"
#000
"
,
...
...
@@ -234,6 +286,27 @@ const styles = StyleSheet.create({
shadowRadius
:
3.84
,
elevation
:
5
,
},
playPauseButton
:
{
position
:
'
absolute
'
,
top
:
'
50%
'
,
left
:
'
50%
'
,
bottom
:
'
30%
'
,
transform
:
[{
translateX
:
-
25
},
{
translateY
:
-
25
}],
width
:
50
,
height
:
50
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
},
playPauseIcon
:
{
width
:
50
,
height
:
50
,
},
contentContainer
:
{
paddingBottom
:
20
,
// Adds padding at the bottom
},
// ... possibly other styles
});
...
...
src/screens/home/skin/AdditionalSymptoms4.js
View file @
82cf4e3e
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'
react
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
,
TouchableOpacity
,
ActivityIndicator
,
}
from
'
react-native
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
,
TouchableOpacity
,
ActivityIndicator
,
Image
}
from
'
react-native
'
;
import
{
COLORS
,
IMGS
,
ROUTES
}
from
'
../../../constants
'
;
import
CheckBox
from
'
@react-native-community/checkbox
'
;
// Make sure to install this package
import
Video
from
'
react-native-video
'
;
// Make sure to install this package
import
Button
from
'
../../../components/Button
'
;
import
{
SafeAreaView
}
from
'
react-native-safe-area-context
'
;
const
AdditionalSymptomsScreen
=
({
navigation
})
=>
{
const
[
selectedSymptoms
,
setSelectedSymptoms
]
=
useState
({
symptom1
:
false
,
symptom2
:
false
,
symptom3
:
false
,});
const
[
loading
,
setLoading
]
=
useState
(
true
);
const
[
videoPaused
,
setVideoPaused
]
=
useState
(
true
);
const
[
fullscreen
,
setFullscreen
]
=
useState
(
false
);
const
[
controlsVisible
,
setControlsVisible
]
=
useState
(
false
);
const
hideTimer
=
useRef
(
null
);
const
URL_link
=
"
https://res.cloudinary.com/dl207ux6g/video/upload/v1715374529/3D/ri0w5kgmpchajypa7xfb.mp4
"
;
const
videoRef
=
useRef
(
null
);
const
handleLoad
=
()
=>
{
...
...
@@ -36,30 +43,70 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// Navigate or perform next steps
};
const
toggleFullscreen
=
()
=>
{
if
(
videoRef
.
current
)
{
if
(
!
fullscreen
)
{
videoRef
.
current
.
presentFullscreenPlayer
();
// This will open the video in fullscreen
}
else
{
videoRef
.
current
.
dismissFullscreenPlayer
();
// This will exit the fullscreen mode
}
setFullscreen
(
!
fullscreen
);
// Toggle the fullscreen state
}
};
const
togglePlayPause
=
()
=>
{
setVideoPaused
(
!
videoPaused
);
showControlsTemporarily
();
// Toggle the pause state of the video
};
const
showControlsTemporarily
=
()
=>
{
setControlsVisible
(
true
);
if
(
hideTimer
.
current
)
{
clearTimeout
(
hideTimer
.
current
);
}
hideTimer
.
current
=
setTimeout
(()
=>
{
setControlsVisible
(
false
);
},
3000
);
// Hide controls after 3 seconds of inactivity
};
useEffect
(()
=>
{
return
()
=>
{
if
(
hideTimer
.
current
)
{
clearTimeout
(
hideTimer
.
current
);
}
};
},
[]);
return
(
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
c
ontainer
}
>
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
ScrollView
style
=
{
styles
.
scrollC
ontainer
}
>
<
View
style
=
{
styles
.
topContainer
}
>
<
Text
style
=
{
styles
.
topicText
}
>
P
atechiae
Additional
Symptoms
<
/Text
>
<
Text
style
=
{
styles
.
topicText
}
>
P
upp
Hives
Additional
Symptoms
<
/Text
>
<
View
style
=
{
styles
.
videoBox
}
>
<
Text
style
=
{
styles
.
descriptionText
}
>
Watch
the
3
D
Model
Video
to
Identify
Additional
Symptoms
and
Check
the
Boxes
for
Your
Experience
Self
diagnose
with
the
3
D
Model
<
/Text
>
<
View
style
=
{
styles
.
videoContainer
}
>
<
TouchableOpacity
style
=
{
styles
.
videoContainer
}
onPress
=
{
showControlsTemporarily
}
>
<
Video
source
=
{
require
(
"
./skinassets/add1.mp4
"
)}
// Replace with the path to your video file
s
tyle
=
{
styles
.
video
}
controls
=
{
true
}
// ref={videoRef}
s
ource
=
{{
uri
:
URL_link
}}
// Replace with the path to your video file
style
=
{[
styles
.
video
,
{
height
:
fullscreen
?
'
100%
'
:
300
}]
}
paused
=
{
videoPaused
}
resizeMode
=
"
contain
"
// This ensures the video fits within its container
onLoad
=
{
handleLoad
}
onBuffer
=
{
handleBuffer
}
onLoad
=
{()
=>
setVideoPaused
(
false
)}
onError
=
{(
error
)
=>
console
.
error
(
'
Video playback error:
'
,
error
)}
/
>
<
/View
>
{
controlsVisible
&&
(
<
TouchableOpacity
style
=
{
styles
.
playPauseButton
}
onPress
=
{
togglePlayPause
}
>
<
Image
style
=
{
styles
.
playPauseIcon
}
source
=
{
videoPaused
?
require
(
'
./skinassets/play.png
'
)
:
require
(
'
./skinassets/pause.png
'
)}
/
>
<
/TouchableOpacity
>
)}
<
/TouchableOpacity
>
<
/View
>
<
Text
style
=
{
styles
.
checkboxLabel
}
>
Check
the
related
box
<
/Text
>
<
ScrollView
style
=
{
styles
.
scrollContainer
}
>
<
View
style
=
{
styles
.
checkboxContainer
}
>
{
/* Repeat this CheckBox component for each symptom */
}
<
View
style
=
{
styles
.
individualCheckboxContainer
}
>
...
...
@@ -84,7 +131,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
<
Text
style
=
{
styles
.
checkboxText
}
>
Yellow
discharges
<
/Text
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/View
>
<
Button
...
...
@@ -92,21 +139,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
style
=
{
styles
.
nextButton
}
onPress
=
{()
=>
navigation
.
navigate
(
ROUTES
.
SKIN_RISK
)}
/
>
<
/
View
>
<
/Scroll
View
>
<
/SafeAreaView
>
);
};
const
styles
=
StyleSheet
.
create
({
scrollContainer
:
{
padding
:
40
,
backgroundColor
:
COLORS
.
lightBlue
,
// Use a light pastel blue color
borderRadius
:
25
,
width
:
'
110%
'
,
marginBottom
:
-
20
,
paddingTop
:
-
100
,
flexGrow
:
1
,
},
...
...
@@ -115,7 +155,7 @@ const styles = StyleSheet.create({
backgroundColor
:
COLORS
.
white
,
},
topContainer
:
{
flex
:
3
,
flex
:
1
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
backgroundColor
:
COLORS
.
white
,
...
...
@@ -138,12 +178,13 @@ const styles = StyleSheet.create({
checkboxContainer
:
{
padding
:
60
,
backgroundColor
:
COLORS
.
lightBlue
,
// Use a light pastel blue color
borderRadius
:
25
,
width
:
'
130%
'
,
marginBottom
:
10
,
marginLeft
:
40
width
:
'
100%
'
,
marginLeft
:
197
,
paddingTop
:
10
},
...
...
@@ -195,9 +236,10 @@ const styles = StyleSheet.create({
aspectRatio
:
16
/
9
,
// You can adjust this aspect ratio as needed
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
backgroundColor
:
'
black
'
},
video
:
{
width
:
'
1
0
0%
'
,
width
:
'
1
1
0%
'
,
height
:
'
100%
'
,
},
...
...
@@ -215,6 +257,16 @@ const styles = StyleSheet.create({
},
fullscreenButton
:
{
marginTop
:
10
,
backgroundColor
:
'
rgba(0, 0, 0, 0.8)
'
,
padding
:
10
,
borderRadius
:
5
,
},
fullscreenButtonText
:
{
color
:
'
#fff
'
,
},
videoBox
:
{
backgroundColor
:
COLORS
.
white
,
// Set background color to white
borderWidth
:
2
,
// Set the border width
...
...
@@ -222,7 +274,7 @@ const styles = StyleSheet.create({
borderRadius
:
10
,
// Set border radius for rounded corners
padding
:
20
,
// Add padding around the content
marginBottom
:
20
,
// Add bottom margin for spacing
width
:
'
9
0%
'
,
// Adjust the width as necessary
width
:
'
10
0%
'
,
// Adjust the width as necessary
alignSelf
:
'
center
'
,
// Center the box within its container
// Add shadows for elevation effect (optional)
shadowColor
:
"
#000
"
,
...
...
@@ -234,6 +286,27 @@ const styles = StyleSheet.create({
shadowRadius
:
3.84
,
elevation
:
5
,
},
playPauseButton
:
{
position
:
'
absolute
'
,
top
:
'
50%
'
,
left
:
'
50%
'
,
bottom
:
'
30%
'
,
transform
:
[{
translateX
:
-
25
},
{
translateY
:
-
25
}],
width
:
50
,
height
:
50
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
},
playPauseIcon
:
{
width
:
50
,
height
:
50
,
},
contentContainer
:
{
paddingBottom
:
20
,
// Adds padding at the bottom
},
// ... possibly other styles
});
...
...
src/screens/home/skin/AdditionalSymptoms5.js
View file @
82cf4e3e
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'
react
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
,
TouchableOpacity
,
ActivityIndicator
,
}
from
'
react-native
'
;
import
{
View
,
StyleSheet
,
Text
,
ScrollView
,
TouchableOpacity
,
ActivityIndicator
,
Image
}
from
'
react-native
'
;
import
{
COLORS
,
IMGS
,
ROUTES
}
from
'
../../../constants
'
;
import
CheckBox
from
'
@react-native-community/checkbox
'
;
// Make sure to install this package
import
Video
from
'
react-native-video
'
;
// Make sure to install this package
import
Button
from
'
../../../components/Button
'
;
import
{
SafeAreaView
}
from
'
react-native-safe-area-context
'
;
const
AdditionalSymptomsScreen
=
({
navigation
})
=>
{
const
[
selectedSymptoms
,
setSelectedSymptoms
]
=
useState
({
symptom1
:
false
,
symptom2
:
false
,
symptom3
:
false
,});
const
[
loading
,
setLoading
]
=
useState
(
true
);
const
[
videoPaused
,
setVideoPaused
]
=
useState
(
true
);
const
[
fullscreen
,
setFullscreen
]
=
useState
(
false
);
const
[
controlsVisible
,
setControlsVisible
]
=
useState
(
false
);
const
hideTimer
=
useRef
(
null
);
const
URL_link
=
"
https://res.cloudinary.com/dl207ux6g/video/upload/v1715374540/3D/biile6hyrj1aiqvyvedi.mp4
"
;
const
videoRef
=
useRef
(
null
);
const
handleLoad
=
()
=>
{
...
...
@@ -36,30 +43,70 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// Navigate or perform next steps
};
const
toggleFullscreen
=
()
=>
{
if
(
videoRef
.
current
)
{
if
(
!
fullscreen
)
{
videoRef
.
current
.
presentFullscreenPlayer
();
// This will open the video in fullscreen
}
else
{
videoRef
.
current
.
dismissFullscreenPlayer
();
// This will exit the fullscreen mode
}
setFullscreen
(
!
fullscreen
);
// Toggle the fullscreen state
}
};
const
togglePlayPause
=
()
=>
{
setVideoPaused
(
!
videoPaused
);
showControlsTemporarily
();
// Toggle the pause state of the video
};
const
showControlsTemporarily
=
()
=>
{
setControlsVisible
(
true
);
if
(
hideTimer
.
current
)
{
clearTimeout
(
hideTimer
.
current
);
}
hideTimer
.
current
=
setTimeout
(()
=>
{
setControlsVisible
(
false
);
},
3000
);
// Hide controls after 3 seconds of inactivity
};
useEffect
(()
=>
{
return
()
=>
{
if
(
hideTimer
.
current
)
{
clearTimeout
(
hideTimer
.
current
);
}
};
},
[]);
return
(
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
c
ontainer
}
>
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
ScrollView
style
=
{
styles
.
scrollC
ontainer
}
>
<
View
style
=
{
styles
.
topContainer
}
>
<
Text
style
=
{
styles
.
topicText
}
>
Herpes
HPV
Additional
Symptoms
<
/Text
>
<
Text
style
=
{
styles
.
topicText
}
>
Melanoma
Additional
Symptoms
<
/Text
>
<
View
style
=
{
styles
.
videoBox
}
>
<
Text
style
=
{
styles
.
descriptionText
}
>
Watch
the
3
D
Model
Video
to
Identify
Additional
Symptoms
and
Check
the
Boxes
for
Your
Experience
Self
diagnose
with
the
3
D
Model
<
/Text
>
<
View
style
=
{
styles
.
videoContainer
}
>
<
TouchableOpacity
style
=
{
styles
.
videoContainer
}
onPress
=
{
showControlsTemporarily
}
>
<
Video
source
=
{
require
(
"
./skinassets/add1.mp4
"
)}
// Replace with the path to your video file
s
tyle
=
{
styles
.
video
}
controls
=
{
true
}
// ref={videoRef}
s
ource
=
{{
uri
:
URL_link
}}
// Replace with the path to your video file
style
=
{[
styles
.
video
,
{
height
:
fullscreen
?
'
100%
'
:
300
}]
}
paused
=
{
videoPaused
}
resizeMode
=
"
contain
"
// This ensures the video fits within its container
onLoad
=
{
handleLoad
}
onBuffer
=
{
handleBuffer
}
onLoad
=
{()
=>
setVideoPaused
(
false
)}
onError
=
{(
error
)
=>
console
.
error
(
'
Video playback error:
'
,
error
)}
/
>
<
/View
>
{
controlsVisible
&&
(
<
TouchableOpacity
style
=
{
styles
.
playPauseButton
}
onPress
=
{
togglePlayPause
}
>
<
Image
style
=
{
styles
.
playPauseIcon
}
source
=
{
videoPaused
?
require
(
'
./skinassets/play.png
'
)
:
require
(
'
./skinassets/pause.png
'
)}
/
>
<
/TouchableOpacity
>
)}
<
/TouchableOpacity
>
<
/View
>
<
Text
style
=
{
styles
.
checkboxLabel
}
>
Check
the
related
box
<
/Text
>
<
ScrollView
style
=
{
styles
.
scrollContainer
}
>
<
View
style
=
{
styles
.
checkboxContainer
}
>
{
/* Repeat this CheckBox component for each symptom */
}
<
View
style
=
{
styles
.
individualCheckboxContainer
}
>
...
...
@@ -84,7 +131,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
<
Text
style
=
{
styles
.
checkboxText
}
>
Yellow
discharges
<
/Text
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/View
>
<
Button
...
...
@@ -92,21 +139,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
style
=
{
styles
.
nextButton
}
onPress
=
{()
=>
navigation
.
navigate
(
ROUTES
.
SKIN_RISK
)}
/
>
<
/
View
>
<
/Scroll
View
>
<
/SafeAreaView
>
);
};
const
styles
=
StyleSheet
.
create
({
scrollContainer
:
{
padding
:
40
,
backgroundColor
:
COLORS
.
lightBlue
,
// Use a light pastel blue color
borderRadius
:
25
,
width
:
'
110%
'
,
marginBottom
:
-
20
,
paddingTop
:
-
100
,
flexGrow
:
1
,
},
...
...
@@ -115,7 +155,7 @@ const styles = StyleSheet.create({
backgroundColor
:
COLORS
.
white
,
},
topContainer
:
{
flex
:
3
,
flex
:
1
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
backgroundColor
:
COLORS
.
white
,
...
...
@@ -138,12 +178,13 @@ const styles = StyleSheet.create({
checkboxContainer
:
{
padding
:
60
,
backgroundColor
:
COLORS
.
lightBlue
,
// Use a light pastel blue color
borderRadius
:
25
,
width
:
'
130%
'
,
marginBottom
:
10
,
marginLeft
:
40
width
:
'
100%
'
,
marginLeft
:
197
,
paddingTop
:
10
},
...
...
@@ -195,9 +236,10 @@ const styles = StyleSheet.create({
aspectRatio
:
16
/
9
,
// You can adjust this aspect ratio as needed
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
backgroundColor
:
'
black
'
},
video
:
{
width
:
'
1
0
0%
'
,
width
:
'
1
1
0%
'
,
height
:
'
100%
'
,
},
...
...
@@ -215,6 +257,16 @@ const styles = StyleSheet.create({
},
fullscreenButton
:
{
marginTop
:
10
,
backgroundColor
:
'
rgba(0, 0, 0, 0.8)
'
,
padding
:
10
,
borderRadius
:
5
,
},
fullscreenButtonText
:
{
color
:
'
#fff
'
,
},
videoBox
:
{
backgroundColor
:
COLORS
.
white
,
// Set background color to white
borderWidth
:
2
,
// Set the border width
...
...
@@ -222,7 +274,7 @@ const styles = StyleSheet.create({
borderRadius
:
10
,
// Set border radius for rounded corners
padding
:
20
,
// Add padding around the content
marginBottom
:
20
,
// Add bottom margin for spacing
width
:
'
9
0%
'
,
// Adjust the width as necessary
width
:
'
10
0%
'
,
// Adjust the width as necessary
alignSelf
:
'
center
'
,
// Center the box within its container
// Add shadows for elevation effect (optional)
shadowColor
:
"
#000
"
,
...
...
@@ -234,6 +286,27 @@ const styles = StyleSheet.create({
shadowRadius
:
3.84
,
elevation
:
5
,
},
playPauseButton
:
{
position
:
'
absolute
'
,
top
:
'
50%
'
,
left
:
'
50%
'
,
bottom
:
'
30%
'
,
transform
:
[{
translateX
:
-
25
},
{
translateY
:
-
25
}],
width
:
50
,
height
:
50
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
},
playPauseIcon
:
{
width
:
50
,
height
:
50
,
},
contentContainer
:
{
paddingBottom
:
20
,
// Adds padding at the bottom
},
// ... possibly other styles
});
...
...
src/screens/home/skin/SkinRisk.js
View file @
82cf4e3e
...
...
@@ -26,7 +26,7 @@ const RiskEvaluationScreen = ({ navigation }) => {
<
Text
style
=
{
styles
.
subTopicText
}
>
Why
High
Risk
?
<
/Text
>
<
View
style
=
{
styles
.
audioPlayerContainer
}
>
<
Video
source
=
{
require
(
"
./skinassets/
add1.mp4
"
)}
source
=
{
require
(
"
./skinassets/
pause.png
"
)}
style
=
{
styles
.
audioPlayer
}
controls
=
{
true
}
audioOnly
=
{
true
}
...
...
src/screens/home/skin/skinassets/QR1.png
0 → 100644
View file @
82cf4e3e
9.09 KB
src/screens/home/skin/skinassets/scanme.png
0 → 100644
View file @
82cf4e3e
99.5 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment