vueless 0.0.677 → 0.0.678
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 +1 -1
- package/utils/theme.ts +4 -4
package/package.json
CHANGED
package/utils/theme.ts
CHANGED
|
@@ -100,11 +100,11 @@ export function setColorMode(colorMode: `${ColorMode}`) {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export function getSelectedBrandColor() {
|
|
103
|
-
return localStorage.getItem("brand") || undefined;
|
|
103
|
+
return (isCSR && localStorage.getItem("brand")) || undefined;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
export function getSelectedGrayColor() {
|
|
107
|
-
return localStorage.getItem("gray") || undefined;
|
|
107
|
+
return (isCSR && localStorage.getItem("gray")) || undefined;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
export function setTheme(config: Config = {}) {
|
|
@@ -138,8 +138,8 @@ export function setTheme(config: Config = {}) {
|
|
|
138
138
|
const defaultGrayShade = isDarkMode ? 400 : 600;
|
|
139
139
|
const defaultRingOffsetColor = isDarkMode ? ringOffsetColorDark : ringOffsetColorLight;
|
|
140
140
|
|
|
141
|
-
localStorage.setItem("brand", brand);
|
|
142
|
-
localStorage.setItem("gray", gray);
|
|
141
|
+
isCSR && localStorage.setItem("brand", brand);
|
|
142
|
+
isCSR && localStorage.setItem("gray", gray);
|
|
143
143
|
|
|
144
144
|
if (gray === COOL_COLOR) {
|
|
145
145
|
gray = GRAY_COLOR;
|