Commit graph

756 commits

Author SHA1 Message Date
ed bbc379906a jump to last viewed pic on viewer close 2024-02-18 14:11:01 +00:00
ed 33f41f3e61 add hi-res thumbs (togglebtn/servercfg) 2024-02-18 13:04:22 +00:00
ed 64ad585318 ie11: file selection hotkeys 2024-02-14 23:08:32 +00:00
ed f262aee800 change folders to preload music when necessary:
on phones especially, hitting the end of a folder while playing music
could permanently stop audio playback, because the browser will
revoke playback privileges unless we have a song ready to go...
there's no time to navigate through folders looking for the next file

the preloader will now start jumping through folders ahead of time
2024-02-14 22:44:33 +00:00
ed f7a43a8e46 fix grid layout on first toggle from listview 2024-02-12 05:40:18 +01:00
ed ed524d84bb /np: exclude uploader ip and trim dot-prefix 2024-02-07 23:02:47 +00:00
ed 136c0fdc2b detect reverse-proxies stripping URL params:
if a reverseproxy decides to strip away URL parameters, show an
appropriate error-toast instead of silently entering a bad state

someone on discord ended up in an infinite page-reload loop
since the js would try to recover by fully navigating to the
requested dir if `?ls` failed, which wouldn't do any good anyways
if the dir in question is the initial dir to display
2024-02-05 19:17:36 +00:00
ed c354a38b4c up2k: warn about browser cap on num connections 2024-02-02 23:46:00 +00:00
ed d3db6d296f disable mkdir and new-doc buttons if no name is provided
also fixes toast.hide() unintentionally stopping events from bubbling
2024-02-01 21:41:48 +00:00
ed 55eb692134 up2k: add option to touch existing files to match local 2024-01-24 20:36:41 +00:00
ed b32d65207b fix js-error on older chromes in incognito mode;
window.localStorage was null, so trying to read would fail

seen on falkon 23.08.4 with qtwebengine 5.15.12 (fedora39)

