added the option for restarting stalled downloads
This commit is contained in:
@@ -47,7 +47,7 @@ const helper = {
|
||||
|
||||
return magnetURI.test(url.trim());
|
||||
},
|
||||
message: function (message,duration = 5000) {
|
||||
message: function (message,duration = 3000) {
|
||||
Toastify({
|
||||
text: message,
|
||||
duration:duration,
|
||||
|
||||
@@ -72,7 +72,6 @@ const inputHandler = (event) => {
|
||||
|
||||
let inputData = helper.getData('form-input-wrapper');
|
||||
let inputValue = inputData.form_input_text;
|
||||
|
||||
if (inputData.type !== 'search' && !helper.isURL(inputValue) && !helper.isMagnetURI(inputValue)) {
|
||||
helper.message(t("ncdownloader", "Invalid url"));
|
||||
return;
|
||||
|
||||
@@ -92,7 +92,8 @@ class ncTable {
|
||||
if (!value.name) {
|
||||
return;
|
||||
}
|
||||
container.appendChild(this.createActionButton(value.name, value.path));
|
||||
let data = value.data || '';
|
||||
container.appendChild(this.createActionButton(value.name, value.path,data));
|
||||
})
|
||||
rowItem.appendChild(container);
|
||||
row.appendChild(rowItem);
|
||||
@@ -126,10 +127,11 @@ class ncTable {
|
||||
|
||||
}
|
||||
|
||||
createActionButton(name, path) {
|
||||
createActionButton(name, path, data) {
|
||||
let button = document.createElement("button");
|
||||
button.classList.add("icon-" + name);
|
||||
button.setAttribute("path", path);
|
||||
button.setAttribute("data", data);
|
||||
return button;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user