retold-remote 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/css/retold-remote.css +3 -0
  2. package/docs/README.md +181 -0
  3. package/docs/_cover.md +14 -0
  4. package/docs/_sidebar.md +10 -0
  5. package/docs/_topbar.md +3 -0
  6. package/docs/audio-viewer.md +133 -0
  7. package/docs/ebook-reader.md +90 -0
  8. package/docs/image-viewer.md +90 -0
  9. package/docs/server-setup.md +262 -0
  10. package/docs/video-viewer.md +134 -0
  11. package/html/docs.html +59 -0
  12. package/html/index.html +1 -1
  13. package/package.json +20 -6
  14. package/source/Pict-Application-RetoldRemote.js +122 -2
  15. package/source/RetoldRemote-ExtensionMaps.js +33 -0
  16. package/source/cli/RetoldRemote-Server-Setup.js +211 -67
  17. package/source/cli/commands/RetoldRemote-Command-Serve.js +5 -26
  18. package/source/providers/Pict-Provider-AISortManager.js +456 -0
  19. package/source/providers/Pict-Provider-CollectionManager.js +1200 -0
  20. package/source/providers/Pict-Provider-FormattingUtilities.js +109 -0
  21. package/source/providers/Pict-Provider-GalleryFilterSort.js +2 -11
  22. package/source/providers/Pict-Provider-GalleryNavigation.js +187 -409
  23. package/source/providers/Pict-Provider-RetoldRemoteIcons.js +52 -0
  24. package/source/providers/Pict-Provider-ToastNotification.js +96 -0
  25. package/source/providers/keyboard-handlers/KeyHandler-AudioExplorer.js +88 -0
  26. package/source/providers/keyboard-handlers/KeyHandler-Gallery.js +190 -0
  27. package/source/providers/keyboard-handlers/KeyHandler-Sidebar.js +65 -0
  28. package/source/providers/keyboard-handlers/KeyHandler-VideoExplorer.js +57 -0
  29. package/source/providers/keyboard-handlers/KeyHandler-Viewer.js +197 -0
  30. package/source/server/RetoldRemote-AISortService.js +879 -0
  31. package/source/server/RetoldRemote-ArchiveService.js +2 -12
  32. package/source/server/RetoldRemote-AudioWaveformService.js +7 -16
  33. package/source/server/RetoldRemote-CollectionService.js +843 -0
  34. package/source/server/RetoldRemote-EbookService.js +7 -16
  35. package/source/server/RetoldRemote-FileOperationService.js +560 -0
  36. package/source/server/RetoldRemote-MediaService.js +15 -14
  37. package/source/server/RetoldRemote-MetadataCache.js +411 -0
  38. package/source/server/RetoldRemote-ParimeCache.js +349 -0
  39. package/source/server/RetoldRemote-ThumbnailCache.js +52 -20
  40. package/source/server/RetoldRemote-VideoFrameService.js +7 -15
  41. package/source/views/PictView-Remote-AudioExplorer.js +10 -43
  42. package/source/views/PictView-Remote-CollectionsPanel.js +1486 -0
  43. package/source/views/PictView-Remote-Gallery.js +237 -44
  44. package/source/views/PictView-Remote-ImageViewer.js +1 -34
  45. package/source/views/PictView-Remote-Layout.js +411 -20
  46. package/source/views/PictView-Remote-MediaViewer.js +311 -28
  47. package/source/views/PictView-Remote-SettingsPanel.js +275 -133
  48. package/source/views/PictView-Remote-TopBar.js +701 -14
  49. package/source/views/PictView-Remote-VLCSetup.js +8 -39
  50. package/source/views/PictView-Remote-VideoExplorer.js +20 -54
  51. package/web-application/css/docuserve.css +73 -0
  52. package/web-application/css/retold-remote.css +3 -0
  53. package/web-application/docs/README.md +181 -0
  54. package/web-application/docs/_cover.md +14 -0
  55. package/web-application/docs/_sidebar.md +10 -0
  56. package/web-application/docs/_topbar.md +3 -0
  57. package/web-application/docs/audio-viewer.md +133 -0
  58. package/web-application/docs/ebook-reader.md +90 -0
  59. package/web-application/docs/image-viewer.md +90 -0
  60. package/web-application/docs/server-setup.md +262 -0
  61. package/web-application/docs/video-viewer.md +134 -0
  62. package/web-application/docs.html +59 -0
  63. package/web-application/index.html +1 -1
  64. package/web-application/js/pict-docuserve.min.js +58 -0
  65. package/web-application/js/pict.min.js +2 -2
  66. package/web-application/js/pict.min.js.map +1 -1
  67. package/web-application/retold-remote.js +2652 -970
  68. package/web-application/retold-remote.js.map +1 -1
  69. package/web-application/retold-remote.min.js +60 -13
  70. package/web-application/retold-remote.min.js.map +1 -1
  71. package/server.js +0 -43
