-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtypes.ts
166 lines (148 loc) · 3.61 KB
/
types.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
export interface ISettingConfig {
mode: ENewtabMode
showWallpaperMarket: boolean
showBookmark: boolean
showSearchBar: boolean
searchEngine: ESearchEngine
showBrowserTreeNav: boolean
showReadItLater: boolean
showClock: boolean
dailyWallpaper: boolean
enableHiddenFeature: boolean
showJable: boolean
showMissAV: boolean
showAcg: boolean
showNaiflix: boolean
showHiddenFeatureSearch: boolean
}
export interface IBase64ListItem {
base64: string
url: string
timestamp: number
}
export interface IWeekImage {
startdate: string
fullstartdate: string
enddate: string
urlbase: string
copyright: string
like?: boolean
}
export interface IThisWeekData {
images: IWeekImage[]
}
export const DEFAULT_BING_WALLPAPER_DOMAIN = "https://cn.bing.com"
export const DEFAULT_BING_WEEK_URL =
"https://cn.bing.com/HPImageArchive.aspx?format=js&n=6&uhd=1"
export const DEFAULT_WALLPAPER_URL =
"/th?id=OHR.VillandryGarden_EN-CN7756956366"
export enum EStorageKey {
currentWallpaper = "currentWallpaper",
settingConfig = "settingConfig",
imageList = "imageList",
responseCache = "responseCache",
likeList = "likeList",
tabsTree = "tabsTree",
activatedTabs = "activatedTabs",
iconCache = "iconCache",
noteList = "noteList",
bookmarks = "bookmarks",
readItLaterList = "readItLaterList",
asideSettingConfig = "asideSettingConfig",
dateRecord = "dateRecord"
}
export enum ESearchEngine {
"google" = "google",
"bing" = "bing",
"baidu" = "baidu",
"youtube" = "youtube",
"github" = "github"
}
export enum ENavTreeMode {
newtab = "newtab",
content = "content",
popup = "popup"
}
export enum ENewtabMode {
wallpaper = "wallpaper",
note = "note"
}
export interface INote {
title: string
content: string
id: string
color: string
bgColor: string
// set position
left?: string
top?: string
}
export interface IReadItLaterItem {
id: string
title: string
url: string
favIconUrl?: string
level?: string
}
export enum EBgMessageName {
copyMdContentToClipboard = "copyMdContentToClipboard",
downloadImgWithFormat = "downloadImgWithFormat",
applyPicInPicMode = "applyPicInPicMode",
viewImgInContent = "viewImgInContent"
}
export enum EMenuItemId {
"copyAsMdLink" = "copyAsMdLink",
"addCurrentPageToReadItLater" = "addCurrentPageToReadItLater",
"img" = "img",
"pictureInPicture" = "pictureInPicture"
}
export enum EZIndexRecord {
readItLater = 100,
searchBar,
bookmarks,
wallpaperMarket,
fullscreenLayout,
loadingIcon
}
export enum EReadItLaterLevel {
important = "🎯 重要",
urgent = "🚗 紧急",
later = "🍵 稍后"
}
export enum EContentMenuImgAction {
"view" = "🔍 查看",
"copyImgAsMarkdown" = "🚀 复制为 markdown 图片",
"downloadCurrentImg" = "⏬ 立即下载",
"downloadFormat" = "🔃 格式转化下载",
"downloadAsJPEG" = "JPEG",
"downloadAsJPG" = "JPG",
"downloadAsPNG" = "PNG",
"copyLinkAsMarkdown" = "复制为 markdown 链接"
}
// aside setting config interface
export interface IAsideSettingConfig {
// basicFontSize: number
// userInfo: {},
bookmark: {
iconSize: number
}
searchBar: {
iconSize: number
}
// 快捷键
shortcut: {
showWallpaperMarket: string
showBookmark: string
selectPrevWallpaper: string
selectNextWallpaper: string
showSearchComponent: string
showTabTree: string
fullScreen: string
}
}
export enum EAdultFeatureUrl {
jableTV = "https://jable.tv/search/__KEYWORD__",
missAV = "https://www.missav.com/search/__KEYWORD__",
Naiflix = "https://www.naiflix.com/search/?wd=__KEYWORD__",
Acg = "https://www.acg.rw/search/__KEYWORD__/"
}