mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
WebUI: Support creating new torrents
Implemented the torrent creator using WebAPI from #20366 in WebUI, the interface is mostly inspired by GUI and VueTorrent. Closes #5614. PR #22459.
This commit is contained in:
@@ -208,6 +208,32 @@ const initializeWindows = () => {
|
||||
updateMainData();
|
||||
};
|
||||
|
||||
addClickEvent("torrentCreator", (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
const id = "torrentCreatorPage";
|
||||
new MochaUI.Window({
|
||||
id: id,
|
||||
icon: "images/torrent-creator.svg",
|
||||
title: "QBT_TR(Torrent Creator)QBT_TR[CONTEXT=TorrentCreator]",
|
||||
loadMethod: "xhr",
|
||||
contentURL: "views/torrentcreator.html",
|
||||
scrollbars: true,
|
||||
maximizable: true,
|
||||
paddingVertical: 0,
|
||||
paddingHorizontal: 0,
|
||||
width: loadWindowWidth(id, 900),
|
||||
height: loadWindowHeight(id, 400),
|
||||
onResize: () => {
|
||||
saveWindowSize(id);
|
||||
},
|
||||
onClose: () => {
|
||||
window.qBittorrent.TorrentCreator.unload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
addClickEvent("preferences", (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
Reference in New Issue
Block a user