@@ -15,6 +15,7 @@ const _ViewConfiguration =
15
15
  display: flex;
16
16
  flex-direction: column;
17
17
  height: 100vh;
18
+ height: 100dvh;
18
19
  background: var(--retold-bg-primary);
19
20
  color: var(--retold-text-primary);
20
21
  font-family: var(--retold-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
@@ -145,6 +146,34 @@ const _ViewConfiguration =
145
146
  {
146
147
  display: none;
147
148
  }
149
+ /* Hide the ugly white + button from the breadcrumb bar */
150
+ #ContentEditor-Sidebar-Container .pict-fb-breadcrumb-addfolder
151
+ {
152
+ display: none;
153
+ }
154
+ /* Subtle add-folder button at bottom of file list */
155
+ .retold-remote-sidebar-addfolder
156
+ {
157
+ display: block;
158
+ width: 100%;
159
+ padding: 8px 12px;
160
+ margin-top: 4px;
161
+ border: 1px dashed var(--retold-border);
162
+ border-radius: 4px;
163
+ background: transparent;
164
+ color: var(--retold-text-dim);
165
+ font-size: 0.72rem;
166
+ font-family: inherit;
167
+ cursor: pointer;
168
+ text-align: center;
169
+ transition: color 0.15s, border-color 0.15s, background 0.15s;
170
+ }
171
+ .retold-remote-sidebar-addfolder:hover
172
+ {
173
+ color: var(--retold-text-muted);
174
+ border-color: var(--retold-text-dim);
175
+ background: rgba(128, 128, 128, 0.06);
176
+ }
148
177
  #ContentEditor-Sidebar-Container .pict-fb-detail-row
149
178
  {
150
179
  color: var(--retold-text-secondary);
@@ -171,16 +200,42 @@ const _ViewConfiguration =
171
200
  {
172
201
  box-shadow: inset 0 0 0 1px var(--retold-accent);
173
202
  }
174
- #ContentEditor-Sidebar-Container .pict-fb-breadcrumbs
203
+ #ContentEditor-Sidebar-Container .pict-fb-breadcrumb-bar
175
204
  {
176
- color: var(--retold-text-muted);
177
205
  background: var(--retold-bg-secondary);
178
206
  border-bottom-color: var(--retold-border);
179
207
  }
208
+ #ContentEditor-Sidebar-Container .pict-fb-breadcrumbs
209
+ {
210
+ color: var(--retold-text-muted);
211
+ background: transparent;
212
+ border-bottom: none;
213
+ }
180
214
  #ContentEditor-Sidebar-Container .pict-fb-breadcrumb-link
181
215
  {
182
216
  color: var(--retold-accent);
183
217
  }
218
+ /* Insert button: hidden by default, visible on row hover for ALL files */
219
+ #ContentEditor-Sidebar-Container .pict-fb-insert-btn
220
+ {
221
+ display: none;
222
+ background: var(--retold-bg-hover);
223
+ color: var(--retold-text-muted);
224
+ border: 1px solid var(--retold-border);
225
+ border-radius: 3px;
226
+ font-size: 0.72rem;
227
+ padding: 1px 6px;
228
+ }
229
+ #ContentEditor-Sidebar-Container .pict-fb-insert-btn:hover
230
+ {
231
+ background: var(--retold-accent);
232
+ color: var(--retold-bg-primary);
233
+ border-color: var(--retold-accent);
234
+ }
235
+ #ContentEditor-Sidebar-Container .pict-fb-detail-row:hover .pict-fb-insert-btn
236
+ {
237
+ display: inline-block;
238
+ }
184
239
  /* Main content area */
185
240
  #RetoldRemote-Content-Container
186
241
  {
@@ -208,6 +263,135 @@ const _ViewConfiguration =
208
263
  {
209
264
  display: none;
210
265
  }
266
+
267
+ /* ============================================================
268
+ MOBILE: Sidebar becomes a top drawer
269
+ ============================================================ */
270
+ @media (max-width: 600px)
271
+ {
272
+ .content-editor-body
273
+ {
274
+ flex-direction: column;
275
+ }
276
+
277
+ /* Sidebar becomes a top section with a height instead of width */
278
+ .content-editor-sidebar-wrap
279
+ {
280
+ width: 100% !important;
281
+ height: 33vh;
282
+ height: 33dvh;
283
+ transition: height 0.2s ease;
284
+ flex-direction: column;
285
+ }
286
+
287
+ .content-editor-sidebar-wrap.collapsed
288
+ {
289
+ width: 100% !important;
290
+ height: 0 !important;
291
+ }
292
+
293
+ /* Resize handle becomes horizontal bar at the bottom of the drawer */
294
+ .content-editor-resize-handle
295
+ {
296
+ width: 100%;
297
+ height: 8px;
298
+ cursor: row-resize;
299
+ border-right: none;
300
+ border-bottom: 1px solid var(--retold-border);
301
+ display: flex;
302
+ align-items: center;
303
+ justify-content: center;
304
+ }
305
+
306
+ .content-editor-resize-handle::after
307
+ {
308
+ content: '';
309
+ display: block;
310
+ width: 36px;
311
+ height: 3px;
312
+ border-radius: 2px;
313
+ background: var(--retold-text-placeholder);
314
+ opacity: 0.5;
315
+ }
316
+
317
+ .content-editor-resize-handle:hover::after,
318
+ .content-editor-resize-handle.dragging::after
319
+ {
320
+ background: var(--retold-accent);
321
+ opacity: 1;
322
+ }
323
+
324
+ /* Sidebar inner fills the drawer */
325
+ .content-editor-sidebar-inner
326
+ {
327
+ flex: 1;
328
+ min-height: 0;
329
+ }
330
+
331
+ /* Content takes remaining space */
332
+ #RetoldRemote-Content-Container
333
+ {
334
+ flex: 1;
335
+ min-height: 0;
336
+ }
337
+
338
+ /* Collections panel: hide in mobile */
339
+ .retold-remote-collections-wrap
340
+ {
341
+ display: none;
342
+ }
343
+ }
344
+
345
+ /* ---- Right-side Collections Panel ---- */
346
+ .retold-remote-collections-wrap
347
+ {
348
+ display: flex;
349
+ flex-shrink: 0;
350
+ position: relative;
351
+ transition: width 0.2s ease;
352
+ border-left: 1px solid var(--retold-border);
353
+ }
354
+ .retold-remote-collections-wrap.collapsed
355
+ {
356
+ width: 0 !important;
357
+ border-left: none;
358
+ }
359
+ .retold-remote-collections-wrap.collapsed .retold-remote-collections-inner
360
+ {
361
+ visibility: hidden;
362
+ }
363
+ .retold-remote-collections-wrap.collapsed .retold-remote-collections-resize-handle
364
+ {
365
+ display: none;
366
+ }
367
+ .retold-remote-collections-inner
368
+ {
369
+ display: flex;
370
+ flex-direction: column;
371
+ flex: 1;
372
+ min-width: 0;
373
+ min-height: 0;
374
+ overflow: hidden;
375
+ background: var(--retold-bg-primary);
376
+ }
377
+ .retold-remote-collections-resize-handle
378
+ {
379
+ position: absolute;
380
+ left: 0;
381
+ top: 0;
382
+ bottom: 0;
383
+ width: 5px;
384
+ cursor: col-resize;
385
+ z-index: 10;
386
+ display: flex;
387
+ align-items: center;
388
+ justify-content: center;
389
+ }
390
+ .retold-remote-collections-resize-handle:hover
391
+ {
392
+ background: var(--retold-accent);
393
+ opacity: 0.3;
394
+ }
211
395
  `,
212
396
 
213
397
  Templates:
@@ -232,6 +416,12 @@ const _ViewConfiguration =
232
416
  <div id="RetoldRemote-Gallery-Container"></div>
233
417
  <div id="RetoldRemote-Viewer-Container"></div>
234
418
  </div>
419
+ <div class="retold-remote-collections-wrap collapsed" id="RetoldRemote-Collections-Wrap" style="width: 300px;">
420
+ <div class="retold-remote-collections-resize-handle"></div>
421
+ <div class="retold-remote-collections-inner">
422
+ <div id="RetoldRemote-Collections-Container"></div>
423
+ </div>
424
+ </div>
235
425
  </div>
236
426
  `
237
427
  }
@@ -254,6 +444,7 @@ class RetoldRemoteLayoutView extends libPictView
254
444
  super(pFable, pOptions, pServiceHash);
255
445
 
256
446
  this._sidebarDragging = false;
447
+ this._collectionsDragging = false;
257
448
  }
258
449
 
259
450
  onAfterRender()
@@ -276,7 +467,7 @@ class RetoldRemoteLayoutView extends libPictView
276
467
  tmpWrap.classList.add('collapsed');
277
468
  }
