From cfdbce96a8983cb442fcbd0ec47e4a45d76b9501 Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Sat, 20 Jun 2026 14:47:47 +0200 Subject: [PATCH] zip folder download svg icon --- copyparty/web/browser.css | 27 +++++++++++++++++++++++---- copyparty/web/browser.js | 3 ++- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 776aeed6..7b378d67 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -1607,10 +1607,12 @@ html:not(.e):not(.d) #up_quick .btn.on { display: inline-block; } #wtoggle #zip1 { - padding: .4em; - margin: 0 .2em; - vertical-align: top; + padding: .2em .4em; + position: relative; white-space: nowrap; + width: 2em; + height: 2em; + vertical-align: top; } #wm3u a { margin: -.2em .1em; @@ -1630,10 +1632,24 @@ html:not(.e):not(.d) #up_quick .btn.on { font-size: .7em; display: block; } +#zip1:hover { + --fg: var(--a); +} +#zip1 span { + text-shadow: none; + background: var(--fg); + color: var(--bg-max); + border-radius: 2px; + padding: 1px 3px; + position: absolute; + z-index: 1; + top: 1.4em; + font-size: .6em; + margin-left: .2em; +} .unfun #wfm span, .unfun #wm3u span, -.unfun #zip1 span, .unfun #wnp span { font-size: 1em; } @@ -6125,6 +6141,9 @@ html.fy #files thead th { html.fy #files tr:not(.sel) .imgcontainer img { z-index: -1; } +html.fy #zip1 { + --bg-max: var(--bg-u2); +} html.f.unfun #ops a { padding: .5em; diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index aa666b7a..0942ec59 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -969,6 +969,7 @@ var svg_next = svg_box + '' var svg_pause = svg_box + '' var svg_vol = svg_box + '' +var svg_dlzip = svg_box + ' ' ebi('widget').innerHTML = ( '
' + @@ -985,7 +986,7 @@ ebi('widget').innerHTML = ( ' href="#" id="fcpy" tt="' + L.wt_cpy + '">⧉copy📋paste' + '' + (fun_tgl ? '⬇️📦' : 'download') + 'zip' + + ' href="#" id="zip1" tt="' + L.wt_zip1 + '">' + svg_dlzip + 'zip' + '' + (fun_tgl ? '✅
sel. ' : 'sel.
') + 'all' + (fun_tgl ? '🔛
sel. ' : 'sel.
') + 'inv.