mirror of
https://github.com/9001/copyparty.git
synced 2026-06-19 04:32:26 -06:00
fix drop visuals and make drop search work again
This commit is contained in:
parent
e413ba7ac6
commit
35c8657e37
|
|
@ -2471,7 +2471,7 @@ html.y #bbox-overlay figcaption a {
|
|||
display: table;
|
||||
left: 10%;
|
||||
width: 78%;
|
||||
height: 26%;
|
||||
height: 78%;
|
||||
margin: 0;
|
||||
font-size: 3em;
|
||||
font-weight: bold;
|
||||
|
|
@ -2490,7 +2490,7 @@ html.y #bbox-overlay figcaption a {
|
|||
background: rgba(24, 24, 24, 0.7);
|
||||
left: 8%;
|
||||
width: 82%;
|
||||
height: 32%;
|
||||
height: 82%;
|
||||
margin: -3vh 0;
|
||||
}
|
||||
.dropdesc.hl.err {
|
||||
|
|
@ -2535,18 +2535,21 @@ html.y #bbox-overlay figcaption a {
|
|||
height: 100%;
|
||||
}
|
||||
#up_dz {
|
||||
bottom: 12%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
#srch_dz {
|
||||
display: none;
|
||||
top: 50%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
#up_zd {
|
||||
position: absolute;
|
||||
top: 12%;
|
||||
bottom: 12%;
|
||||
}
|
||||
#srch_zd {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 12%;
|
||||
bottom: 12%;
|
||||
}
|
||||
.dropdesc span {
|
||||
|
|
|
|||
|
|
@ -1054,6 +1054,20 @@ function up2k_init(subtle) {
|
|||
function onoverbtn(e) {
|
||||
return onovercmn(this, e, true);
|
||||
}
|
||||
function checkDropMode(){
|
||||
if(ebi('fsearch')?.checked){
|
||||
ebi('srch_zd').style.display = '';
|
||||
ebi('up_zd').style.display = 'none';
|
||||
ebi('srch_dz').style.display = '';
|
||||
ebi('up_dz').style.display = 'none';
|
||||
}
|
||||
else{
|
||||
ebi('srch_zd').style.display = 'none';
|
||||
ebi('up_zd').style.display = '';
|
||||
ebi('srch_dz').style.display = 'none';
|
||||
ebi('up_dz').style.display = '';
|
||||
}
|
||||
}
|
||||
function onovercmn(self, e, btn) {
|
||||
try {
|
||||
var ok = false, dt = e.dataTransfer.types;
|
||||
|
|
@ -1087,6 +1101,7 @@ function up2k_init(subtle) {
|
|||
if (btn)
|
||||
return;
|
||||
|
||||
checkDropMode();
|
||||
clmod(ebi('drops'), 'vis', 1);
|
||||
var v = self.getAttribute('v');
|
||||
if (v)
|
||||
|
|
@ -1100,6 +1115,7 @@ function up2k_init(subtle) {
|
|||
clmod(ebi(v), 'hl');
|
||||
|
||||
if (--nenters <= 0) {
|
||||
checkDropMode();
|
||||
clmod(ebi('drops'), 'vis');
|
||||
clmod(ebi('up_dz'), 'hl');
|
||||
clmod(ebi('srch_dz'), 'hl');
|
||||
|
|
@ -1158,10 +1174,10 @@ function up2k_init(subtle) {
|
|||
ev(e);
|
||||
nenters = 0;
|
||||
offdrag.call(this);
|
||||
var dz = this && this.getAttribute('id');
|
||||
if (!dz && e && e.clientY)
|
||||
// cuo2duo fallback
|
||||
dz = e.clientY < window.innerHeight / 2 ? 'up_dz' : 'srch_dz';
|
||||
// var dz = this && this.getAttribute('id');
|
||||
// if (!dz && e && e.clientY)
|
||||
// // cuo2duo fallback
|
||||
// dz = e.clientY < window.innerHeight / 2 ? 'up_dz' : 'srch_dz';
|
||||
|
||||
var err = this.getAttribute('err');
|
||||
if (err)
|
||||
|
|
@ -1169,10 +1185,11 @@ function up2k_init(subtle) {
|
|||
|
||||
toast.inf(0, L.u_scan);
|
||||
|
||||
if ((dz == 'up_dz' && uc.fsearch) || (dz == 'srch_dz' && !uc.fsearch))
|
||||
tgl_fsearch();
|
||||
// if ((dz == 'up_dz' && uc.fsearch) || (dz == 'srch_dz' && !uc.fsearch))
|
||||
// tgl_fsearch();
|
||||
|
||||
if (!QS('#op_up2k.act'))
|
||||
//if (!QS('#op_up2k.act'))
|
||||
if(!uc.fsearch)
|
||||
goto('up2k');
|
||||
|
||||
var files,
|
||||
|
|
|
|||
Loading…
Reference in a new issue