278
469
  }
279
- if (tmpRemote && tmpRemote.SidebarWidth)
470
+ if (!this.isMobileDrawer() && tmpRemote && tmpRemote.SidebarWidth)
280
471
  {
281
472
  let tmpWrap = document.querySelector('.content-editor-sidebar-wrap');
282
473
  if (tmpWrap && !tmpWrap.classList.contains('collapsed'))
@@ -284,6 +475,31 @@ class RetoldRemoteLayoutView extends libPictView
284
475
  tmpWrap.style.width = tmpRemote.SidebarWidth + 'px';
285
476
  }
286
477
  }
478
+ if (this.isMobileDrawer() && tmpRemote && tmpRemote.SidebarDrawerHeight)
479
+ {
480
+ let tmpWrap = document.querySelector('.content-editor-sidebar-wrap');
481
+ if (tmpWrap && !tmpWrap.classList.contains('collapsed'))
482
+ {
483
+ tmpWrap.style.height = tmpRemote.SidebarDrawerHeight + 'px';
484
+ }
485
+ }
486
+
487
+ // Restore collections panel state from settings
488
+ if (tmpRemote && tmpRemote.CollectionsPanelOpen)
489
+ {
490
+ let tmpCollWrap = document.getElementById('RetoldRemote-Collections-Wrap');
491
+ if (tmpCollWrap)
492
+ {
493
+ tmpCollWrap.classList.remove('collapsed');
494
+ if (tmpRemote.CollectionsPanelWidth)
495
+ {
496
+ tmpCollWrap.style.width = tmpRemote.CollectionsPanelWidth + 'px';
497
+ }
498
+ }
499
+ }
500
+
501
+ // Set up collections panel resize handle
502
+ this._setupCollectionsResizeHandle();
287
503
 
