16
16
@change =" handleReplaceHttpCacheChange"
17
17
/>
18
18
</FtFlexBox >
19
- <FtFlexBox v-if =" storeUserDataInAppFolderAllowedOnPlatform " >
19
+ <FtFlexBox v-if =" storeUserDataInAppFolderAllowed " >
20
20
<FtToggleSwitch
21
21
tooltip-position =" top"
22
22
:label =" $t('Settings.Experimental Settings.Store User Data In App Folder.Label')"
23
23
compact
24
- :default-value =" storeUserDataInAppFolder "
24
+ :default-value =" storeUserDataInAppFolderEnabled "
25
25
:disabled =" settingValuesLoading"
26
26
:tooltip =" $t('Settings.Experimental Settings.Store User Data In App Folder.Tooltip')"
27
27
@change =" handleStoreUserDataInAppFolderChange"
@@ -47,10 +47,10 @@ import FtPrompt from '../FtPrompt/FtPrompt.vue'
47
47
48
48
const settingValuesLoading = ref (true )
49
49
const replaceHttpCache = ref (false )
50
- const storeUserDataInAppFolder = ref (false )
50
+ const storeUserDataInAppFolderEnabled = ref (false )
51
51
const showRestartPrompt = ref (false )
52
52
53
- const storeUserDataInAppFolderAllowedOnPlatform = process . platform === ' win32 '
53
+ const storeUserDataInAppFolderAllowed = ref ( false )
54
54
55
55
const NextActions = {
56
56
// Simply use 1-N unique values
@@ -64,8 +64,9 @@ let nextAction = NextActions.NOTHING
64
64
onMounted (async () => {
65
65
if (process .env .IS_ELECTRON ) {
66
66
replaceHttpCache .value = await window .ftElectron .getReplaceHttpCache ()
67
- if (storeUserDataInAppFolderAllowedOnPlatform) {
68
- storeUserDataInAppFolder .value = await window .ftElectron .getStoreUserDataInAppFolder ()
67
+ storeUserDataInAppFolderAllowed .value = await window .ftElectron .getStoreUserDataInAppFolderAllowed ()
68
+ if (storeUserDataInAppFolderAllowed .value ) {
69
+ storeUserDataInAppFolderEnabled .value = await window .ftElectron .getStoreUserDataInAppFolderEnabled ()
69
70
}
70
71
}
71
72
@@ -85,7 +86,7 @@ function handleReplaceHttpCacheChange(value) {
85
86
* @param {boolean} value
86
87
*/
87
88
function handleStoreUserDataInAppFolderChange (value ) {
88
- storeUserDataInAppFolder .value = value
89
+ storeUserDataInAppFolderEnabled .value = value
89
90
nextAction = NextActions .TOGGLE_STORE_USER_DATA_IN_APP_FOLDER
90
91
showRestartPrompt .value = true
91
92
}
@@ -110,7 +111,7 @@ function handleRestartPromptClick(value) {
110
111
}
111
112
case NextActions .TOGGLE_STORE_USER_DATA_IN_APP_FOLDER : {
112
113
if (value === null || value === ' cancel' ) {
113
- storeUserDataInAppFolder .value = ! storeUserDataInAppFolder .value
114
+ storeUserDataInAppFolderEnabled .value = ! storeUserDataInAppFolderEnabled .value
114
115
return
115
116
}
116
117
0 commit comments