Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions copyparty/web/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -3231,14 +3231,40 @@ html.d #treepar {



@media (max-width: 28em) {
#u2conf {
font-size: .8em;
}
}
@media (max-width: 32em) {
#u2conf {
font-size: .9em;
}
}
@media (max-width: 28em) {
#u2conf {
font-size: .8em;
@media (max-width: 35em) {
#wrap {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
overscroll-behavior-y: contain;
-webkit-overflow-scrolling: touch;
}
#wtoggle {
left: 0;
right: 0;
height: auto;
min-height: 1em;
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
touch-action: pan-x;
scrollbar-gutter: stable;
border-radius: 0;
padding-left: 0;
padding-bottom: .35em;
}
#wtoggle>* {
flex: 0 0 auto;
}
}
@media (min-width: 70em) {
Expand Down
22 changes: 11 additions & 11 deletions copyparty/web/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1768,7 +1768,7 @@ function MPlayer() {
continue;

tid = tid.slice(1);
if (r.tracks[tid])
if (r.tracks[tid])
order.push(tid);
}
r.order = order;
Expand Down Expand Up @@ -6854,7 +6854,7 @@ function aligngriditems() {
if (((griditemcount * em2px) * gridsz) + totalgapwidth < gridwidth) {
val = 'left';
} else {
val = treectl.hidden ? 'center' : 'space-between';
val = treectl.hidden ? 'center' : 'space-evenly';
}
if (st.justifyContent != val)
st.justifyContent = val;
Expand Down Expand Up @@ -9938,19 +9938,19 @@ function reload_browser() {
var selbox = null;
var ttimer = null;

var lpdelay = 250;
var lpdelay = 250;
var mvthresh = 44;

function unbox() {
qsr('.selbox');
ebi('gfiles').style.removeProperty('pointer-events')
ebi('wrap').style.removeProperty('user-select')

if (selbox) {
console.log(selbox)
window.getSelection().removeAllRanges();
}

is_selma = false;
dragging = false;
fwrap = null;
Expand Down Expand Up @@ -9993,15 +9993,15 @@ function reload_browser() {
starty = pos.y;
is_selma = true;
ttimer = null;

if (e.type === 'touchstart') {
ttimer = setTimeout(function() {
ttimer = null;
start_drag();
}, lpdelay);
}
}

function start_drag() {
if (dragging) return;

Expand All @@ -10012,7 +10012,7 @@ function reload_browser() {

ebi('gfiles').style.pointerEvents = 'none';
}

function sel_move(e) {
if (!is_selma) return;
var pos = getpp(e);
Expand All @@ -10027,7 +10027,7 @@ function reload_browser() {
return;
}
if (!dragging && dist > mvthresh && !window.getSelection().toString()) {
if (fwrap = e.target.closest('#wrap'))
if (fwrap = e.target.closest('#wrap'))
fwrap.style.userSelect = 'none';
else return;
start_drag();
Expand Down Expand Up @@ -10075,7 +10075,7 @@ function reload_browser() {
}
});
}

dsel_init();
})();

Expand Down Expand Up @@ -10118,7 +10118,7 @@ var mpss = (function() {

var gain = afilt.ssg.gain;
var duration = ae.duration || 0;

var slimit = duration * (config.sthresh / 100);
var elimit = duration * (1 - (config.etresh / 100));
var in_limits = ae.currentTime < slimit || ae.currentTime > elimit;
Expand Down