From 3e3228e0f63c0911fcbd13904706e5bc928bb190 Mon Sep 17 00:00:00 2001 From: exci <76759714+icxes@users.noreply.github.com> Date: Fri, 16 Jan 2026 02:52:19 +0200 Subject: [PATCH] add drag-selection to gridview (#1212) --- copyparty/web/browser.css | 9 +++ copyparty/web/browser.js | 149 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+) diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 53b59bff..ee63c43c 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -4168,4 +4168,13 @@ html.e #detree { border-color: var(--a); border-radius: .2em; padding: .2em .3em; +} + +.selbox { + position: fixed; + border: 1px solid var(--btn-1h-bg); + background-color: var(--btn-1h-bg); + background-color: rgb(from var(--btn-1h-bg) r g b / 0.5); + pointer-events: none; + z-index: 99; } \ No newline at end of file diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index b7b583d2..9ecf276e 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -231,6 +231,7 @@ if (1) "ct_ttips": '◔ ◡ ◔">ℹ️ tooltips', "ct_thumb": 'in grid-view, toggle icons or thumbnails$NHotkey: T">🖼️ thumbs', "ct_csel": 'use CTRL and SHIFT for file selection in grid-view">sel', + "ct_dsel": 'use drag selection in grid-view">dsel', "ct_dl": 'force download (don\'t display inline) when a file is clicked">dl', "ct_ihop": 'when the image viewer is closed, scroll down to the last viewed file">g⮯', "ct_dots": 'show hidden files (if server permits)">dotfiles', @@ -910,6 +911,7 @@ ebi('op_cfg').innerHTML = ( ' ' + L.ct_grid + '\n' + '