@@ -3,6 +3,7 @@ import { usePrompt } from '@/Components/PromptProvider/Prompt';
3
3
import { SideBarBreadcrumbs } from '@/Components/SideBarBreadcrumbs/SideBarBreadcrumbs' ;
4
4
import { dbService } from '@/modules/db/db.service' ;
5
5
import { useWallet } from '@/modules/wallet/wallet.hook' ;
6
+ import { walletRepository } from '@/modules/wallet/wallet.repository' ;
6
7
import { deleteProfile } from '@/modules/wallet/wallet.service' ;
7
8
import { getErrorMessage } from '@/utils/getErrorMessage' ;
8
9
import {
@@ -13,9 +14,11 @@ import {
13
14
MonoPassword ,
14
15
MonoPerson ,
15
16
MonoRemoveRedEye ,
17
+ MonoRocketLaunch ,
16
18
MonoSelectAll ,
17
19
MonoSettings ,
18
- MonoSettingsBackupRestore ,
20
+ MonoToggleOff ,
21
+ MonoToggleOn ,
19
22
} from '@kadena/kode-icons/system' ;
20
23
import {
21
24
Button ,
@@ -28,8 +31,12 @@ import {
28
31
import { SideBarBreadcrumbsItem , useLayout } from '@kadena/kode-ui/patterns' ;
29
32
import { useState } from 'react' ;
30
33
import { Link } from 'react-router-dom' ;
31
- import { isFileSystemAccessSupported } from '../../modules/backup/fileApi' ;
32
34
import { linkClass } from '../home/style.css' ;
35
+ import {
36
+ failureClass ,
37
+ successClass ,
38
+ } from '../transaction/components/style.css' ;
39
+ import { AutoBackup } from './auto-backup/auto-backup' ;
33
40
import { ProfileNameColorForm } from './components/ProfileNameColorForm' ;
34
41
import { downloadAsFile } from './utils/download-file' ;
35
42
@@ -100,15 +107,6 @@ export function Settings() {
100
107
>
101
108
Download Entire Database
102
109
</ Button >
103
- < UiLink
104
- href = "/settings/auto-backup"
105
- component = { Link }
106
- variant = "outlined"
107
- startVisual = { < MonoSettingsBackupRestore /> }
108
- isDisabled = { ! isFileSystemAccessSupported ( ) }
109
- >
110
- Set automatic backup
111
- </ UiLink >
112
110
< UiLink
113
111
href = { `/account-discovery/${ keySources [ 0 ] . uuid } ` }
114
112
component = { Link }
@@ -118,9 +116,30 @@ export function Settings() {
118
116
>
119
117
Start Account Discovery
120
118
</ UiLink >
119
+ < AutoBackup />
120
+ < Button
121
+ startVisual = { < MonoRocketLaunch /> }
122
+ endVisual = {
123
+ profile ?. showExperimentalFeatures ? (
124
+ < MonoToggleOn className = { successClass } fontSize = { 40 } />
125
+ ) : (
126
+ < MonoToggleOff fontSize = { 40 } />
127
+ )
128
+ }
129
+ variant = "outlined"
130
+ onClick = { ( ) => {
131
+ if ( profile ?. uuid ) {
132
+ walletRepository . patchProfile ( profile . uuid , {
133
+ showExperimentalFeatures : ! profile . showExperimentalFeatures ,
134
+ } ) ;
135
+ }
136
+ } }
137
+ >
138
+ Experimental Features
139
+ </ Button >
121
140
< Button
122
- variant = "negative "
123
- startVisual = { < MonoDangerous /> }
141
+ variant = "outlined "
142
+ startVisual = { < MonoDangerous className = { failureClass } /> }
124
143
onClick = { async ( ) => {
125
144
if ( ! profile ) return ;
126
145
const answer = await prompt ( ( resolve , reject ) => (
0 commit comments