288
504
  // Listen for hash changes (browser back/forward)
289
505
  let tmpSelf = this;
@@ -293,6 +509,14 @@ class RetoldRemoteLayoutView extends libPictView
293
509
  });
294
510
  }
295
511
 
512
+ /**
513
+ * Detect if we are in mobile drawer mode (narrow viewport).
514
+ */
515
+ isMobileDrawer()
516
+ {
517
+ return window.innerWidth <= 600;
518
+ }
519
+
296
520
  toggleSidebar()
297
521
  {
298
522
  let tmpWrap = document.querySelector('.content-editor-sidebar-wrap');
@@ -304,7 +528,23 @@ class RetoldRemoteLayoutView extends libPictView
304
528
  tmpWrap.classList.toggle('collapsed');
305
529
 
306
530
  let tmpRemote = this.pict.AppData.RetoldRemote;
307
- tmpRemote.SidebarCollapsed = tmpWrap.classList.contains('collapsed');
531
+ let tmpIsCollapsed = tmpWrap.classList.contains('collapsed');
532
+ tmpRemote.SidebarCollapsed = tmpIsCollapsed;
533
+
534
+ // Restore saved dimensions when opening
535
+ if (!tmpIsCollapsed)
536
+ {
537
+ if (this.isMobileDrawer())
538
+ {
539
+ let tmpHeight = tmpRemote.SidebarDrawerHeight || Math.round(window.innerHeight * 0.33);
540
+ tmpWrap.style.height = tmpHeight + 'px';
541
+ }
542
+ else if (tmpRemote.SidebarWidth)
543
+ {
544
+ tmpWrap.style.width = tmpRemote.SidebarWidth + 'px';
545
+ }
546
+ }
547
+
308
548
  this.pict.PictApplication.saveSettings();
309
549
 
310
550
  // Recalculate gallery columns after sidebar resize
@@ -355,37 +595,84 @@ class RetoldRemoteLayoutView extends libPictView
355
595
  }
