Skip to content
Snippets Groups Projects
Commit 50c28582 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Allow add variables to theme class without persistence

parent 7f18d76c
No related branches found
No related tags found
No related merge requests found
......@@ -90,18 +90,19 @@ RocketChat.theme = new class
process.emit('message', {refresh: 'client'})
addVariable: (type, name, value, isPublic=true) ->
addVariable: (type, name, value, persist=true) ->
@variables[name] =
type: type
value: value
config =
group: 'Theme'
type: type
section: type
public: isPublic
if persist is true
config =
group: 'Theme'
type: type
section: type
public: false
RocketChat.settings.add "theme-#{type}-#{name}", value, config
RocketChat.settings.add "theme-#{type}-#{name}", value, config
addPublicColor: (name, value) ->
@addVariable 'color', name, value, true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment