This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import path from "node:path";
|
||||
import { app } from "electron";
|
||||
import { AddLinksPayload, AppSettings, ParsedPackageInput, UiSnapshot } from "../shared/types";
|
||||
import { AddLinksPayload, AppSettings, ParsedPackageInput, UiSnapshot, UpdateCheckResult } from "../shared/types";
|
||||
import { importDlcContainers } from "./container";
|
||||
import { APP_VERSION, defaultSettings } from "./constants";
|
||||
import { DownloadManager } from "./download-manager";
|
||||
import { parseCollectorInput } from "./link-parser";
|
||||
import { configureLogger, logger } from "./logger";
|
||||
import { createStoragePaths, emptySession, loadSession, loadSettings, saveSettings } from "./storage";
|
||||
import { checkGitHubUpdate } from "./update";
|
||||
|
||||
export class AppController {
|
||||
private settings: AppSettings;
|
||||
@@ -64,6 +65,10 @@ export class AppController {
|
||||
return this.settings;
|
||||
}
|
||||
|
||||
public async checkUpdates(): Promise<UpdateCheckResult> {
|
||||
return checkGitHubUpdate(this.settings.updateRepo);
|
||||
}
|
||||
|
||||
public addLinks(payload: AddLinksPayload): { addedPackages: number; addedLinks: number; invalidCount: number } {
|
||||
const parsed = parseCollectorInput(payload.rawText, payload.packageName || this.settings.packageName);
|
||||
if (parsed.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user