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