fix bug
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { setStore, getStore, removeStore } from 'utils/store';
|
||||
import website from '@/config/website';
|
||||
|
||||
const DEFAULT_PRIMARY_COLOR = '#409eff';
|
||||
const LEGACY_PRIMARY_COLORS = ['#2C77F1', '#5C9DF8'];
|
||||
const storedColorName = getStore({ name: 'colorName' });
|
||||
|
||||
const common = {
|
||||
state: {
|
||||
language: getStore({ name: 'language' }) || 'zh-cn',
|
||||
@@ -10,7 +14,10 @@ const common = {
|
||||
isSearch: false,
|
||||
isRefresh: true,
|
||||
isLock: getStore({ name: 'isLock' }),
|
||||
colorName: getStore({ name: 'colorName' }) || '#2C77F1',
|
||||
colorName:
|
||||
!storedColorName || LEGACY_PRIMARY_COLORS.includes(String(storedColorName).toUpperCase())
|
||||
? DEFAULT_PRIMARY_COLOR
|
||||
: storedColorName,
|
||||
themeName: getStore({ name: 'themeName' }) || 'theme-go',
|
||||
lockPasswd: getStore({ name: 'lockPasswd' }) || '',
|
||||
website: website,
|
||||
|
||||
Reference in New Issue
Block a user