Skip to content

Commit 2ffd4f8

Browse files
committed
Add theme config backward compatability
1 parent 2d29cf0 commit 2ffd4f8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

nodes/config/ui_theme.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,27 @@
5959
// groups
6060
this.colors.groupBgDark = '#333333'
6161
this.colors.groupOutlineDark = '#cccccc'
62+
} else if (!hasProperty(this.colors, 'surfaceLight')) {
63+
// backward compatability
64+
if (hasProperty(this.colors, 'surface')) {
65+
// set default values for light theme
66+
this.colors.surfaceLight = this.colors.surface
67+
this.colors.primaryLight = this.colors.primary
68+
// pages
69+
this.colors.bgPageLight = this.colors.bgPage
70+
// groups
71+
this.colors.groupBgLight = this.colors.groupBg
72+
this.colors.groupOutlineLight = this.colors.groupOutline
73+
74+
// set default values for dark theme
75+
this.colors.surfaceDark = '#111111'
76+
this.colors.primaryDark = this.colors.primary
77+
// pages
78+
this.colors.bgPageDark = '#222222'
79+
// groups
80+
this.colors.groupBgDark = '#333333'
81+
this.colors.groupOutlineDark = '#cccccc'
82+
}
6283
}
6384

6485
if (!this.sizes) {

0 commit comments

Comments
 (0)