mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
13 lines
336 B
CoffeeScript
13 lines
336 B
CoffeeScript
|
define [], () ->
|
||
|
class SettingsManager
|
||
|
constructor: (@ide, @$scope) ->
|
||
|
@$scope.settings = window.userSettings
|
||
|
|
||
|
@$scope.$watch "settings.theme", (theme, oldTheme) =>
|
||
|
if theme != oldTheme
|
||
|
@saveSettings({theme: theme})
|
||
|
|
||
|
saveSettings: (data) ->
|
||
|
data._csrf = window.csrfToken
|
||
|
@ide.$http.post "/user/settings", data
|