@@ -484,13 +484,8 @@ const [cefDebuggingEnabled, setCefDebuggingEnabledLocal] = useState(false);
484484 } ) , [ ] ) ;
485485
486486 useEffect ( ( ) => registerScreenshotAutomationHandler ( 'settings/local-data' , async ( ) => {
487- if ( ! advancedEnabled ) {
488- setAdvancedEnabled ( true ) ;
489- setSetting ( ADVANCED_SETTINGS_KEY , true ) ;
490- await new Promise ( ( resolve ) => window . setTimeout ( resolve , 150 ) ) ;
491- }
492487 localDataSectionRef . current ?. scrollIntoView ( { block : 'center' } ) ;
493- } ) , [ advancedEnabled ] ) ;
488+ } ) , [ ] ) ;
494489
495490 useEffect ( ( ) => registerScreenshotAutomationHandler ( 'settings/account-linking' , async ( ) => {
496491 setPluginLinkStatus ( {
@@ -997,6 +992,92 @@ const [cefDebuggingEnabled, setCefDebuggingEnabledLocal] = useState(false);
997992 </ div >
998993 </ div >
999994
995+ { /* backup & restore -- always visible, at end of normal settings */ }
996+ < div ref = { localDataSectionRef } style = { sectionStyle ( ) } >
997+ < div style = { { display : 'flex' , justifyContent : 'space-between' , alignItems : 'baseline' , gap : 12 , marginBottom : 4 , marginRight : 8 } } >
998+ < div style = { { fontSize : 15 , fontWeight : 700 , color : '#eef7ff' } } >
999+ { extras . localDataSection ( ) }
1000+ </ div >
1001+ { backupStatusMessage && (
1002+ < div
1003+ style = { {
1004+ fontSize : 10 ,
1005+ color :
1006+ backupStatusTone === 'success'
1007+ ? '#9dc4e8'
1008+ : backupStatusTone === 'error'
1009+ ? '#f3b3b3'
1010+ : '#7a9bb5' ,
1011+ textAlign : 'right' ,
1012+ maxWidth : 360 ,
1013+ lineHeight : 1.35 ,
1014+ } }
1015+ >
1016+ { backupStatusMessage }
1017+ </ div >
1018+ ) }
1019+ </ div >
1020+ < div style = { { fontSize : 11 , color : '#7a9bb5' , margin : '0 8px 10px' } } >
1021+ { extras . localDataSectionDescription ( ) }
1022+ </ div >
1023+ < div
1024+ style = { {
1025+ margin : '0 8px 12px' ,
1026+ padding : '10px 12px' ,
1027+ borderRadius : 8 ,
1028+ border : '1px solid rgba(255,255,255,0.08)' ,
1029+ background : 'rgba(255,255,255,0.03)' ,
1030+ } }
1031+ >
1032+ < div style = { { display : 'flex' , alignItems : 'flex-start' , justifyContent : 'space-between' , gap : 10 , marginBottom : 4 } } >
1033+ < div style = { { fontSize : 11 , fontWeight : 700 , color : '#eef7ff' , minWidth : 0 , flex : 1 } } >
1034+ { extras . anonymousClientId ( ) }
1035+ </ div >
1036+ < div style = { { width : 76 , flexShrink : 0 , overflow : 'hidden' , borderRadius : 8 } } >
1037+ < DialogButton
1038+ onClick = { ( ) => void handleCopyAnonymousClientId ( ) }
1039+ disabled = { ! anonymousClientId }
1040+ style = { {
1041+ minWidth : 0 ,
1042+ width : '100%' ,
1043+ padding : '4px 8px' ,
1044+ fontSize : 10 ,
1045+ lineHeight : 1.1 ,
1046+ } }
1047+ >
1048+ { extras . copyAnonymousClientId ( ) }
1049+ </ DialogButton >
1050+ </ div >
1051+ </ div >
1052+ < div style = { { fontSize : 10 , color : '#7a9bb5' , marginBottom : 6 , lineHeight : 1.4 } } >
1053+ { extras . anonymousClientIdDescription ( ) }
1054+ </ div >
1055+ < div style = { { fontSize : 11 , fontFamily : 'monospace' , color : '#9dc4e8' , wordBreak : 'break-all' } } >
1056+ { anonymousClientId ?? extras . anonymousClientIdLoading ( ) }
1057+ </ div >
1058+ </ div >
1059+ < div style = { { ...focusClipRowStyle ( ) , paddingBottom : 8 } } >
1060+ < DialogButton onClick = { ( ) => void handleExportLocalData ( ) } disabled = { backupBusy } >
1061+ < div style = { { fontSize : 12 , fontWeight : 600 } } >
1062+ { extras . backupLocalData ( ) }
1063+ </ div >
1064+ < div style = { { fontSize : 11 , color : '#7a9bb5' } } >
1065+ { extras . backupLocalDataDescription ( ) }
1066+ </ div >
1067+ </ DialogButton >
1068+ </ div >
1069+ < div style = { focusClipRowStyle ( ) } >
1070+ < DialogButton onClick = { ( ) => void handleImportLocalData ( ) } disabled = { backupBusy } >
1071+ < div style = { { fontSize : 12 , fontWeight : 600 } } >
1072+ { extras . importLocalData ( ) }
1073+ </ div >
1074+ < div style = { { fontSize : 11 , color : '#7a9bb5' } } >
1075+ { extras . importLocalDataDescription ( ) }
1076+ </ div >
1077+ </ DialogButton >
1078+ </ div >
1079+ </ div >
1080+
10001081 { /* advanced settings toggle */ }
10011082 < div style = { sectionStyle ( ) } >
10021083 < div ref = { advancedSettingsRowRef } style = { focusClipRowStyle ( ) } >
@@ -1080,93 +1161,6 @@ const [cefDebuggingEnabled, setCefDebuggingEnabledLocal] = useState(false);
10801161 </ div >
10811162 ) }
10821163
1083- { advancedEnabled && (
1084- < div ref = { localDataSectionRef } style = { sectionStyle ( ) } >
1085- < div style = { { display : 'flex' , justifyContent : 'space-between' , alignItems : 'baseline' , gap : 12 , marginBottom : 4 , marginRight : 8 } } >
1086- < div style = { { fontSize : 15 , fontWeight : 700 , color : '#eef7ff' } } >
1087- { extras . localDataSection ( ) }
1088- </ div >
1089- { backupStatusMessage && (
1090- < div
1091- style = { {
1092- fontSize : 10 ,
1093- color :
1094- backupStatusTone === 'success'
1095- ? '#9dc4e8'
1096- : backupStatusTone === 'error'
1097- ? '#f3b3b3'
1098- : '#7a9bb5' ,
1099- textAlign : 'right' ,
1100- maxWidth : 360 ,
1101- lineHeight : 1.35 ,
1102- } }
1103- >
1104- { backupStatusMessage }
1105- </ div >
1106- ) }
1107- </ div >
1108- < div style = { { fontSize : 11 , color : '#7a9bb5' , margin : '0 8px 10px' } } >
1109- { extras . localDataSectionDescription ( ) }
1110- </ div >
1111- < div
1112- style = { {
1113- margin : '0 8px 12px' ,
1114- padding : '10px 12px' ,
1115- borderRadius : 8 ,
1116- border : '1px solid rgba(255,255,255,0.08)' ,
1117- background : 'rgba(255,255,255,0.03)' ,
1118- } }
1119- >
1120- < div style = { { display : 'flex' , alignItems : 'flex-start' , justifyContent : 'space-between' , gap : 10 , marginBottom : 4 } } >
1121- < div style = { { fontSize : 11 , fontWeight : 700 , color : '#eef7ff' , minWidth : 0 , flex : 1 } } >
1122- { extras . anonymousClientId ( ) }
1123- </ div >
1124- < div style = { { width : 76 , flexShrink : 0 , overflow : 'hidden' , borderRadius : 8 } } >
1125- < DialogButton
1126- onClick = { ( ) => void handleCopyAnonymousClientId ( ) }
1127- disabled = { ! anonymousClientId }
1128- style = { {
1129- minWidth : 0 ,
1130- width : '100%' ,
1131- padding : '4px 8px' ,
1132- fontSize : 10 ,
1133- lineHeight : 1.1 ,
1134- } }
1135- >
1136- { extras . copyAnonymousClientId ( ) }
1137- </ DialogButton >
1138- </ div >
1139- </ div >
1140- < div style = { { fontSize : 10 , color : '#7a9bb5' , marginBottom : 6 , lineHeight : 1.4 } } >
1141- { extras . anonymousClientIdDescription ( ) }
1142- </ div >
1143- < div style = { { fontSize : 11 , fontFamily : 'monospace' , color : '#9dc4e8' , wordBreak : 'break-all' } } >
1144- { anonymousClientId ?? extras . anonymousClientIdLoading ( ) }
1145- </ div >
1146- </ div >
1147- < div style = { { ...focusClipRowStyle ( ) , paddingBottom : 8 } } >
1148- < DialogButton onClick = { ( ) => void handleExportLocalData ( ) } disabled = { backupBusy } >
1149- < div style = { { fontSize : 12 , fontWeight : 600 } } >
1150- { extras . backupLocalData ( ) }
1151- </ div >
1152- < div style = { { fontSize : 11 , color : '#7a9bb5' } } >
1153- { extras . backupLocalDataDescription ( ) }
1154- </ div >
1155- </ DialogButton >
1156- </ div >
1157- < div style = { focusClipRowStyle ( ) } >
1158- < DialogButton onClick = { ( ) => void handleImportLocalData ( ) } disabled = { backupBusy } >
1159- < div style = { { fontSize : 12 , fontWeight : 600 } } >
1160- { extras . importLocalData ( ) }
1161- </ div >
1162- < div style = { { fontSize : 11 , color : '#7a9bb5' } } >
1163- { extras . importLocalDataDescription ( ) }
1164- </ div >
1165- </ DialogButton >
1166- </ div >
1167- </ div >
1168- ) }
1169-
11701164 { /* advanced section: performance metrics */ }
11711165 { advancedEnabled && (
11721166 < div style = { sectionStyle ( ) } >
0 commit comments