Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
new_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
new_excelso
Commits
1f5b3b13
Commit
1f5b3b13
authored
Jul 24, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Privacy Statement and update build 124
parent
3b83a2b0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
193 additions
and
23 deletions
+193
-23
app.json
app.json
+1
-1
en.json
lib/en.json
+2
-1
id.json
lib/id.json
+2
-1
Auth.js
view/Auth.js
+51
-11
Login.js
view/Login.js
+10
-9
PrivacyStatement.js
view/PrivacyStatement.js
+127
-0
No files found.
app.json
View file @
1f5b3b13
{
"expo"
:
{
"extra"
:
{
"buildNumber"
:
"12
3
"
,
"buildNumber"
:
"12
4
"
,
"remarks"
:
""
},
...
...
lib/en.json
View file @
1f5b3b13
...
...
@@ -221,5 +221,6 @@
"updateVersion"
:
"Please update your application"
,
"upgradePremiumRespon"
:
"We have received your premium upgrade request, please wait 1x24 hours!"
,
"signin"
:
"Sign In"
,
"cardActivation"
:
"Card Activation"
"cardActivation"
:
"Card Activation"
,
"headerPrivacyPolicy"
:
"Privacy Policy"
}
\ No newline at end of file
lib/id.json
View file @
1f5b3b13
...
...
@@ -221,5 +221,6 @@
"updateVersion"
:
"Mohon update aplikasi terlebih dahulu"
,
"upgradePremiumRespon"
:
"Kita sudah menerima permintaan upgrade premium, mohon tunggu 1x24 jam!"
,
"signin"
:
"Masuk"
,
"cardActivation"
:
"Aktivasi Kartu"
"cardActivation"
:
"Aktivasi Kartu"
,
"headerPrivacyPolicy"
:
"Kebijakan Privasi"
}
\ No newline at end of file
view/Auth.js
View file @
1f5b3b13
...
...
@@ -60,6 +60,7 @@ import UpdateVersion from './UpdateVersion';
import
SettingUrl
from
'./setBaseUrl'
;
import
InboxList
from
'./InboxList'
;
import
InboxDetail
from
'./InboxDetail'
;
import
PrivacyStatement
from
'./PrivacyStatement'
;
import
badgeInbox
from
'./Home'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useSafeArea
}
from
'react-native-safe-area-context'
;
...
...
@@ -85,28 +86,28 @@ const BottomNavigation = ({ state, descriptors, navigation }) => {
:
options
.
title
!==
undefined
?
options
.
title
:
route
.
name
;
const
isFocused
=
state
.
index
===
index
;
const
onPress
=
()
=>
{
const
event
=
navigation
.
emit
({
type
:
'tabPress'
,
target
:
route
.
key
,
canPreventDefault
:
true
,
});
if
(
!
isFocused
&&
!
event
.
defaultPrevented
)
{
navigation
.
navigate
(
route
.
name
);
}
};
const
onLongPress
=
()
=>
{
navigation
.
emit
({
type
:
'tabLongPress'
,
target
:
route
.
key
,
});
};
let
icon
=
require
(
'../assets/icon/icon-home.png'
)
if
(
label
===
'HOME'
)
{
icon
=
require
(
'../assets/icon/icon-home.png'
)
...
...
@@ -121,7 +122,7 @@ const BottomNavigation = ({ state, descriptors, navigation }) => {
}
else
if
(
label
===
'ACCOUNT'
)
{
icon
=
require
(
'../assets/icon/icon-account.png'
)
}
return
(
<
TouchableOpacity
key
=
{
route
.
name
}
...
...
@@ -142,7 +143,7 @@ const BottomNavigation = ({ state, descriptors, navigation }) => {
}
catch
(
error
)
{
Alert
.
alert
(
'Error '
+
error
)
}
}
function
HandleInbox
({
navigation
})
{
...
...
@@ -169,9 +170,9 @@ function HomePage({ navigation }) {
<
/Tab.Navigator
>
);
}
catch
(
error
)
{
Alert
.
alert
(
'Error : '
+
error
)
Alert
.
alert
(
'Error : '
+
error
)
}
}
const
Stack
=
createStackNavigator
();
class
Auth
extends
React
.
Component
{
...
...
@@ -180,8 +181,8 @@ class Auth extends React.Component {
i18n
.
locale
=
this
.
props
.
language
;
}
componentDidMount
(){
console
.
log
(
"INI"
+
this
.
props
.
pageEmailConfirmation
)
componentDidMount
()
{
console
.
log
(
"INI"
+
this
.
props
.
pageEmailConfirmation
)
}
...
...
@@ -264,6 +265,19 @@ class Auth extends React.Component {
<
Stack
.
Screen
name
=
"Welcomes"
component
=
{
WelcomeReg
}
options
=
{{
headerShown
:
false
,
}}
/
>
<
Stack
.
Screen
name
=
"Privacy Statement"
component
=
{
PrivacyStatement
}
options
=
{{
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
headerTitleAlign
:
'center'
,
headerTintColor
:
'#fff'
,
headerTitleStyle
:
{
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
20
,
color
:
'white'
,
textAlign
:
'center'
},
title
:
i18n
.
t
(
'headerPrivacyPolicy'
)
}}
/
>
<
/
>
)
:
this
.
props
.
pageEmailConfirmation
==
true
?
(
...
...
@@ -315,6 +329,19 @@ class Auth extends React.Component {
<
Stack
.
Screen
name
=
"UpdateVersion"
component
=
{
UpdateVersion
}
options
=
{{
headerShown
:
false
}}
/
>
<
Stack
.
Screen
name
=
"Privacy Statement"
component
=
{
PrivacyStatement
}
options
=
{{
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
headerTitleAlign
:
'center'
,
headerTintColor
:
'#fff'
,
headerTitleStyle
:
{
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
20
,
color
:
'white'
,
textAlign
:
'center'
},
title
:
i18n
.
t
(
'headerPrivacyPolicy'
)
}}
/
>
<
/
>
)
:
(
<>
...
...
@@ -414,6 +441,19 @@ class Auth extends React.Component {
title
:
'SETTING URL'
}}
/
>
<
Stack
.
Screen
name
=
"Login"
component
=
{
Login
}
options
=
{{
headerShown
:
false
}}
/
>
<
Stack
.
Screen
name
=
"Privacy Statement"
component
=
{
PrivacyStatement
}
options
=
{{
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
headerTitleAlign
:
'center'
,
headerTintColor
:
'#fff'
,
headerTitleStyle
:
{
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
20
,
color
:
'white'
,
textAlign
:
'center'
},
title
:
i18n
.
t
(
'headerPrivacyPolicy'
)
}}
/
>
<
Stack
.
Screen
name
=
"Transfer Balance"
component
=
{
TransferBalance
}
options
=
{{
headerStyle
:
{
backgroundColor
:
"#CFB368"
},
headerBackTitleStyle
:
{
color
:
'white'
},
...
...
view/Login.js
View file @
1f5b3b13
...
...
@@ -47,14 +47,15 @@ class Login extends React.Component {
}
}
handleSettings
()
{
if
(
this
.
state
.
clickSettings
==
3
)
{
this
.
props
.
navigation
.
navigate
(
'Setting'
)
this
.
setState
({
clickSettings
:
0
})
}
else
{
let
new_count
=
this
.
state
.
clickSettings
this
.
setState
({
clickSettings
:
new_count
+
1
})
}
privacyPolicy
()
{
// if (this.state.clickSettings == 3) {
// this.props.navigation.navigate('Setting')
// this.setState({ clickSettings: 0 })
// } else {
// let new_count = this.state.clickSettings
// this.setState({ clickSettings: new_count + 1 })
// }
this
.
props
.
navigation
.
navigate
(
'Privacy Statement'
)
}
_getDeviceInfo
=
async
()
=>
{
...
...
@@ -316,7 +317,7 @@ class Login extends React.Component {
<
/View
>
<
View
style
=
{{
flex
:
1
,
justifyContent
:
'center'
,
marginRight
:
60
,
marginLeft
:
60
}}
>
<
TouchableWithoutFeedback
onPress
=
{()
=>
this
.
handleSettings
()}
>
<
TouchableWithoutFeedback
onPress
=
{()
=>
this
.
privacyPolicy
()}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Light'
,
color
:
'#CFB368'
,
fontSize
:
13
,
textAlign
:
'center'
,
marginBottom
:
5
}}
>
{
i18n
.
t
(
'policy'
)}
<
Text
style
=
{{
fontWeight
:
'bold'
}}
>
{
i18n
.
t
(
'privacy'
)}
<
/Text
>
<
/Text
>
...
...
view/PrivacyStatement.js
0 → 100644
View file @
1f5b3b13
import
Axios
from
'axios'
;
import
React
from
'react'
;
import
{
Alert
,
StyleSheet
,
View
}
from
'react-native'
;
import
{
ScrollView
}
from
'react-native-gesture-handler'
;
import
Spinner
from
'react-native-loading-spinner-overlay'
;
import
HTML
from
'react-native-render-html'
;
import
MyStatusBar
from
'./MyStatusBar'
;
export
default
class
PrivacyStatement
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
content
:
''
,
spinner
:
true
,
}
}
componentDidMount
()
{
try
{
this
.
getPrivacyStatement
()
}
catch
(
error
)
{
Alert
.
alert
(
'Error'
,
+
error
)
}
}
getPrivacyStatement
()
{
try
{
Axios
.
get
(
'https://excelsocrm.ravintoladev.com/cms/v2/detail/privacy-statement'
).
then
(
res
=>
{
console
.
log
(
res
.
data
.
content3
)
const
respon
=
res
.
data
this
.
setState
({
content
:
respon
.
content3
,
spinner
:
false
})
})
}
catch
(
error
)
{
Alert
.
alert
(
'Error:'
+
error
)
}
}
render
()
{
// console.log(this.state.content)
try
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
MyStatusBar
/>
<
Spinner
visible
=
{
this
.
state
.
spinner
}
textContent
=
{
'Loading...'
}
textStyle
=
{{
color
:
'#CFB368'
}}
animation
=
{
'fade'
}
color
=
{
'#CFB368'
}
overlayColor
=
{
'#838383'
}
/
>
<
ScrollView
style
=
{
styles
.
body
}
>
{
/* <View style={styles.image_container(this.state.image_height)}>
<Image style={styles.image(this.state.image_height)} source={this.state.image ? { uri: this.state.image } : null} />
</View> */
}
<
View
style
=
{
styles
.
content
}
>
<
HTML
html
=
{
this
.
state
.
content
}
tagsStyles
=
{{
p
:
{
fontSize
:
12
,
color
:
'#838383'
,
fontFamily
:
'Gotham-Light'
,
marginVertical
:
1.5
},
blockquote
:
{
backgroundColor
:
"#f1f1f1"
,
padding
:
12
,
paddingBottom
:
0
,
marginTop
:
0
},
li
:
{
fontSize
:
12
,
color
:
'#838383'
,
fontFamily
:
'Gotham-Light'
,
marginBottom
:
0
},
ul
:
{
fontSize
:
12
,
color
:
'#838383'
,
fontFamily
:
'Gotham-Light'
,
marginVertical
:
5
,
marginBottom
:
-
10
},
}}
ignoredTags
=
{[
'br'
]}
ignoredStyles
=
{[
'font-family'
,
' '
,
'&'
]}
/
>
<
/View
>
<
/ScrollView
>
<
/View
>
)
}
catch
(
error
)
{
Alert
.
alert
(
'Error'
+
error
)
}
}
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
backgroundColor
:
'white'
,
},
header
:
{
height
:
60
,
paddingHorizontal
:
5
,
flexDirection
:
'row'
,
backgroundColor
:
'#CFB368'
,
alignItems
:
'center'
},
headerTitle
:
{
flex
:
1
,
textAlign
:
'center'
,
margin
:
20
,
fontSize
:
23
,
alignSelf
:
'center'
,
color
:
'white'
,
fontFamily
:
'Gotham-Black'
},
image_container
:
(
height
)
=>
({
height
:
height
,
backgroundColor
:
'gray'
}),
image
:
(
height
)
=>
({
width
:
'100%'
,
height
:
height
}),
title
:
{
textAlign
:
'center'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
22
,
marginBottom
:
10
,
color
:
'#CFB368'
},
content
:
{
paddingHorizontal
:
25
,
paddingVertical
:
30
},
body
:
{
}
})
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