parent
1370723e6d
commit
c5309a8923
@ -9,6 +9,8 @@ import { BaseDownload } from "./basedownload";
|
||||
import { Manager } from "./man";
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { Port } from "../bus";
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { BaseItem } from "../item";
|
||||
|
||||
type SID = {sid: number};
|
||||
type SIDS = {
|
||||
@ -42,6 +44,9 @@ export class ManagerPort {
|
||||
port.on("prefs", () => {
|
||||
openPrefs();
|
||||
});
|
||||
port.on("import", ({items}: {items: BaseItem[]}) => {
|
||||
API.regular(items, []);
|
||||
});
|
||||
port.on("all", () => this.sendAll());
|
||||
port.on("removeSids", this.onMsgRemoveSids);
|
||||
port.on("showSingle", async () => {
|
||||
|
@ -41,7 +41,6 @@ import { IconCache } from "../../lib/iconcache";
|
||||
import * as imex from "../../lib/imex";
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { BaseItem } from "../../lib/item";
|
||||
import { API } from "../../lib/api";
|
||||
|
||||
const TREE_CONFIG_VERSION = 2;
|
||||
const RUNNING_TIMEOUT = 1000;
|
||||
@ -1204,7 +1203,7 @@ export class DownloadTable extends VirtualTable {
|
||||
if (!items || !items.length) {
|
||||
return;
|
||||
}
|
||||
API.regular(items, []);
|
||||
PORT.post("import", {items});
|
||||
};
|
||||
reader.readAsText(picker.files[0], "utf-8");
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user