Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
clone_excelso
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Prasetya Saputra
clone_excelso
Commits
70be6528
Commit
70be6528
authored
May 18, 2020
by
Afid
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://repo.cs.co.id:2222/wahyu/bahanoprek
parents
cf7ca4f9
93e94724
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
121 additions
and
40 deletions
+121
-40
english-flag.png
assets/images/english-flag.png
+0
-0
indonesia-flag.png
assets/images/indonesia-flag.png
+0
-0
Auth.js
view/Auth.js
+15
-1
ChangeLanguage.js
view/ChangeLanguage.js
+104
-39
Home.js
view/Home.js
+2
-0
No files found.
assets/images/english-flag.png
0 → 100644
View file @
70be6528
13.1 KB
assets/images/indonesia-flag.png
0 → 100644
View file @
70be6528
1.63 KB
view/Auth.js
View file @
70be6528
...
@@ -233,7 +233,21 @@ class Auth extends React.Component {
...
@@ -233,7 +233,21 @@ class Auth extends React.Component {
},
title
:
'PROFIL'
},
title
:
'PROFIL'
}}
/
>
}}
/
>
<
Stack
.
Screen
name
=
"Change Profil"
component
=
{
ChangeProfile
}
/
>
<
Stack
.
Screen
name
=
"Change Profil"
component
=
{
ChangeProfile
}
/
>
<
Stack
.
Screen
name
=
"Change language"
component
=
{
ChangeLanguage
}
/
>
<
Stack
.
Screen
name
=
"Change language"
component
=
{
ChangeLanguage
}
options
=
{{
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
headerTitleAlign
:
'center'
,
headerTintColor
:
'#fff'
,
headerTitleStyle
:
{
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
18
,
color
:
'white'
,
textAlign
:
'center'
},
title
:
'LANGUAGE'
}}
/
>
<
Stack
.
Screen
name
=
"Change password"
component
=
{
ChangePassword
}
options
=
{{
<
Stack
.
Screen
name
=
"Change password"
component
=
{
ChangePassword
}
options
=
{{
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
...
...
view/ChangeLanguage.js
View file @
70be6528
...
@@ -3,6 +3,8 @@ import { StyleSheet, Text, View, Button, StatusBar, TouchableOpacity, Image } fr
...
@@ -3,6 +3,8 @@ import { StyleSheet, Text, View, Button, StatusBar, TouchableOpacity, Image } fr
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
ActionType
from
'../redux/globalActionType'
;
import
ActionType
from
'../redux/globalActionType'
;
import
i18n
from
'i18n-js'
;
import
i18n
from
'i18n-js'
;
import
CheckBox
from
'react-native-check-box'
import
{
FontAwesome
,
AntDesign
,
Feather
}
from
'@expo/vector-icons'
;
class
Language
extends
React
.
Component
{
class
Language
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -32,40 +34,103 @@ class Language extends React.Component {
...
@@ -32,40 +34,103 @@ class Language extends React.Component {
render
()
{
render
()
{
console
.
log
(
this
.
props
.
language
)
return
(
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
header
}
>
<
View
style
=
{{
flex
:
0.2
}}
/
>
<
StatusBar
barStyle
=
'dark-content'
/>
<
Text
style
=
{
styles
.
titleText
}
>
{
i18n
.
t
(
'welcome'
)}
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
body
}
>
<
View
style
=
{
styles
.
body
}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
_changLanguage
()}
>
<
View
style
=
{
styles
.
languageBorder
}
>
<
View
style
=
{
styles
.
languageSpace
}
>
{
{
/* <Image style={styles.icon} source={require('../assets/English-Language-icon.png')}></Image> */
}
this
.
props
.
language
==
'en'
?
(
<
/View
>
<>
<
View
style
=
{
styles
.
languageSpace
}
>
<
TouchableOpacity
style
=
{{
flex
:
0.2
,
flexDirection
:
'row'
,
backgroundColor
:
'#CFB368'
,
margin
:
10
,
marginHorizontal
:
50
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
borderRadius
:
10
,
paddingVertical
:
10
,
paddingHorizontal
:
20
}}
<
Text
>
ENG
<
/Text
>
onPress
=
{()
=>
this
.
_changLanguage
()}
>
<
/View
>
<
View
style
=
{{
flex
:
0.3
,
}}
>
<
/View
>
<
Image
style
=
{{
height
:
26
,
width
:
40
}}
source
=
{
require
(
'../assets/images/english-flag.png'
)}
/
>
<
/TouchableOpacity
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
_changLanguageId
()}
>
<
View
style
=
{{
flex
:
0.4
,
alignItems
:
'center'
}}
>
<
View
style
=
{
styles
.
languageBorder
}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
}}
>
ENGLISH
<
/Text
>
<
View
style
=
{
styles
.
languageSpace
}
>
<
/View
>
{
/* <Image style={styles.icon} source={require('../assets/Indonesia-Flag-icon.png')}></Image> */
}
<
View
style
=
{{
flex
:
0.2
,
alignItems
:
'flex-end'
}}
>
<
/View
>
<
CheckBox
<
View
style
=
{
styles
.
languageSpace
}
>
onClick
=
{()
=>
this
.
_changLanguage
()}
<
Text
>
ID
<
/Text
>
isChecked
=
{
true
}
<
/View
>
checkedImage
=
{
<
AntDesign
name
=
'checkcircleo'
size
=
{
30
}
color
=
{
'#fff'
}
/>
}
unCheckedImage
=
{
<
Feather
name
=
'circle'
size
=
{
30
}
color
=
{
'#fff'
}
/>
}
/>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{{
flex
:
0.2
,
flexDirection
:
'row'
,
backgroundColor
:
'white'
,
margin
:
10
,
marginHorizontal
:
50
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
borderRadius
:
10
,
borderWidth
:
1
,
borderColor
:
'gray'
,
paddingVertical
:
10
,
paddingHorizontal
:
20
}}
onPress
=
{()
=>
this
.
_changLanguageId
()}
>
<
View
style
=
{{
flex
:
0.3
,
}}
>
<
Image
style
=
{{
height
:
26
,
width
:
40
,
borderWidth
:
1
,
borderColor
:
'gray'
}}
source
=
{
require
(
'../assets/images/indonesia-flag.png'
)}
/
>
<
/View
>
<
View
style
=
{{
flex
:
0.4
,
alignItems
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'gray'
}}
>
INDONESIAN
<
/Text
>
<
/View
>
<
View
style
=
{{
flex
:
0.2
,
alignItems
:
'flex-end'
}}
>
<
CheckBox
onClick
=
{()
=>
this
.
_changLanguageId
()}
isChecked
=
{
false
}
checkedImage
=
{
<
AntDesign
name
=
'checkcircleo'
size
=
{
30
}
color
=
{
'gray'
}
/>
}
unCheckedImage
=
{
<
Feather
name
=
'circle'
size
=
{
30
}
color
=
{
'gray'
}
/>
}
/>
<
/View
>
<
/TouchableOpacity
>
<
/
>
)
:
(
<>
<
TouchableOpacity
style
=
{{
flex
:
0.2
,
flexDirection
:
'row'
,
backgroundColor
:
'white'
,
margin
:
10
,
marginHorizontal
:
50
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
borderRadius
:
10
,
borderWidth
:
1
,
borderColor
:
'gray'
,
paddingVertical
:
10
,
paddingHorizontal
:
20
}}
onPress
=
{()
=>
this
.
_changLanguage
()}
>
<
View
style
=
{{
flex
:
0.3
,
}}
>
<
Image
style
=
{{
height
:
26
,
width
:
40
}}
source
=
{
require
(
'../assets/images/english-flag.png'
)}
/
>
<
/View
>
<
View
style
=
{{
flex
:
0.4
,
alignItems
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'gray'
}}
>
ENGLISH
<
/Text
>
<
/View
>
<
View
style
=
{{
flex
:
0.2
,
alignItems
:
'flex-end'
}}
>
<
CheckBox
onClick
=
{()
=>
this
.
_changLanguage
()}
isChecked
=
{
false
}
checkedImage
=
{
<
AntDesign
name
=
'checkcircleo'
size
=
{
30
}
color
=
{
'gray'
}
/>
}
unCheckedImage
=
{
<
Feather
name
=
'circle'
size
=
{
30
}
color
=
{
'gray'
}
/>
}
/>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{{
flex
:
0.2
,
flexDirection
:
'row'
,
backgroundColor
:
'#CFB368'
,
margin
:
10
,
marginHorizontal
:
50
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
borderRadius
:
10
,
paddingVertical
:
10
,
paddingHorizontal
:
20
}}
onPress
=
{()
=>
this
.
_changLanguageId
()}
>
<
View
style
=
{{
flex
:
0.3
,
}}
>
<
Image
style
=
{{
height
:
26
,
width
:
40
}}
source
=
{
require
(
'../assets/images/indonesia-flag.png'
)}
/
>
<
/View
>
<
View
style
=
{{
flex
:
0.4
,
alignItems
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
}}
>
INDONESIAN
<
/Text
>
<
/View
>
<
View
style
=
{{
flex
:
0.2
,
alignItems
:
'flex-end'
}}
>
<
CheckBox
onClick
=
{()
=>
this
.
_changLanguageId
()}
isChecked
=
{
true
}
checkedImage
=
{
<
AntDesign
name
=
'checkcircleo'
size
=
{
30
}
color
=
{
'#fff'
}
/>
}
unCheckedImage
=
{
<
Feather
name
=
'circle'
size
=
{
30
}
color
=
{
'#fff'
}
/>
}
/>
<
/View
>
<
/TouchableOpacity
>
<
/
>
)
}
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
goBack
()}
>
<
View
style
=
{
styles
.
button
}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
}}
>
Save
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
View
style
=
{
styles
.
button
}
>
<
Button
title
=
"save"
onPress
=
{()
=>
this
.
props
.
navigation
.
goBack
()}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
)
)
}
}
}
}
...
@@ -75,7 +140,7 @@ class Language extends React.Component {
...
@@ -75,7 +140,7 @@ class Language extends React.Component {
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
container
:
{
container
:
{
flex
:
1
,
flex
:
1
,
b
orderWidth
:
1
b
ackgroundColor
:
'white'
},
},
header
:
{
header
:
{
flex
:
0.2
,
flex
:
0.2
,
...
@@ -83,31 +148,31 @@ const styles = StyleSheet.create({
...
@@ -83,31 +148,31 @@ const styles = StyleSheet.create({
justifyContent
:
'center'
justifyContent
:
'center'
},
},
body
:
{
body
:
{
flex
:
0.6
,
flex
:
0.8
,
flexDirection
:
'column'
,
flexDirection
:
'column'
borderWidth
:
1
,
marginLeft
:
60
,
marginRight
:
60
,
},
},
titleText
:
{
titleText
:
{
fontSize
:
26
,
fontSize
:
26
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
},
},
languageBorder
:
{
languageBorder
:
{
flex
:
1
,
flexDirection
:
'row'
,
flexDirection
:
'row'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
borderWidth
:
1
,
borderWidth
:
1
,
marginTop
:
50
,
marginRight
:
40
,
marginLeft
:
40
},
},
languageSpace
:
{
languageSpace
:
{
marginLeft
:
20
marginLeft
:
20
},
},
button
:
{
button
:
{
marginTop
:
50
,
flex
:
0.2
,
marginLeft
:
60
,
backgroundColor
:
'#CFB368'
,
marginRight
:
60
marginTop
:
20
,
marginHorizontal
:
80
,
borderRadius
:
15
,
padding
:
20
,
alignItems
:
'center'
,
justifyContent
:
'center'
},
},
icon
:
{
icon
:
{
height
:
60
,
height
:
60
,
...
...
view/Home.js
View file @
70be6528
...
@@ -205,6 +205,7 @@ class Home extends React.Component {
...
@@ -205,6 +205,7 @@ class Home extends React.Component {
render
()
{
render
()
{
console
.
log
(
this
.
state
.
images
)
return
(
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
ScrollView
>
<
ScrollView
>
...
@@ -224,6 +225,7 @@ class Home extends React.Component {
...
@@ -224,6 +225,7 @@ class Home extends React.Component {
<
View
style
=
{{
backgroundColor
:
'red'
}}
>
<
View
style
=
{{
backgroundColor
:
'red'
}}
>
<
SliderBox
<
SliderBox
images
=
{
this
.
state
.
images
}
images
=
{
this
.
state
.
images
}
onCurrentImagePressed
=
{
index
=>
console
.
log
(
`image
${
index
}
pressed`
)}
autoplay
autoplay
circleLoop
circleLoop
dotColor
=
'black'
dotColor
=
'black'
...
...
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