356
596
 
357
597
  let tmpStartX = 0;
598
+ let tmpStartY = 0;
358
599
  let tmpStartWidth = 0;
600
+ let tmpStartHeight = 0;
359
601
 
360
- function onMouseDown(pEvent)
602
+ function getClientPos(pEvent)
603
+ {
604
+ if (pEvent.touches && pEvent.touches.length > 0)
605
+ {
606
+ return { x: pEvent.touches[0].clientX, y: pEvent.touches[0].clientY };
607
+ }
608
+ return { x: pEvent.clientX, y: pEvent.clientY };
609
+ }
610
+
611
+ function onDragStart(pEvent)
361
612
  {
362
613
  tmpSelf._sidebarDragging = true;
363
- tmpStartX = pEvent.clientX;
614
+ let tmpPos = getClientPos(pEvent);
615
+ tmpStartX = tmpPos.x;
616
+ tmpStartY = tmpPos.y;
364
617
  tmpStartWidth = tmpWrap.offsetWidth;
618
+ tmpStartHeight = tmpWrap.offsetHeight;
365
619
  tmpHandle.classList.add('dragging');
366
- document.addEventListener('mousemove', onMouseMove);
367
- document.addEventListener('mouseup', onMouseUp);
620
+
621
+ document.addEventListener('mousemove', onDragMove);
622
+ document.addEventListener('mouseup', onDragEnd);
623
+ document.addEventListener('touchmove', onDragMove, { passive: false });
624
+ document.addEventListener('touchend', onDragEnd);
368
625
  pEvent.preventDefault();
369
626
  }
370
627
 
