diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index fe507726..7876e178 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -746,7 +746,7 @@ modal.load(); // toolbar ebi('ops').innerHTML = ( - '--' + + //'--' + '🔎' + (have_del ? '🧯' : '') + '🚀' + @@ -768,7 +768,7 @@ ebi('widget').innerHTML = ( '📨sharenamedel.🗑️del.cutcopy📋paste' + @@ -786,7 +786,6 @@ ebi('widget').innerHTML = ( ' href="#" id="m3ua" tt="' + L.wt_m3ua + '">📻add📻copy' + '♫' + '' + '
' + @@ -1014,7 +1013,6 @@ ebi('op_cfg').innerHTML = ( // navpane ebi('tree').innerHTML = ( '
\n' + - ' 🍞...\n' + ' +\n' + ' \n' + ' 🎯\n' + @@ -1029,8 +1027,8 @@ ebi('tree').innerHTML = ( '
    \n' + '
     
    ' ); +ebi('thx_ff').before(ebi('acc_button')); clmod(ebi('tree'), 'sbar', 1); -ebi('entree').setAttribute('tt', L.tt_entree); ebi('goh').textContent = L.goh; QS('#op_mkdir input[type="submit"]').value = L.ab_mkdir; QS('#op_new_md input[type="submit"]').value = L.ab_mkdoc; @@ -1074,6 +1072,7 @@ ebi('rcm').innerHTML = ( if (v) ops[a].href = '#v=' + v; } + ebi('acc_settings').onclick = opclick; })(); @@ -3568,7 +3567,7 @@ function eval_hash() { d.setAttribute('href', '#'); d.setAttribute('class', 'ayjump'); d.innerHTML = a ? L.ay_path : L.ay_files; - document.body.insertBefore(d, ebi('ops')); + document.body.insertBefore(d, ebi('topBar')); d.onclick = function (e) { ev(e); if (a) @@ -3580,10 +3579,6 @@ function eval_hash() { }; })(a); - // account-info label - var d = mknod('div', 'acc_info'); - document.body.insertBefore(d, ebi('ops')); - // folder nav ebi('wfp').appendChild(mknod('span', null, '⬅️➡️⬆️')); @@ -5465,8 +5460,9 @@ var thegrid = (function () { gfiles.style.display = 'none'; gfiles.innerHTML = ( '
    ' + - '' + ' // rtt: ' : 'rtt: ') + rtt; @@ -7819,9 +7849,10 @@ var treectl = (function () { swrite('treesz', treesz); onresize(); } - - ebi('entree').onclick = r.entree; - ebi('detree').onclick = r.detree; + + ebi('treeToggleBtn').tt = L.tt_entree; + + ebi('treeToggleBtn').onclick = r.toggleTree; ebi('visdir').onclick = tree_scrollto; ebi('twig').onclick = scaletree; ebi('twobytwo').onclick = scaletree; @@ -7953,10 +7984,22 @@ function apply_perms(res) { if (idp_login && acct == "*") dst = idp_login.replace(/\{dst\}/g, get_evpath()); - ebi('acc_info').innerHTML = '' + srvinf + - '' + (acct != '*' ? - '
    ' : - '
    ' + L.login + ''); + function goHome(){ + window.location.href = dst; + } + + if(acct != '*'){ + ebi('acc_name').innerHTML = acct; + ebi('acessType').innerHTML = ''; + ebi('blogout').value = L.logout; + ebi('acc_button').onclick = function(){ + ebi('acc_popup').classList.toggle('show'); + } + } + else{ + ebi('acc_name').innerHTML = L.login; + ebi('acc_button').onclick = goHome; + } var o = QSA('#ops>a[data-perm]'); for (var a = 0; a < o.length; a++) { @@ -9852,8 +9895,9 @@ function reload_browser() { o = mknod('a'); o.setAttribute('href', link2); - o.textContent = uricom_dec(parts[a]) || '/'; - ebi('path').appendChild(mknod('i')); + o.textContent = uricom_dec(parts[a]) || '🏠'; + if(a > 0) + ebi('path').appendChild(mknod('i')); ebi('path').appendChild(o); }