@symbo.ls/preview 2.7.18 → 2.7.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@symbo.ls/preview",
|
|
3
3
|
"description": "",
|
|
4
4
|
"author": "symbo.ls",
|
|
5
|
-
"version": "2.7.
|
|
5
|
+
"version": "2.7.20",
|
|
6
6
|
"main": "src/app.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"link:all": "yarn link smbls domql css-in-props @symbo.ls/icons @symbo.ls/config @symbo.ls/components @symbo.ls/scratch @symbo.ls/playground @symbo.ls/utils @symbo.ls/init @symbo.ls/config-default @domql/router @domql/utils @domql/router",
|
package/src/components/Header.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { router } from '@domql/router'
|
|
4
4
|
import { HeaderSignup, HeaderOfMember } from '@symbo.ls/components'
|
|
5
|
-
import { getCookie } from 'domql/packages/cookie'
|
|
6
5
|
|
|
7
6
|
export const Header = {
|
|
8
7
|
props: {
|
|
@@ -27,18 +26,9 @@ export const HeaderOnRouter = {
|
|
|
27
26
|
props: { width: '100%' },
|
|
28
27
|
|
|
29
28
|
define: { routes: param => param },
|
|
30
|
-
routes:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return {
|
|
34
|
-
'/*': HeaderOfMember
|
|
35
|
-
}
|
|
36
|
-
} else {
|
|
37
|
-
return {
|
|
38
|
-
'/*': HeaderSignup
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
}
|
|
29
|
+
routes: {
|
|
30
|
+
'/*': HeaderOfMember,
|
|
31
|
+
'/': HeaderSignup
|
|
42
32
|
},
|
|
43
33
|
|
|
44
34
|
on: {
|
|
@@ -49,7 +39,7 @@ export const HeaderOnRouter = {
|
|
|
49
39
|
router(element, '/', {}, { updateState: false, pushState: false })
|
|
50
40
|
}
|
|
51
41
|
},
|
|
52
|
-
|
|
42
|
+
initUpdate: (element, s, changes) => {
|
|
53
43
|
if (cacheToken !== s.userToken) {
|
|
54
44
|
cacheToken = s.userToken
|
|
55
45
|
if (s.userToken) {
|
|
@@ -36,7 +36,7 @@ const ButtonOptions = {
|
|
|
36
36
|
childExtend: {
|
|
37
37
|
extend: [ClickableItem, WiderButton, TooltipParent],
|
|
38
38
|
props: ({ key, state, parent }) => ({
|
|
39
|
-
active: state[parent.parent.key] === key,
|
|
39
|
+
active: state[parent.parent.key] === key.toLowerCase(),
|
|
40
40
|
|
|
41
41
|
style: {
|
|
42
42
|
'&:hover, &:focus-visible': {
|
|
@@ -78,7 +78,7 @@ const ButtonOptions = {
|
|
|
78
78
|
click: (ev, el, s) => {
|
|
79
79
|
const key = el.parent.parent.key
|
|
80
80
|
const value = el.key.toLowerCase()
|
|
81
|
-
setCookie(key, value
|
|
81
|
+
setCookie(key, value)
|
|
82
82
|
s.update({ [key]: value })
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -145,16 +145,6 @@ export const CreateDocumentTheme = {
|
|
|
145
145
|
|
|
146
146
|
const colorRef = {}
|
|
147
147
|
|
|
148
|
-
if (light) {
|
|
149
|
-
colorRef.light = {
|
|
150
|
-
key: 'light',
|
|
151
|
-
title: 'Day',
|
|
152
|
-
icon: 'sun',
|
|
153
|
-
color: COLOR[light.color] || light.color || '#000000',
|
|
154
|
-
background: COLOR[light.background] || light.background || '#FFFFFF'
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
148
|
if (dark) {
|
|
159
149
|
colorRef.dark = {
|
|
160
150
|
key: 'dark',
|
|
@@ -165,6 +155,16 @@ export const CreateDocumentTheme = {
|
|
|
165
155
|
}
|
|
166
156
|
}
|
|
167
157
|
|
|
158
|
+
if (light) {
|
|
159
|
+
colorRef.light = {
|
|
160
|
+
key: 'light',
|
|
161
|
+
title: 'Day',
|
|
162
|
+
icon: 'sun',
|
|
163
|
+
color: COLOR[light.color] || light.color || '#000000',
|
|
164
|
+
background: COLOR[light.background] || light.background || '#FFFFFF'
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
168
|
state.update({
|
|
169
169
|
values: colorRef
|
|
170
170
|
}, { preventUpdate: true, ignoreInitUpdate: true })
|