1616 @change =" handleReplaceHttpCacheChange"
1717 />
1818 </FtFlexBox >
19- <FtFlexBox v-if =" storeUserDataInAppFolderAllowedOnPlatform " >
19+ <FtFlexBox v-if =" storeUserDataInAppFolderAllowed " >
2020 <FtToggleSwitch
2121 tooltip-position =" top"
2222 :label =" $t('Settings.Experimental Settings.Store User Data In App Folder.Label')"
2323 compact
24- :default-value =" storeUserDataInAppFolder "
24+ :default-value =" storeUserDataInAppFolderEnabled "
2525 :disabled =" settingValuesLoading"
2626 :tooltip =" $t('Settings.Experimental Settings.Store User Data In App Folder.Tooltip')"
2727 @change =" handleStoreUserDataInAppFolderChange"
@@ -47,10 +47,10 @@ import FtPrompt from '../FtPrompt/FtPrompt.vue'
4747
4848const settingValuesLoading = ref (true )
4949const replaceHttpCache = ref (false )
50- const storeUserDataInAppFolder = ref (false )
50+ const storeUserDataInAppFolderEnabled = ref (false )
5151const showRestartPrompt = ref (false )
5252
53- const storeUserDataInAppFolderAllowedOnPlatform = process . platform === ' win32 '
53+ const storeUserDataInAppFolderAllowed = ref ( false )
5454
5555const NextActions = {
5656 // Simply use 1-N unique values
@@ -64,8 +64,9 @@ let nextAction = NextActions.NOTHING
6464onMounted (async () => {
6565 if (process .env .IS_ELECTRON ) {
6666 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 ()
6970 }
7071 }
7172
@@ -85,7 +86,7 @@ function handleReplaceHttpCacheChange(value) {
8586 * @param {boolean} value
8687 */
8788function handleStoreUserDataInAppFolderChange (value ) {
88- storeUserDataInAppFolder .value = value
89+ storeUserDataInAppFolderEnabled .value = value
8990 nextAction = NextActions .TOGGLE_STORE_USER_DATA_IN_APP_FOLDER
9091 showRestartPrompt .value = true
9192}
@@ -110,7 +111,7 @@ function handleRestartPromptClick(value) {
110111 }
111112 case NextActions .TOGGLE_STORE_USER_DATA_IN_APP_FOLDER : {
112113 if (value === null || value === ' cancel' ) {
113- storeUserDataInAppFolder .value = ! storeUserDataInAppFolder .value
114+ storeUserDataInAppFolderEnabled .value = ! storeUserDataInAppFolderEnabled .value
114115 return
115116 }
116117
0 commit comments