|
|
|
@ -16,6 +16,8 @@ class app.views.SettingsPage extends app.View
|
|
|
|
|
settings.arrowScroll = app.settings.get('arrowScroll')
|
|
|
|
|
settings.autoInstall = app.settings.get('autoInstall')
|
|
|
|
|
settings.analyticsConsent = app.settings.get('analyticsConsent')
|
|
|
|
|
settings.spaceScroll = app.settings.get('spaceScroll')
|
|
|
|
|
settings.spaceTimeout = app.settings.get('spaceTimeout')
|
|
|
|
|
settings.autoSupported = app.settings.autoSupported
|
|
|
|
|
settings[layout] = app.settings.hasLayout(layout) for layout in app.settings.LAYOUTS
|
|
|
|
|
settings
|
|
|
|
@ -40,6 +42,13 @@ class app.views.SettingsPage extends app.View
|
|
|
|
|
resetAnalytics() unless enable
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
toggleSpaceScroll: (enable) ->
|
|
|
|
|
app.settings.set('spaceScroll', if enable then 1 else 0)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
setScrollTimeout: (value) ->
|
|
|
|
|
app.settings.set('spaceTimeout', value)
|
|
|
|
|
|
|
|
|
|
toggle: (name, enable) ->
|
|
|
|
|
app.settings.set(name, enable)
|
|
|
|
|
return
|
|
|
|
@ -85,6 +94,10 @@ class app.views.SettingsPage extends app.View
|
|
|
|
|
@import input.files[0], input
|
|
|
|
|
when 'analyticsConsent'
|
|
|
|
|
@toggleAnalyticsConsent input.checked
|
|
|
|
|
when 'spaceScroll'
|
|
|
|
|
@toggleSpaceScroll input.checked
|
|
|
|
|
when 'spaceTimeout'
|
|
|
|
|
@setScrollTimeout input.value
|
|
|
|
|
else
|
|
|
|
|
@toggle input.name, input.checked
|
|
|
|
|
return
|
|
|
|
|