Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
backup
Drip
Commits
f2706f50
Commit
f2706f50
authored
4 years ago
by
mashazyu
Committed by
Sofiya Tepikin
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Introduces data management section redesign
parent
a68ec248
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
components/settings/data-management/delete-data.js
+7
-5
7 additions, 5 deletions
components/settings/data-management/delete-data.js
components/settings/data-management/index.js
+35
-36
35 additions, 36 deletions
components/settings/data-management/index.js
with
42 additions
and
41 deletions
components/settings/data-management/delete-data.js
+
7
−
5
View file @
f2706f50
...
...
@@ -3,12 +3,13 @@ import RNFS from 'react-native-fs'
import
{
Alert
,
ToastAndroid
}
from
'
react-native
'
import
PropTypes
from
'
prop-types
'
import
{
clearDb
,
isDbEmpty
}
from
'
../../../db
'
import
{
hasEncryptionObservable
}
from
'
../../../local-storage
'
import
SettingsButton
from
'
../shared/settings-button
'
import
Button
from
'
../../common/button
'
import
ConfirmWithPassword
from
'
../shared/confirm-with-password
'
import
alertError
from
'
../shared/alert-error
'
import
{
clearDb
,
isDbEmpty
}
from
'
../../../db
'
import
{
hasEncryptionObservable
}
from
'
../../../local-storage
'
import
settings
from
'
../../../i18n/en/settings
'
import
{
shared
as
sharedLabels
}
from
'
../../../i18n/en/labels
'
import
{
EXPORT_FILE_NAME
}
from
'
./constants
'
...
...
@@ -18,6 +19,7 @@ const exportedFilePath = `${RNFS.DocumentDirectoryPath}/${EXPORT_FILE_NAME}`
export
default
class
DeleteData
extends
Component
{
constructor
()
{
super
()
this
.
state
=
{
isPasswordSet
:
hasEncryptionObservable
.
value
,
isConfirmingWithPassword
:
false
...
...
@@ -92,9 +94,9 @@ export default class DeleteData extends Component {
}
return
(
<
Settings
Button
onPress
=
{
this
.
alertBeforeDeletion
}
>
<
Button
isCTA
onPress
=
{
this
.
alertBeforeDeletion
}
>
{
settings
.
deleteSegment
.
title
}
<
/
Settings
Button
>
<
/Button
>
)
}
}
...
...
This diff is collapsed.
Click to expand it.
components/settings/data-management/index.js
+
35
−
36
View file @
f2706f50
import
React
,
{
Component
}
from
'
react
'
import
{
ScrollView
,
View
}
from
'
react-native
'
import
AppLoadingView
from
'
../../common/app-loading
'
import
AppPage
from
'
../../common/app-page
'
import
AppText
from
'
../../common/app-text
'
import
Button
from
'
../../common/button
'
import
Segment
from
'
../../common/segment
'
import
AppLoadingView
from
'
../../common/app-loading
'
import
SettingsButton
from
'
../shared/settings-button
'
import
{
openImportDialog
,
getFileContent
,
importData
}
from
'
./import-dialog
'
import
openShareDialogAndExport
from
'
./export-dialog
'
import
DeleteData
from
'
./delete-data
'
import
labels
from
'
../../../i18n/en/settings
'
export
default
class
DataManagement
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
isLoading
:
false
,
currentAction
:
null
...
...
@@ -51,41 +55,36 @@ export default class DataManagement extends Component {
}
render
()
{
const
{
currentAction
}
=
this
.
state
const
{
currentAction
,
isLoading
}
=
this
.
state
const
isDeletingData
=
currentAction
===
'
delete
'
return
(
<
View
flex
=
{
1
}
>
{
this
.
state
.
isLoading
&&
<
AppLoadingView
/>
}
{
!
this
.
state
.
isLoading
&&
<
ScrollView
>
<
View
>
<
Segment
title
=
{
labels
.
export
.
button
}
>
<
AppText
>
{
labels
.
export
.
segmentExplainer
}
<
/AppText
>
<
SettingsButton
onPress
=
{
this
.
startExport
}
>
{
labels
.
export
.
button
}
<
/SettingsButton
>
<
/Segment
>
<
Segment
title
=
{
labels
.
import
.
button
}
>
<
AppText
>
{
labels
.
import
.
segmentExplainer
}
<
/AppText
>
<
SettingsButton
onPress
=
{
this
.
startImport
}
>
{
labels
.
import
.
button
}
<
/SettingsButton
>
<
/Segment
>
<
Segment
title
=
{
labels
.
deleteSegment
.
title
}
last
>
<
AppText
>
{
labels
.
deleteSegment
.
explainer
}
<
/AppText
>
<
DeleteData
isDeletingData
=
{
currentAction
===
'
delete
'
}
onStartDeletion
=
{()
=>
this
.
setCurrentAction
(
'
delete
'
)}
/
>
<
/Segment
>
<
/View
>
<
/ScrollView
>
<
AppPage
>
{
isLoading
&&
<
AppLoadingView
/>
}
{
!
isLoading
&&
<
React
.
Fragment
>
<
Segment
title
=
{
labels
.
export
.
button
}
>
<
AppText
>
{
labels
.
export
.
segmentExplainer
}
<
/AppText
>
<
Button
isCTA
onPress
=
{
this
.
startExport
}
>
{
labels
.
export
.
button
}
<
/Button
>
<
/Segment
>
<
Segment
title
=
{
labels
.
import
.
button
}
>
<
AppText
>
{
labels
.
import
.
segmentExplainer
}
<
/AppText
>
<
Button
isCTA
onPress
=
{
this
.
startImport
}
>
{
labels
.
import
.
button
}
<
/Button
>
<
/Segment
>
<
Segment
title
=
{
labels
.
deleteSegment
.
title
}
last
>
<
AppText
>
{
labels
.
deleteSegment
.
explainer
}
<
/AppText
>
<
DeleteData
isDeletingData
=
{
isDeletingData
}
onStartDeletion
=
{()
=>
this
.
setCurrentAction
(
'
delete
'
)}
/
>
<
/Segment
>
<
/React.Fragment
>
}
<
/
View
>
<
/
AppPage
>
)
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment