-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e02b13
commit 6083a3f
Showing
8 changed files
with
3,239 additions
and
5,518 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
export interface SourceData { | ||
bookSourceComment: string | ||
bookSourceGroup: string | ||
bookSourceName: string | ||
bookSourceType: number | ||
bookSourceUrl: string | ||
concurrentRate: string | ||
customOrder: number | ||
enabled: boolean | ||
enabledCookieJar: boolean | ||
enabledExplore: boolean | ||
exploreUrl: string | ||
lastUpdateTime: number | ||
loginCheckJs: string | ||
loginUrl: string | ||
respondTime: number | ||
ruleBookInfo: RuleBookInfo | ||
ruleContent: RuleContent | ||
ruleExplore: RuleExplore | ||
ruleSearch: RuleSearch | ||
ruleToc: RuleToc | ||
searchUrl: string | ||
weight: number | ||
} | ||
|
||
export interface RuleBookInfo { | ||
author: string | ||
coverUrl: string | ||
intro: string | ||
kind: string | ||
lastChapter: string | ||
name: string | ||
tocUrl: string | ||
wordCount: string | ||
} | ||
|
||
export interface RuleContent { | ||
content: string | ||
} | ||
|
||
export interface RuleExplore { | ||
author: string | ||
bookList: string | ||
bookUrl: string | ||
coverUrl: string | ||
intro: string | ||
kind: string | ||
name: string | ||
wordCount: string | ||
} | ||
|
||
export interface RuleSearch extends RuleExplore { | ||
checkKeyWord: string | ||
} | ||
|
||
export interface RuleToc { | ||
chapterList: string | ||
chapterName: string | ||
chapterUrl: string | ||
isVolume: string | ||
} | ||
|
||
export class Source { | ||
raw: SourceData | ||
constructor(public data: SourceData) { | ||
this.raw = data | ||
} | ||
|
||
get bookSourceUrl() { | ||
return this.raw.bookSourceUrl | ||
} | ||
|
||
get bookSourceName() { | ||
return this.raw.bookSourceName | ||
} | ||
|
||
get enabled() { | ||
return this.raw.enabled | ||
} | ||
|
||
set enabled(value: boolean) { | ||
this.raw.enabled = value | ||
} | ||
|
||
get enabledExplore() { | ||
return this.raw.enabledExplore | ||
} | ||
|
||
set enabledExplore(value: boolean) { | ||
this.raw.enabledExplore = value | ||
} | ||
|
||
get hasExplore() { | ||
return this.raw.ruleExplore !== undefined | ||
} | ||
|
||
get hasLogin() { | ||
return this.raw.loginUrl !== undefined | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import router from "@system.router" | ||
import storage from "@system.storage" | ||
import prompt from "@system.prompt" | ||
import fetch from "@system.fetch" | ||
import device from "@system.device" | ||
|
||
export {fetch, storage, device, router, prompt} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"esModuleInterop": true, | ||
"module": "commonjs", | ||
"target": "es5", | ||
"outDir": "./dist" | ||
}, | ||
"include": [ | ||
"src/**/*" | ||
], | ||
"exclude": [ | ||
"src/**/*.ux" | ||
] | ||
} |