moved settings button to bottom and made it collapsible;use nc's built-in filepicker to set download and torrents folders;fixed issues of youtube-dl filenames exceeding the maximum length
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
#ncdownloader-settings-collapsible-container {
|
||||
padding-left: 4%;
|
||||
}
|
||||
|
||||
.action-item {
|
||||
position: relative;
|
||||
}
|
||||
@@ -114,7 +118,7 @@ div .number {
|
||||
padding-top: 0.3em;
|
||||
}
|
||||
|
||||
.app-ncdownloader #app-content-wrapper {
|
||||
.app-ncdownloader #app-content-wrapper {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,10 +31,6 @@ window.addEventListener('DOMContentLoaded', function () {
|
||||
helper.aria2Toggle(data);
|
||||
}).send();
|
||||
})
|
||||
eventHandler.add("click", '#ncdownloader-user-settings button', function (e) {
|
||||
let link = helper.generateUrl(e.target.getAttribute('path'));
|
||||
window.location.href = link;
|
||||
})
|
||||
eventHandler.add("click", "#app-navigation", "#search-download", helper.showDownload);
|
||||
delegate('#ncdownloader-table-wrapper',
|
||||
{ target: '[data-tippy-content]' }
|
||||
|
||||
@@ -126,4 +126,20 @@ window.addEventListener('DOMContentLoaded', function () {
|
||||
}
|
||||
settingsForm.getInstance().setParent("custom-youtube-dl-settings-container").render(input);
|
||||
}).send();
|
||||
const filepicker = function (event) {
|
||||
let element = event.target;
|
||||
OC.dialogs.filepicker(
|
||||
t('ncdownloader', 'Select a directory'),
|
||||
function (path) {
|
||||
if (element.value !== path) {
|
||||
element.value = path;
|
||||
}
|
||||
},
|
||||
false,
|
||||
'httpd/unix-directory',
|
||||
true
|
||||
);
|
||||
}
|
||||
eventHandler.add('click', "#ncd_downloader_dir", filepicker);
|
||||
eventHandler.add('click', "#ncd_torrents_dir", filepicker);
|
||||
});
|
||||
Reference in New Issue
Block a user