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