Add dark mode support (#16)
This commit is contained in:
1 parent
ddef4cec2a
commit
b8970e1373
46 files changed
+247
-166
No files matched your search
@@ -1,10 +1,14 @@
|
||||
import { IRootState } from './models';
|
||||
import chatState from '../chat/state';
|
||||
import midjourneyState from '../midjourney/state';
|
||||
import chatdocState from '../chatdoc/state';
|
||||
import { getLocale } from '@/i18n';
|
||||
|
||||
export default (): IRootState => {
|
||||
return {
|
||||
user: {},
|
||||
locale: getLocale(),
|
||||
dark: window.matchMedia('(prefers-color-scheme: dark)').matches,
|
||||
token: {
|
||||
access: undefined,
|
||||
refresh: undefined,
|
||||
@@ -14,6 +18,7 @@ export default (): IRootState => {
|
||||
// if PC, set default to true, else false
|
||||
navigationCollapsed: window.innerWidth < 768
|
||||
},
|
||||
chatdoc: chatdocState(),
|
||||
chat: chatState(),
|
||||
midjourney: midjourneyState()
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user