Hiding "Disable smooth scroll" option in web (#2638)
* Hiding "smooth-scroll" setting when not electron - This feature requires the restart of electron and doesn't work in web builds. * Removing this comment - A safeguard was added - This function won't be called unless IS_ELECTRON is true
This commit is contained in:
parent
fbc0bff055
commit
f0deb78e6f
|
@ -109,6 +109,9 @@ export default Vue.extend({
|
|||
const colorName = colorVal.replace(/([A-Z])/g, ' $1').trim()
|
||||
return this.$t(`Settings.Theme Settings.Main Color Theme.${colorName}`)
|
||||
})
|
||||
},
|
||||
usingElectron: function () {
|
||||
return process.env.IS_ELECTRON
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
|
@ -139,9 +142,7 @@ export default Vue.extend({
|
|||
this.updateDisableSmoothScrolling(
|
||||
this.disableSmoothScrollingToggleValue
|
||||
).then(() => {
|
||||
// FIXME: No electron safeguard
|
||||
const { ipcRenderer } = require('electron')
|
||||
|
||||
ipcRenderer.send('relaunchRequest')
|
||||
})
|
||||
},
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
@change="handleExpandSideBar"
|
||||
/>
|
||||
<ft-toggle-switch
|
||||
v-if="usingElectron"
|
||||
:label="$t('Settings.Theme Settings.Disable Smooth Scrolling')"
|
||||
:default-value="disableSmoothScrollingToggleValue"
|
||||
@change="handleRestartPrompt"
|
||||
|
|
Loading…
Reference in New Issue