Skip to content

Commit db70668

Browse files
committed
feat(core): add incremental sharing service with settings integration
- Import IncrementalShareService and SettingService modules - Initialize SettingService in the plugin constructor - Create IncrementalShareService instance using ShareService and SettingService - Enhance main plugin setup to support incremental sharing functionality
1 parent 41a5881 commit db70668

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ import { ShareProConfig } from "./models/ShareProConfig"
2525
import { initStatusBar } from "./statusBar"
2626
import ShareSetting from "./libs/pages/ShareSetting.svelte"
2727
import { ShareService } from "./service/ShareService"
28+
import { IncrementalShareService } from "./service/IncrementalShareService"
29+
import { SettingService } from "./service/SettingService"
2830
import pkg from "../package.json"
2931

3032
export default class ShareProPlugin extends Plugin {
@@ -33,6 +35,8 @@ export default class ShareProPlugin extends Plugin {
3335
public statusBarElement: any
3436
private main: Main
3537
private shareService: ShareService
38+
public incrementalShareService: IncrementalShareService
39+
private settingService: SettingService
3640

3741
constructor(options: { app: App; id: string; name: string; i18n: IObject }) {
3842
super(options)
@@ -42,6 +46,9 @@ export default class ShareProPlugin extends Plugin {
4246
this.isMobile = frontEnd === "mobile" || frontEnd === "browser-mobile"
4347
this.main = new Main(this)
4448
this.shareService = new ShareService(this)
49+
// 初始化增量分享服务
50+
this.settingService = new SettingService(this)
51+
this.incrementalShareService = new IncrementalShareService(this, this.shareService, this.settingService)
4552
}
4653

4754
async onload() {

0 commit comments

Comments
 (0)