diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index da010a7e..66bccf46 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -1177,7 +1177,7 @@ html.y #widget.open { font-size: .4em; margin: -.3em .1em; } -#wtoggle.sel #wzip #selzip { +#wtoggle.sel .l1 { top: -.6em; padding: .4em .3em; } diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index e0d9d646..655d881f 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -37,6 +37,7 @@ var Ls = { ["ctrl-K", "delete selected"], ["ctrl-X", "cut selected"], ["ctrl-V", "paste into folder"], + ["Y", "download selected"], ["F2", "rename selected"], "file-list-sel", @@ -121,6 +122,7 @@ var Ls = { "wt_selall": "select all files$NHotkey: ctrl-A (when file focused)", "wt_selinv": "invert selection", "wt_selzip": "download selection as archive", + "wt_seldl": "download selection as separate files$NHotkey: Y", "wt_npirc": "copy irc-formatted track info", "wt_nptxt": "copy plaintext track info", "wt_grid": "toggle grid / list view$NHotkey: G", @@ -469,6 +471,7 @@ var Ls = { ["ctrl-K", "slett valgte"], ["ctrl-X", "klipp ut"], ["ctrl-V", "lim inn"], + ["Y", "last ned valgte"], ["F2", "endre navn på valgte"], "filmarkering", @@ -553,6 +556,7 @@ var Ls = { "wt_selall": "velg alle filer$NSnarvei: ctrl-A (mens fokus er på en fil)", "wt_selinv": "inverter utvalg", "wt_selzip": "last ned de valgte filene som et arkiv", + "wt_seldl": "last ned de valgte filene$NSnarvei: Y", "wt_npirc": "kopier sang-info (irc-formattert)", "wt_nptxt": "kopier sang-info", "wt_grid": "bytt mellom ikoner og listevisning$NSnarvei: G", @@ -903,7 +907,8 @@ ebi('widget').innerHTML = ( 'sel.
allsel.
inv.zip' + + ' href="#" id="selzip" class="l1" tt="' + L.wt_selzip + '">zipdl' + '
📋irc📋txt' + @@ -4440,7 +4445,7 @@ document.onkeydown = function (e) { return seek_au_rel(n) || true; if (k == 'KeyY') - return dl_song(); + return msel.getsel().length ? ebi('seldl').click() : dl_song(); n = k == 'KeyI' ? -1 : k == 'KeyK' ? 1 : 0; if (n !== 0) @@ -6302,6 +6307,12 @@ var msel = (function () { console.log(txt); frm.submit(); }; + ebi('seldl').onclick = function (e) { + ev(e); + var sel = r.getsel(); + for (var a = 0; a < sel.length; a++) + dl_file(sel[a].vp); + }; r.render = function () { var tds = QSA('#files tbody td+td+td'), is_srch = !!ebi('unsearch');