File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -109,37 +109,36 @@ var theme = (function(){
109109
110110mod . preset = {
111111set : function ( name ) {
112+ var selectedPreset = mod . preset . get ( name ) ;
112113helper . setObject ( {
113114object : state . get . current ( ) ,
114115path : "theme.style" ,
115- newValue : mod . preset . all [ name ] . style
116+ newValue : selectedPreset . style
116117} ) ;
117118helper . setObject ( {
118119object : state . get . current ( ) ,
119- path : "theme.font.display" ,
120- newValue : mod . preset . all [ name ] . font . display
121- } ) ;
122- helper . setObject ( {
123- object : state . get . current ( ) ,
124- path : "theme.font.ui" ,
125- newValue : mod . preset . all [ name ] . font . ui
120+ path : "theme.font" ,
121+ newValue : selectedPreset . font
126122} ) ;
127123helper . setObject ( {
128124object : state . get . current ( ) ,
129125path : "theme.color" ,
130- newValue : mod . preset . all [ name ] . color
126+ newValue : selectedPreset . color
131127} ) ;
132128helper . setObject ( {
133129object : state . get . current ( ) ,
134130path : "theme.accent.current" ,
135- newValue : mod . preset . all [ name ] . accent
131+ newValue : selectedPreset . accent
136132} ) ;
137133helper . setObject ( {
138134object : state . get . current ( ) ,
139135path : "theme.radius" ,
140- newValue : mod . preset . all [ name ] . radius
136+ newValue : selectedPreset . radius
141137} ) ;
142138} ,
139+ get : function ( name ) {
140+ return JSON . parse ( JSON . stringify ( mod . preset . all [ name ] ) ) ;
141+ } ,
143142all : {
144143nighttab : {
145144font : {
You can’t perform that action at this time.
0 commit comments