mirror of
https://github.com/yang991178/fluent-reader.git
synced 2025-01-22 13:10:56 +01:00
52 lines
1.1 KiB
TypeScript
52 lines
1.1 KiB
TypeScript
export class SourceGroup {
|
|
isMultiple: boolean
|
|
sids: number[]
|
|
name?: string
|
|
expanded?: boolean
|
|
index?: number // available only from groups tab container
|
|
|
|
constructor(sids: number[], name: string = null) {
|
|
name = (name && name.trim()) || "订阅源组"
|
|
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 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 type SchemaTypes = {
|
|
version: string
|
|
theme: ThemeSettings
|
|
pac: string
|
|
pacOn: boolean
|
|
view: ViewType
|
|
locale: string
|
|
sourceGroups: SourceGroup[]
|
|
fontSize: number
|
|
menuOn: boolean
|
|
fetchInterval: number
|
|
searchEngine: SearchEngines
|
|
}
|