371
- function onMouseMove(pEvent)
628
+ function onDragMove(pEvent)
372
629
  {
373
- if (!tmpSelf._sidebarDragging) return;
374
- let tmpNewWidth = tmpStartWidth + (pEvent.clientX - tmpStartX);
375
- tmpNewWidth = Math.max(150, Math.min(tmpNewWidth, 600));
376
- tmpWrap.style.width = tmpNewWidth + 'px';
630
+ if (!tmpSelf._sidebarDragging)
631
+ {
632
+ return;
633
+ }
634
+
635
+ let tmpPos = getClientPos(pEvent);
636
+
637
+ if (tmpSelf.isMobileDrawer())
638
+ {
639
+ // Vertical resize (top drawer)
640
+ let tmpNewHeight = tmpStartHeight + (tmpPos.y - tmpStartY);
641
+ let tmpMaxHeight = Math.round(window.innerHeight * 0.7);
642
+ tmpNewHeight = Math.max(80, Math.min(tmpNewHeight, tmpMaxHeight));
643
+ tmpWrap.style.height = tmpNewHeight + 'px';
644
+ }
645
+ else
646
+ {
647
+ // Horizontal resize (sidebar)
648
+ let tmpNewWidth = tmpStartWidth + (tmpPos.x - tmpStartX);
649
+ tmpNewWidth = Math.max(150, Math.min(tmpNewWidth, 600));
650
+ tmpWrap.style.width = tmpNewWidth + 'px';
651
+ }
652
+
653
+ pEvent.preventDefault();
377
654
  }
378
655
 
379
- function onMouseUp()
656
+ function onDragEnd()
380
657
  {
381
658
  tmpSelf._sidebarDragging = false;
382
659
  tmpHandle.classList.remove('dragging');
383
- document.removeEventListener('mousemove', onMouseMove);
384
- document.removeEventListener('mouseup', onMouseUp);
385
660
 
386
- // Persist width
661
+ document.removeEventListener('mousemove', onDragMove);
662
+ document.removeEventListener('mouseup', onDragEnd);
663
+ document.removeEventListener('touchmove', onDragMove);
664
+ document.removeEventListener('touchend', onDragEnd);
665
+
666
+ // Persist dimensions
387
667
  let tmpRemote = tmpSelf.pict.AppData.RetoldRemote;
388
- tmpRemote.SidebarWidth = tmpWrap.offsetWidth;
668
+ if (tmpSelf.isMobileDrawer())
669
+ {
670
+ tmpRemote.SidebarDrawerHeight = tmpWrap.offsetHeight;
671
+ }
672
+ else
673
+ {
674
+ tmpRemote.SidebarWidth = tmpWrap.offsetWidth;
675
+ }
389
676
  tmpSelf.pict.PictApplication.saveSettings();
390
677
 
391
678
  // Recalculate gallery columns
@@ -396,15 +683,119 @@ class RetoldRemoteLayoutView extends libPictView
396
683
  }
397
684
  }
398
685
 
399
- tmpHandle.addEventListener('mousedown', onMouseDown);
686
+ tmpHandle.addEventListener('mousedown', onDragStart);
687
+ tmpHandle.addEventListener('touchstart', onDragStart, { passive: false });
400
688
 
401
- // Double-click on resize handle collapses the sidebar
689
+ // Double-click/tap on resize handle collapses the sidebar
402
690
  tmpHandle.addEventListener('dblclick', function (pEvent)
403
691
  {
404
692
  pEvent.preventDefault();
405
693
  tmpSelf.toggleSidebar();
406
694
  });
407
695
  }
