mirror of
https://github.com/9001/copyparty.git
synced 2026-06-19 04:32:26 -06:00
Update browser.js
Signed-off-by: ed <s@ocv.me>
This commit is contained in:
parent
514b246478
commit
35c7873d8b
|
|
@ -4145,6 +4145,8 @@ var fileman = (function () {
|
|||
if (this.textContent == 'write-only')
|
||||
for (var a = 0; a < pbtns.length; a++)
|
||||
clmod(pbtns[a], 'on', pbtns[a].textContent == 'write');
|
||||
if (this.textContent == 'get' && clgot(this, 'on') && has(perms, 'read'))
|
||||
clmod(pbtns[0], 'on');
|
||||
}
|
||||
clmod(pbtns[0], 'on', 1);
|
||||
|
||||
|
|
@ -8032,22 +8034,18 @@ function apply_perms(res) {
|
|||
|
||||
a.style.display = '';
|
||||
tt.att(QS('#ops'));
|
||||
// read implies get, no need to show it
|
||||
var displayed_perms = perms.slice(0);
|
||||
var have_read = has(displayed_perms, 'read')
|
||||
if (have_read) {
|
||||
var get_index = displayed_perms.indexOf('get');
|
||||
if (get_index > -1) {
|
||||
displayed_perms.splice(get_index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
var v_perms = perms.slice(0);
|
||||
var have_read = has(perms, 'read');
|
||||
if (have_read)
|
||||
apop(v_perms, 'get');
|
||||
|
||||
for (var a = 0; a < chk.length; a++)
|
||||
if (has(displayed_perms, chk[a]))
|
||||
if (has(v_perms, chk[a]))
|
||||
axs.push(chk[a].slice(0, 1).toUpperCase() + chk[a].slice(1));
|
||||
|
||||
axs = axs.join('-');
|
||||
if (displayed_perms.length == 1) {
|
||||
if (v_perms.length == 1) {
|
||||
aclass = ' class="warn">';
|
||||
axs += '-Only';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue