From 1360641819371e376fea841484e1b9a094e019d5 Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Sun, 12 Apr 2026 00:08:35 +0200 Subject: [PATCH] up2k modal wip --- contrib/plugins/minimal-up2k.html | 2 +- contrib/plugins/minimal-up2k.js | 3 - copyparty/web/browser.css | 91 +++++++++++++------------------ copyparty/web/browser.html | 19 +++++-- copyparty/web/browser.js | 33 +++++++---- copyparty/web/up2k.js | 3 +- 6 files changed, 76 insertions(+), 75 deletions(-) diff --git a/contrib/plugins/minimal-up2k.html b/contrib/plugins/minimal-up2k.html index bc44cf7f..303cbe61 100644 --- a/contrib/plugins/minimal-up2k.html +++ b/contrib/plugins/minimal-up2k.html @@ -36,7 +36,7 @@ #u2conf #u2btn, #u2btn {padding:1.5em 0} /* adjust the button area a bit */ - #u2conf.w, #u2conf.ww {width: 35em !important; margin: 5em auto} + #u2conf.w {width: 35em !important; margin: 5em auto} /* a */ #op_up2k {min-height: 0} diff --git a/contrib/plugins/minimal-up2k.js b/contrib/plugins/minimal-up2k.js index b3514aea..6826c134 100644 --- a/contrib/plugins/minimal-up2k.js +++ b/contrib/plugins/minimal-up2k.js @@ -39,7 +39,6 @@ var u2min = ` display: none !important; } #u2conf {margin:5em auto 0 auto !important} -#u2conf.ww {width:70em} #u2conf.w {width:50em} #u2conf.w .c, #u2conf.w #u2btn_cw {text-align:left} @@ -51,8 +50,6 @@ var u2min = ` } #u2etaw.w #u2etas {margin-right:-37em} #u2etaw.w #u2etas.o {margin-top:-2.2em} -#u2etaw.ww {margin:-1em auto} -#u2etaw.ww #u2etas {padding-left:4em} #u2etas { background: none !important; border: none !important; diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 446eaba5..64adba52 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -1138,6 +1138,8 @@ html.dz #flogout { bottom: 0; z-index: 1; touch-action: none; + box-shadow: 0 0 .5em var(--mp-sh); + clip-path: inset(-10em 0 0 0); } #widget.anim { transition: margin-left 0; /* can't set this above 0 due to onwidgetresize */ @@ -1182,6 +1184,7 @@ html.y #widget.open { position: relative; font-size: .9em; top: -.04em; + margin-right: .3em; } #wtgrid, #wtgrid2 { font-size: .75em; @@ -2507,10 +2510,10 @@ html.y #bbox-overlay figcaption a { -/* settings css */ -#s_content{ +/* modals */ +.modalcontent{ display: grid; - grid-template-rows: auto auto; + grid-template-rows: max-content auto; margin: 5vh 5vw; border-radius: .5em; border: var(--a) solid 1px; @@ -2518,15 +2521,35 @@ html.y #bbox-overlay figcaption a { max-width: 66.6em; position: relative; } -#s_header{ - margin: 0; - padding: .5em; +.modalheader { + display: flex; + align-items: center; + margin: 0 2.5em 0 0; + padding: .7em; background: var(--ttlbar); font-size: large; font-weight: bold; color: var(--fg); } -#s_hor{ +.close{ + position: absolute; + right: 0; + margin: .5em; + color: var(--fg); +} +.closepane { + position: absolute; + inset: 0; +} + +/* up2k */ +#up_inner { + width: 100%; + overflow-y: auto; +} + +/* settings */ +#s_hor { display: grid; grid-template-columns: auto auto auto; min-height: 0; @@ -2572,17 +2595,6 @@ html.y #bbox-overlay figcaption a { padding: .5em; margin: 0 0 1.3em 0; } -#cs_btn{ - position: absolute; - right: 0; - margin: .5em; - color: var(--fg); -} -#s_outside { - position: absolute; - inset: 0; -} - @@ -2591,12 +2603,12 @@ html.y #bbox-overlay figcaption a { #op_up2k { padding: 0 1em 1em 1em; } -.overlaybg { +.modal { display: none; z-index: 3; background: rgba(48, 48, 48, 0.7); } -.overlaybg.vis, +.modal.vis, .dropzone { display: flex; justify-content: center; @@ -2740,11 +2752,6 @@ html.y #bbox-overlay figcaption a { #op_up2k.srch #u2btn { border-color: var(--u2-sbtn-b1); } -#u2conf.ww #u2btn { - line-height: 1em; - padding: .5em 0; - margin: -2em 1em -3em 0; -} #u2conf #u2btn { padding: .4em 0; margin: -2em 0; @@ -2861,30 +2868,24 @@ html.y #bbox-overlay figcaption a { width: 21em; } #u2cards { - padding: 1em 1em .42em 1em; + padding: 1em 1em 0 0; margin: 0 auto; white-space: nowrap; text-align: center; overflow: hidden; min-width: 24em; } -#u2cards.w { - width: 48em; - text-align: left; -} -#u2cards.ww { - display: inline-block; -} #u2etaw.w { width: 55em; text-align: right; - margin: 2em auto -2.7em auto; -} -#u2etaw.ww { - margin: -1em 2em 1em 1em; + margin: 2em auto -2em auto; + z-index: 1; + position: relative; + pointer-events: none; } #u2cards a { padding: .2em 1em; + padding-bottom: 5px; background: var(--u2-tab-bg); border: 1px solid #999; border-color: var(--u2-tab-b1); @@ -2918,21 +2919,12 @@ html.y #bbox-overlay figcaption a { min-width: 1.3em; } #u2conf { - margin: 1em auto; + margin: 1em 1em; width: 30em; } #u2conf.w { width: 51em; } -#u2conf.ww { - width: 82em; -} -#u2conf.ww #u2c3w { - width: 29em; -} -#u2conf.ww #u2c3w.s { - width: 39em; -} #u2conf .c, #u2conf .c * { text-align: center; @@ -3205,11 +3197,6 @@ html.ay #u2btn { html.dz #u2btn { letter-spacing: -.033em; } -html.c #u2conf.ww #u2btn, -html.a #u2conf.ww #u2btn { - margin: -2em .5em -3em 0; - padding: .9em 0; -} html.c #op_up2k.srch #u2btn, html.a #op_up2k.srch #u2btn { background: linear-gradient(to bottom, #ca3 0%, #fd8 50%, #fc6 51%, #b92 100%); diff --git a/copyparty/web/browser.html b/copyparty/web/browser.html index dcfd4ee8..8ad46011 100644 --- a/copyparty/web/browser.html +++ b/copyparty/web/browser.html @@ -171,16 +171,25 @@
-
-
-
- + + + diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 134e6b10..c2e4764c 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -889,7 +889,7 @@ ebi('widget').innerHTML = ( // up2k ui -ebi('op_up2k').innerHTML = ( +ebi('up_inner').innerHTML = ( '
\n' + '\n' + @@ -949,7 +949,8 @@ ebi('op_up2k').innerHTML = ( ' href="#" act="ng" tt="' + L.uct_ng + '">ng 0done 0busy 0que 0\n' + + ' href="#" act="q" tt="' + L.uct_q + '">que 0_\n' + '\n' + '\n' + @@ -970,6 +971,10 @@ ebi('op_up2k').innerHTML = ( '
' ); +ebi('up_outside').onclick = ebi('c_up_btn').onclick = function(){ + modaltoggle('up2k'); +} + ebi('wrap').insertBefore(mknod('div', 'lazy'), ebi('epi')); @@ -981,7 +986,7 @@ x.parentNode.insertBefore(mknod('div', null, (function () { var o = mknod('div'); o.innerHTML = ( - '
\n' + + '