696
+
697
+ /**
698
+ * Toggle the right-side collections panel open/closed.
699
+ */
700
+ toggleCollectionsPanel()
701
+ {
702
+ let tmpManager = this.pict.providers['RetoldRemote-CollectionManager'];
703
+ if (tmpManager)
704
+ {
705
+ tmpManager.togglePanel();
706
+ }
707
+ }
708
+
709
+ /**
710
+ * Set up the resize handle for the collections panel (right side).
711
+ * Dragging LEFT increases width, dragging RIGHT decreases width.
712
+ */
713
+ _setupCollectionsResizeHandle()
714
+ {
715
+ let tmpHandle = document.querySelector('.retold-remote-collections-resize-handle');
716
+ let tmpWrap = document.getElementById('RetoldRemote-Collections-Wrap');
717
+ if (!tmpHandle || !tmpWrap)
718
+ {
719
+ return;
720
+ }
721
+
722
+ let tmpSelf = this;
723
+ let tmpStartX = 0;
724
+ let tmpStartWidth = 0;
725
+
726
+ function onDragStart(pEvent)
727
+ {
728
+ if (tmpWrap.classList.contains('collapsed'))
729
+ {
730
+ return;
731
+ }
732
+
733
+ pEvent.preventDefault();
734
+ tmpSelf._collectionsDragging = true;
735
+ tmpHandle.classList.add('dragging');
736
+
737
+ let tmpClientX = pEvent.touches ? pEvent.touches[0].clientX : pEvent.clientX;
738
+ tmpStartX = tmpClientX;
739
+ tmpStartWidth = tmpWrap.getBoundingClientRect().width;
740
+
741
+ document.addEventListener('mousemove', onDragMove);
742
+ document.addEventListener('mouseup', onDragEnd);
743
+ document.addEventListener('touchmove', onDragMove, { passive: false });
744
+ document.addEventListener('touchend', onDragEnd);
745
+ }
746
+
747
+ function onDragMove(pEvent)
748
+ {
749
+ if (!tmpSelf._collectionsDragging)
750
+ {
751
+ return;
752
+ }
753
+ pEvent.preventDefault();
754
+
755
+ let tmpClientX = pEvent.touches ? pEvent.touches[0].clientX : pEvent.clientX;
756
+ // Dragging left (negative deltaX) increases width
757
+ let tmpDelta = tmpStartX - tmpClientX;
758
+ let tmpNewWidth = Math.max(150, Math.min(600, tmpStartWidth + tmpDelta));
759
+ tmpWrap.style.width = tmpNewWidth + 'px';
760
+ }
761
+
762
+ function onDragEnd()
763
+ {
764
+ if (!tmpSelf._collectionsDragging)
765
+ {
766
+ return;
767
+ }
768
+
769
+ tmpSelf._collectionsDragging = false;
770
+ tmpHandle.classList.remove('dragging');
771
+
772
+ let tmpRemote = tmpSelf.pict.AppData.RetoldRemote;
773
+ tmpRemote.CollectionsPanelWidth = tmpWrap.getBoundingClientRect().width;
774
+ tmpSelf.pict.PictApplication.saveSettings();
775
+
776
+ document.removeEventListener('mousemove', onDragMove);
777
+ document.removeEventListener('mouseup', onDragEnd);
778
+ document.removeEventListener('touchmove', onDragMove);
779
+ document.removeEventListener('touchend', onDragEnd);
780
+
781
+ // Recalculate gallery columns
782
+ let tmpGalleryNav = tmpSelf.pict.providers['RetoldRemote-GalleryNavigation'];
783
+ if (tmpGalleryNav && typeof tmpGalleryNav.recalculateColumns === 'function')
784
+ {
785
+ tmpGalleryNav.recalculateColumns();
786
+ }
787
+ }
788
+
789
+ tmpHandle.addEventListener('mousedown', onDragStart);
790
+ tmpHandle.addEventListener('touchstart', onDragStart, { passive: false });
791
+
792
+ // Double-click collapses the collections panel
793
+ tmpHandle.addEventListener('dblclick', function (pEvent)
794
+ {
795
+ pEvent.preventDefault();
796
+ tmpSelf.toggleCollectionsPanel();
797
+ });
798
+ }
408
799
  }
409
800
 
410
801
  RetoldRemoteLayoutView.default_configuration = _ViewConfiguration;