might as well be paranoid about the other failure modes too
(sudden exceptions on reads and/or writes)
2024-01-24 02:24:27 +00:00
ed b4e0a34193 ensure windows-safe filenames during batch rename
also handle ctrl-click in the navpane float
2024-01-19 21:41:56 +00:00
ed 01c82b54a7 audio player: add shuffle 2024-01-18 22:59:47 +00:00
ed 4ef3106009 more old-browser support:
* polyfill Set() for gridview (ie9, ie10)
* navpane: do full-page nav if history api is ng (ie9)
* show markdown as plaintext if rendering fails (ie*)
* text-editor: hide preview pane if it doesn't work (ie*)
* explicitly hide toasts on close (ie9, ff10)
2024-01-18 22:56:39 +00:00
ed a55e0d6eb8 add button to bust music player cache,
useful on phones when the server was OOM'ing and
butchering the responses (foreshadowing...)
2024-01-13 04:08:40 +00:00
ed 2fd2c6b948 ie11 fixes (2024? haha no way dude it's like 2004 right)
* fix crash on keyboard input in modals
* text editor works again (but without markdown preview)
* keyboard hotkeys for the few features that actually work
2024-01-13 02:31:50 +00:00
ed a4239a466b immediately perform search if a checkbox is toggled 2024-01-12 00:20:38 +01:00
ed 5b26ab0096 add option to specify default num parallel uploads 2023-12-28 01:41:17 +01:00
ed 10bc2d9205 unsuccessful attempt at dirkeys (#64) 2023-12-17 22:30:22 +00:00
ed 1690889ed8 remember scroll position when leaving the textfile viewer 2023-12-01 23:15:48 +00:00
ed 5fc04152bd also handle NumpadEnter 2023-12-01 21:10:51 +00:00
ed b7723ac245 rely on filekeys for album-art over bluetooth;
will probably fail when some devices (sup iphone) stream to car stereos
but at least passwords won't end up somewhere unexpected this way
(plus, the js no longer uses the jank url to request waveforms)
2023-11-29 23:20:59 +00:00
ed b1fffc2246 open textfiles inline in grid-view, closes #63;
also fix the Y hotkey (which converts all links in the list-view into
download links), making that apply to the grid-view as well
2023-11-25 13:09:12 +00:00
ed 6f4bde2111 fix infinite backspin on "previous track";
when playing the first track in a folder and hitting the previous track
button, it would keep switching through the previous folders inifinitely
2023-11-21 23:23:51 +00:00
ed f3035e8869 clear load-more buttons upon navigation (thx icxes) 2023-11-21 22:53:46 +00:00
ed fa762754bf fix close/more thumbs in search results for pillow 10.x 2023-11-18 13:57:35 +00:00
ed 29bd8f57c4 fix js error when ctrl-clicking a search result; closes #60 2023-11-18 13:47:00 +00:00
ed 65e4d67c3e mkdir with leading slash works as expected 2023-11-04 22:21:56 +00:00
ed 713fffcb8e also mkdir missing intermediates,
unless requester is a webdav client (those expect a 409)
2023-11-03 23:23:49 +00:00
ed 8020b11ea0 improve/simplify validation/errorhandling:
* some malicious requests are now answered with HTTP 422,
   so that they count against --ban-422
* do not include request headers when replying to invalid requests,
   in case there is a reverse-proxy inserting something interesting
2023-11-03 23:07:16 +00:00
ed 76afb62b7b make each segment of links separately selectable 2023-10-25 12:21:39 +00:00
ed 2808734047 drc: further reduce volume skip between songs 2023-10-24 16:38:29 +00:00
ed 063fa3efde drc: fix volume jump on song change
(in exchange for a chance of clipping, which should be fine because
all browsers appear to have a limiter on the output anyways)
2023-10-23 09:05:31 +00:00
ed cea746377e v1.9.14 2023-10-21 14:43:11 +00:00
ed a4bad62b60 add clientside DRC / dynamic range compressor 2023-10-20 20:51:00 +00:00
ed c7f826dbbe search by upload time 2023-10-19 23:57:27 +00:00
ed 801da8079b only 404-ban accounts with permission [gGh]:
never bonk anyone with read-access (able to see directory-listing)
or write-only (not able to retrieve any files at all) due to
either --ban-404 or --ban-url

fixes accidental ban when webdav-uploading files which
match any of the --ban-url patterns (#55)

also default-enables --ban-404 since it is now generally safe
(even when up2k is in turbo mode), plus make turbo smart enough to
disengage when necessary
2023-10-18 22:14:09 +00:00
ed 7d797dba3f strip filekeys from -txt- links;
accessing the syntax hilighter using a filekey is impossible anyways
because the client expects to build its state from the folder listing
and the backend refuses to return a listing given just a filekey
2023-10-18 20:57:53 +00:00
ed ac40dccc8f v1.9.12 2023-10-15 20:06:46 +00:00
ed edbafd94c2 avoid iphone jank:
safari can immediately popstate when alt-tabbing back to the browser,
causing the page to load twice in parallel:

2174 log-capture ok
2295 h-repl $location
2498 h-pop $location <==
2551 sha-ok  # from initial load
2023-10-15 11:27:27 +00:00
ed 2df76eb6e1 client decides if thumbnails should be cropped or not
this carries some intentional side-effects; each thumbnail format will
now be stored in its own subfolder under .hist/th/ making cleanup more
effective (jpeg and webm are dropped separately)
2023-10-15 10:21:25 +00:00
ed dc2b67f155 ui-button to use upload-time instead of local last-modified 2023-10-15 08:46:23 +00:00
ed 9f32e9e11d set default sort order; --sort or volflag "sort" 2023-10-14 22:17:37 +00:00
ed e9f65be86a add cachebuster for dynamically loaded js files 2023-10-09 00:22:16 +00:00
ed fc9b729fc2 fix #51:
* handle unexpected localstorage values
* handle unsupported --lang values
2023-09-30 22:54:21 +00:00
ed 8620ae5bb7 fix column-hiding ux on phones:
table header click-handler didn't cover the entire cell so it was
easy to sort the table by accident; also do not exit hiding mode
automatically since you usually want to hide several columns
(so also adjust css to make it obvious you're in hiding mode)
2023-09-28 09:28:26 +02:00
ed 3768cb4723 add chat 2023-09-23 11:34:32 +00:00
ed 72fc76ef48 golf / normalize window.location 2023-09-20 22:07:40 +00:00
ed aa96a1acdc misc optimizations / cleanup:
* slightly faster startup / shutdown
* forgot a jinja2 golf
* waste 4KiB changing prismjs back to gz since brotli is https-gated ;_;
* broke support for firefox<52 (non-var functions must be toplevel
   or immediately within another function), now even firefox 10 /
   centos 6 is somewhat supported again
2023-09-17 13:02:18 +00:00
ed 714fd1811a add option to generate pax-format tar archives
and forgot to commit the nix module
2023-09-08 21:13:23 +00:00
ed 11eefaf968 create / edit non-markdown textfiles (if user has delete-access)
also enables the ansi escape code parser if the text looks like ansi
2023-09-08 18:47:31 +00:00
ed cadaeeeace v1.9.4 2023-09-02 00:18:53 +00:00
ed 767696185b add ?tar=gz, ?tar=bz2, ?tar=xz with optional level;
defaults are ?tar=gz:3, ?tar=bz2:9, ?tar=xz:1
2023-09-01 23:44:10 +00:00
ed a50d0563c3 instantly perform search when URL contains a raw query 2023-09-01 20:16:19 +00:00
ed 30cc9defcb cosmetics:
* in case someone gets a confusing access-related error message,
  include more context in serverlogs (exact path)
* fix js console spam in search results
* same markdown line-height in viewer and browser
2023-08-31 21:27:14 +00:00
ed 30905c6f5d add convenient debugs in case the fight is not over 2023-08-31 20:00:14 +00:00
ed 9986136dfb apple/ios/iphone: maybe fix background album playback
good news: apple finally added support for samplerates other than
44100 for AudioContext, meaning it would now have been possible to
set non-100% volume for audio files including opus files

bad news: apple broke AudioContext in a way that makes it bug out
mediaSessions, causing lockscreen controls to become mostly useless

bad news: apple broke AudioContext additionally where it randomly
causes playback issues, blocking playback of audio files, even if
the AudioContext is sitting idle doing nothing (which is a
requirement for reliable upload speeds on other platforms)

disable AudioContext on iOS
2023-08-31 19:57:05 +00:00
ed 1c0d978979 ios/iphone: autoreplace smart-quotes with sane quotes,
as the iphone keyboard is not able to produce ' or "
2023-08-31 19:29:37 +00:00
ed 5a38311481 mark offline volumes in directory tree sidebar 2023-08-26 19:00:46 +00:00
ed 9f8edb7f32 make markdown slightly safer without the nohtml volflag
by running dompurify after marked.parse if plugins are not enabled;
adds no protection against the more practical approach of just
putting a malicious <script> in an html file and uploading that,
but one footgun less is one less footgun
2023-08-26 17:37:02 +00:00
ed c5a6ac8417 persist dotfile preference as cookie for initial listing 2023-08-26 15:50:57 +00:00
ed f7ceae5a5f add filetable range-select with shift-pgup/pgdn,
and retain file selection cursor when lazyloading more files
2023-08-25 19:34:37 +00:00
ed c9492d16ba fix textfile navigation hotkeys (broke in 5d13ebb4) 2023-08-25 18:41:45 +00:00
ed 4444f0f6ff v1.9.1 2023-08-20 23:38:42 +00:00
ed b28bfe64c0 explain apple bullshit 2023-08-20 22:09:00 +02:00
ed 5d13ebb4ac avoid firefox-android quirk(?):
when repeatedly tapping the next-folder button, occasionally it will
reload the entire page instead of ajax'ing the directory contents.

Navigation happens by simulating a click in the directory sidebar,
so the incorrect behavior matches what would happen if the link to the
folder didn't have its onclick-handler attached, so should probably
double-check if there's some way for that to happen

Issue observed fairly easily in firefox on android, regardless if
copyparty is running locally or on a server in a different country.
Unable to reproduce with android-chrome or desktop-firefox

Could also be due to an addon (dark-reader, noscript, ublock-origin)

anyways, avoiding this by doing the navigation more explicitly
2023-08-16 19:56:47 +00:00
ed 015b87ee99 performance / cosmetic:
* js: use .call instead of .bind when possible
* when running without e2d, the message on startup regarding
  unfinished uploads didn't show the correct filesystem path
2023-08-16 19:32:43 +00:00
ed 0a48acf6be limit each column of the files table to screen width 2023-08-16 03:55:53 +00:00
ed 18aa82fb2f make browser resizing smoother / less expensive 2023-08-15 16:55:19 +00:00
ed bee26e853b show server hostname in html titles:
* --doctitle defines most titles, prefixed with "--name: " by default
* the file browser is only prefixed with the --name itself
* --nth ("no-title-hostname") removes it
* also removed by --nih ("no-info-hostname")
2023-08-14 23:50:13 +02:00
ed f9d5bb3b29 support upload by dragdrop from other browser windows,
hello from LO484 https://ocv.me/stuff/aircode.jpg
2023-07-28 21:43:40 +02:00
ed 0896c5295c range-select fixes:
* dont crash when shiftclicking between folders
* remember origin when lazyloading more files
2023-07-25 14:06:31 +02:00
ed 1a658dedb7 fix infinite playback spin on servers with one single file 2023-07-23 14:52:42 +00:00
ed 8d376b854c this is the wrong way around 2023-07-23 14:10:23 +00:00
ed 5aa54d1217 shift/ctrl-click improvements:
* always enable shift-click selection in list-view
* shift-clicking thumbnails opens in new window by default as expected
* enable shift-select in grid-view when multiselect is on
* invert select when the same shift-select is made repeatedly
2023-07-16 18:15:56 +00:00
ed 88b876027c option to range-select files with shift-click; closes #47
also restores the browser-default behavior of
opening links in a new tab with CTRL / new window with SHIFT
2023-07-16 14:05:09 +00:00
ed 551d99b71b add permission "a" to show uploader IPs (#45) 2023-07-12 21:36:55 +00:00
ed b8e851c332 cloudflare update + cosmetics:
* toastb padding fixes scrollbar on norwegian 403 in firefox
* fix text aspect ratio in seekbaron compact toggle
* crashpage had link overlaps on homepage
2023-06-25 23:09:29 +00:00
ed 9c28ba417e option to regex-exclude files in browser listings 2023-06-02 21:54:25 +00:00
ed 025a537413 add option to show thumbs by default; closes #31 2023-06-02 18:41:21 +00:00
ed d979c47f50 optimize clearTimeout + always shrink upload panes after completion + fix GET alignment 2023-05-12 20:46:45 +00:00
ed 8b0e66122f smoother playback cursor on short songs + optimize 2023-05-06 16:31:04 +00:00
ed 138f5bc989 warn about android powersave settings on music interruption + fix eq on folder change 2023-04-29 09:31:53 +00:00
ed d71416437a show file selection summary 2023-04-27 19:33:52 +00:00
ed d3ccd3f174 v1.6.15 2023-04-26 23:00:55 +00:00
ed abff40519d eyecandy: restore playback indicator on folder hop 2023-04-26 19:09:16 +00:00
ed 33442026b8 try to discourage android from stopping playback...
...when continuing into the next folder

accidentally introduces a neat bonus feature where the music
no longer stops while you go looking for stuff to play next
2023-04-26 18:33:30 +00:00
ed f5fe3678ee more safari-on-touchbar-macbook workarounds:
* safari invokes pause on the mediasession
   whenever any Audio loads a new src (preload)

* ...and on some(?) seeks
2023-04-07 23:04:01 +02:00
ed f2a7925387 avoid safari bugs on touchbar macbooks:
* songs would play backwards
* playback started immediately on folder change
2023-04-07 12:38:37 +02:00
ed 4e67516719 last.fm web-scrobbler support 2023-04-01 21:02:03 +00:00
ed 852499e296 dont panic in case of extension-injected css 2023-04-01 16:08:45 +00:00
ed 854ba0ec06 add audio filter plugin thing 2023-03-31 20:20:28 +00:00
ed 949baae539 integrate markdown thumbs with image gallery 2023-03-30 21:21:21 +00:00
ed 8a09601be8 url-param ?v disables index.html 2023-03-16 20:52:43 +00:00
ed bba8a3c6bc fix truncated search results 2023-03-16 20:12:13 +00:00
ed be7bb71bbc add option to show index.html instead of listing 2023-03-16 19:41:33 +00:00
ed c269b0dd91 show an error (instead of crashing) if a pic is 404 2023-03-09 22:37:12 +00:00
ed 8c3211263a keep scanning folders for more music to play 2023-03-09 22:26:41 +00:00
ed ecdec75b4e v1.6.6 2023-02-26 20:30:17 +00:00
ed 5cb2e33353 update readmes + fix typo 2023-02-26 19:22:54 +00:00
ed 604e5dfaaf improve error handling / messages 2023-02-26 18:26:13 +00:00
ed 5effaed352 add reminder that SSDP launches IE by default 2023-02-21 19:38:35 +00:00
ed 292ce75cc2 return to previous url after login 2023-02-19 19:58:15 +00:00
ed 5c12dac30f most ffmpeg builds dont support compressed modules 2023-02-12 14:02:43 +00:00
ed cdec42c1ae v1.6.4 2023-02-11 18:02:05 +00:00
ed 8f61e1568c transcode chiptunes to opus;
* new audio/MPT formats: apac bonk dfpwm ilbc it itgz itr itz mo3 mod mptm mt2 okt s3gz s3m s3r s3z xm xmgz xmr xmz xpk
* new image/PIL formats: blp dcx emf eps fits flc fli fpx im j2k j2p psd spi wmf
2023-02-11 11:17:37 +00:00
ed dbdb9574b1 doc-browser: fix md scaling + download hotkey 2023-02-10 21:33:48 +00:00
ed b0db14d8b0 indicate forced-randomized filenames 2023-02-04 15:18:09 +00:00
ed 4de61defc9 add a link exporter to the unpost ui too 2023-02-02 22:57:59 +00:00
ed bc339f774a button to show/copy links for all recent uploads 2023-02-02 22:27:53 +00:00
ed e67b695b23 show filekeys in recent-uploads ui 2023-02-02 21:22:51 +00:00
ed a918c285bf up2k-ui: button to randomize upload filenames 2023-02-01 22:26:18 +00:00
ed 39399934ee v1.6.3 2023-01-31 21:03:43 +00:00
ed b47635150a shove #files aside while prologue sandbox is loading 2023-01-31 21:02:58 +00:00
ed 7a98dc669e block alerts in sandbox by default + add translation 2023-01-31 19:16:28 +00:00
ed 712a578e6c indicate when a readme/logue was hidden 2023-01-31 19:01:24 +00:00
ed 6d1d3e48d8 sandbox height didnt account for scrollbars 2023-01-31 17:54:04 +00:00
ed 04966164ce more iframe-resize-concealing tricks 2023-01-31 17:43:21 +00:00
ed 8c54c2226f cover up most of the layout jank 2023-01-30 22:52:16 +00:00
ed f74ac1f18b fix sandbox lag by helping the iframe cache js 2023-01-30 22:36:05 +00:00
ed 0bac87c36f make loss of hotkeys more obvious 2023-01-29 01:40:02 +00:00
ed e650d05939 shovel across most of the env too 2023-01-29 01:19:53 +00:00
ed 2569005139 support sandboxed markdown plugins 2023-01-29 00:57:08 +00:00
ed c50cb66aef sandboxed other-origin iframes dont cache css 2023-01-28 23:40:25 +00:00
ed d4c5fca15b sandbox readme.md / prologue / epilogue 2023-01-28 21:24:40 +00:00
ed 75cea4f684 misc 2023-01-28 13:35:49 +00:00
ed 82f98dd54d delete/move is now POST 2023-01-28 01:02:50 +00:00
ed bab4aa4c0a mkdir fix 2023-01-27 22:16:10 +00:00
ed b005acbfda enable text selection between breadcrumbs + update vs 2023-01-23 22:44:29 +00:00
ed 85321a6f31 stale tree is better than no tree 2023-01-15 20:54:03 +00:00
ed 434823f6f0 ui: allow changing num.threads in search-only 2023-01-11 16:14:02 +00:00
ed 343d38b693 extend image-viewer with modern formats 2022-12-15 22:38:33 +00:00
ed 497f5b4307 add hotkey to enable download mode 2022-12-13 19:50:20 +00:00
ed 7fd1d6a4e8 rename --webroot to --rp-loc and fix related bugs 2022-12-11 21:09:50 +00:00
ed db194ab519 support location-based rproxy 2022-12-10 23:43:31 +00:00
ed 7a57c9dbf1 translation 2022-12-07 22:47:33 +00:00
ed bb657bfa85 more intuitive batch-unpost ordering 2022-12-07 22:30:48 +00:00
ed dbe2aec79c v1.5.1 2022-12-03 20:48:52 +00:00
ed 89ba12065c ssdp: add ie8 compat 2022-12-03 13:59:46 +00:00
ed 2fbdc0a85e misc fixes / cleanup 2022-12-02 23:42:46 +00:00
ed 008d9b1834 add textbox placeholders 2022-12-02 18:33:04 +00:00
ed 5c30148be4 also scroll to playing track when resizing window 2022-11-29 22:16:14 +00:00
ed e357aa546c add browserchrome color hint 2022-11-28 21:19:42 +00:00
ed bd24bf9bae option to follow playing song 2022-11-28 20:24:47 +00:00
ed ee141544aa option for compact mediaplayer 2022-11-28 20:10:10 +00:00
ed db6f6e6a23 option to hide scrollbars 2022-11-28 19:47:14 +00:00
ed d6e09c3880 ux: dedicated column-hiding mode on phones 2022-11-21 20:44:58 +00:00
ed ec587423e8 show/hide tagsearch ui based on folder flags 2022-11-20 23:30:01 +00:00
ed f57b31146d improve parent-folder button on phones 2022-11-20 22:37:55 +00:00
ed ab655a56af add buttons for prev/next folder 2022-11-19 22:19:38 +00:00