-
Notifications
You must be signed in to change notification settings - Fork 4
/
store.ts
52 lines (45 loc) · 1.32 KB
/
store.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { ENewtabMode, ESearchEngine, IAsideSettingConfig, IReadItLaterItem, ISettingConfig } from "~types";
import { atom } from "jotai";
export const DEFAULT_SETTING = {
mode: ENewtabMode.wallpaper,
showBookmark: false,
showWallpaperMarket: false,
showSearchBar: false,
hadInit: false,
searchEngine: ESearchEngine.google,
showBrowserTreeNav: false,
showReadItLater: false,
showClock: false,
dailyWallpaper: false,
// 是否开启隐藏功能
enableHiddenFeature: false,
showHiddenFeatureSearch: false,
showJable: false,
showMissAV: false,
showAcg: false,
showNaiflix: false
} as ISettingConfig
export const settingConfigStore = atom(DEFAULT_SETTING)
export const currentWallpaperStore = atom("")
export const ReadItLaterStore = atom([] as IReadItLaterItem[])
export const syncBookmarksStore = atom(
[] as chrome.bookmarks.BookmarkTreeNode[]
)
export const showAsideSettingStore = atom(false)
export const DEFAULT_ASIDE_SETTING = {
bookmark: {
iconSize: 24
},
searchBar: {
iconSize: 24
},
shortcut: {
showWallpaperMarket: "Alt+.",
showBookmark: "Alt+,",
selectPrevWallpaper: "Alt+[",
selectNextWallpaper: "Alt+]",
showSearchComponent: "Alt+/",
showTabTree: "Ctrl+Alt+N"
}
} as IAsideSettingConfig
export const asideSettingConfigStore = atom(DEFAULT_ASIDE_SETTING)