fix(theme): сохранять текущий выбор без storage (#13)
This commit is contained in:
1 parent
9c06977e03
commit
c6b2b227c0
1 file changed
+1
-1
@@ -38,7 +38,7 @@ $themeSurface = isset($themeSurface) && in_array($themeSurface, ['public', 'priv
|
|||||||
const hex = Array.from(bytes, byte => byte.toString(16).padStart(2, '0')).join('');
|
const hex = Array.from(bytes, byte => byte.toString(16).padStart(2, '0')).join('');
|
||||||
return hex.slice(0, 8) + '-' + hex.slice(8, 12) + '-' + hex.slice(12, 16) + '-' + hex.slice(16, 20) + '-' + hex.slice(20);
|
return hex.slice(0, 8) + '-' + hex.slice(8, 12) + '-' + hex.slice(12, 16) + '-' + hex.slice(16, 20) + '-' + hex.slice(20);
|
||||||
}
|
}
|
||||||
function refresh() { const value = read(); apply(value ? themeOf(value) : initial); }
|
function refresh() { const value = read(); apply(value ? themeOf(value) : shown); }
|
||||||
function choose(theme) {
|
function choose(theme) {
|
||||||
if (theme !== 'light' && theme !== 'dark') return;
|
if (theme !== 'light' && theme !== 'dark') return;
|
||||||
const from = shown;
|
const from = shown;
|
||||||
|
|||||||
Reference in new issue
Block a user