-
-
Notifications
You must be signed in to change notification settings - Fork 500
Expand file tree
/
Copy pathschema-types.ts
More file actions
102 lines (92 loc) · 1.86 KB
/
schema-types.ts
File metadata and controls
102 lines (92 loc) · 1.86 KB
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
export class SourceGroup {
isMultiple: boolean
sids: number[]
name?: string
expanded?: boolean
index?: number // available only from menu or groups tab container
constructor(sids: number[], name: string = null) {
name = (name && name.trim()) || "Source group"
if (sids.length == 1) {
this.isMultiple = false
} else {
this.isMultiple = true
this.name = name
this.expanded = true
}
this.sids = sids
}
}
export const enum ViewType {
Cards,
List,
Magazine,
Compact,
Customized,
}
export const enum ViewConfigs {
ShowCover = 1 << 0,
ShowSnippet = 1 << 1,
FadeRead = 1 << 2,
}
export const enum ThemeSettings {
Default = "system",
Light = "light",
Dark = "dark",
}
export const enum SearchEngines {
Google,
Bing,
Baidu,
DuckDuckGo,
}
export const enum ImageCallbackTypes {
OpenExternal,
OpenExternalBg,
SaveAs,
Copy,
CopyLink,
}
export const enum SyncService {
None,
Fever,
Feedbin,
GReader,
Inoreader,
Miniflux,
Nextcloud,
}
export interface ServiceConfigs {
type: SyncService
importGroups?: boolean
}
export const enum WindowStateListenerType {
Maximized,
Focused,
Fullscreen,
}
export interface TouchBarTexts {
menu: string
search: string
refresh: string
markAll: string
notifications: string
}
export type SchemaTypes = {
version: string
theme: ThemeSettings
pac: string
pacOn: boolean
view: ViewType
locale: string
sourceGroups: SourceGroup[]
fontSize: number
fontFamily: string
menuOn: boolean
fetchInterval: number
searchEngine: SearchEngines
serviceConfigs: ServiceConfigs
filterType: number
listViewConfigs: ViewConfigs
useNeDB: boolean
refreshOnStart: boolean
}