retold-remote 0.0.4 → 0.0.6

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 (63) hide show
  1. package/docs/README.md +181 -0
  2. package/docs/_cover.md +14 -0
  3. package/docs/_sidebar.md +10 -0
  4. package/docs/_topbar.md +3 -0
  5. package/docs/audio-viewer.md +133 -0
  6. package/docs/ebook-reader.md +90 -0
  7. package/docs/image-viewer.md +90 -0
  8. package/docs/server-setup.md +262 -0
  9. package/docs/video-viewer.md +134 -0
  10. package/html/docs.html +59 -0
  11. package/package.json +21 -7
  12. package/source/Pict-Application-RetoldRemote.js +143 -2
  13. package/source/RetoldRemote-ExtensionMaps.js +33 -0
  14. package/source/cli/RetoldRemote-Server-Setup.js +82 -67
  15. package/source/cli/commands/RetoldRemote-Command-Serve.js +5 -26
  16. package/source/providers/Pict-Provider-CollectionManager.js +934 -0
  17. package/source/providers/Pict-Provider-FormattingUtilities.js +109 -0
  18. package/source/providers/Pict-Provider-GalleryFilterSort.js +2 -11
  19. package/source/providers/Pict-Provider-GalleryNavigation.js +270 -353
  20. package/source/providers/Pict-Provider-RetoldRemoteIcons.js +52 -0
  21. package/source/providers/Pict-Provider-ToastNotification.js +96 -0
  22. package/source/providers/keyboard-handlers/KeyHandler-AudioExplorer.js +88 -0
  23. package/source/providers/keyboard-handlers/KeyHandler-Gallery.js +190 -0
  24. package/source/providers/keyboard-handlers/KeyHandler-Sidebar.js +65 -0
  25. package/source/providers/keyboard-handlers/KeyHandler-VideoExplorer.js +57 -0
  26. package/source/providers/keyboard-handlers/KeyHandler-Viewer.js +197 -0
  27. package/source/server/RetoldRemote-ArchiveService.js +2 -12
  28. package/source/server/RetoldRemote-AudioWaveformService.js +7 -16
  29. package/source/server/RetoldRemote-CollectionService.js +684 -0
  30. package/source/server/RetoldRemote-EbookService.js +7 -16
  31. package/source/server/RetoldRemote-MediaService.js +3 -14
  32. package/source/server/RetoldRemote-ParimeCache.js +349 -0
  33. package/source/server/RetoldRemote-ThumbnailCache.js +52 -20
  34. package/source/server/RetoldRemote-VideoFrameService.js +7 -15
  35. package/source/views/PictView-Remote-AudioExplorer.js +10 -43
  36. package/source/views/PictView-Remote-CollectionsPanel.js +1087 -0
  37. package/source/views/PictView-Remote-Gallery.js +237 -44
  38. package/source/views/PictView-Remote-ImageViewer.js +1 -34
  39. package/source/views/PictView-Remote-Layout.js +410 -20
  40. package/source/views/PictView-Remote-MediaViewer.js +338 -51
  41. package/source/views/PictView-Remote-SettingsPanel.js +155 -138
  42. package/source/views/PictView-Remote-TopBar.js +615 -14
  43. package/source/views/PictView-Remote-VLCSetup.js +766 -0
  44. package/source/views/PictView-Remote-VideoExplorer.js +20 -54
  45. package/web-application/css/docuserve.css +73 -0
  46. package/web-application/docs/README.md +181 -0
  47. package/web-application/docs/_cover.md +14 -0
  48. package/web-application/docs/_sidebar.md +10 -0
  49. package/web-application/docs/_topbar.md +3 -0
  50. package/web-application/docs/audio-viewer.md +133 -0
  51. package/web-application/docs/ebook-reader.md +90 -0
  52. package/web-application/docs/image-viewer.md +90 -0
  53. package/web-application/docs/server-setup.md +262 -0
  54. package/web-application/docs/video-viewer.md +134 -0
  55. package/web-application/docs.html +59 -0
  56. package/web-application/js/pict-docuserve.min.js +58 -0
  57. package/web-application/js/pict.min.js +2 -2
  58. package/web-application/js/pict.min.js.map +1 -1
  59. package/web-application/retold-remote.js +2558 -439
  60. package/web-application/retold-remote.js.map +1 -1
  61. package/web-application/retold-remote.min.js +41 -11
  62. package/web-application/retold-remote.min.js.map +1 -1
  63. package/server.js +0 -43
@@ -456,8 +456,8 @@ const _ViewConfiguration =
456
456
  {
457
457
  display: flex;
458
458
  align-items: center;
459
- gap: 12px;
460
- padding: 6px 12px;
459
+ gap: 8px;
460
+ padding: 6px 10px;
461
461
  border-radius: 4px;
462
462
  cursor: pointer;
463
463
  transition: background 0.1s;
@@ -486,21 +486,85 @@ const _ViewConfiguration =
486
486
  text-overflow: ellipsis;
487
487
  white-space: nowrap;
488
488
  }
489
+ .retold-remote-list-ext
490
+ {
491
+ flex-shrink: 0;
492
+ width: 42px;
493
+ text-align: right;
494
+ font-size: 0.65rem;
495
+ color: var(--retold-text-dim);
496
+ text-transform: uppercase;
497
+ overflow: hidden;
498
+ text-overflow: ellipsis;
499
+ white-space: nowrap;
500
+ }
489
501
  .retold-remote-list-size
490
502
  {
491
503
  flex-shrink: 0;
492
- width: 80px;
504
+ width: 56px;
493
505
  text-align: right;
494
- font-size: 0.72rem;
506
+ font-size: 0.68rem;
495
507
  color: var(--retold-text-dim);
508
+ white-space: nowrap;
496
509
  }
497
510
  .retold-remote-list-date
498
511
  {
499
512
  flex-shrink: 0;
500
- width: 140px;
513
+ width: 72px;
501
514
  text-align: right;
502
- font-size: 0.72rem;
515
+ font-size: 0.68rem;
503
516
  color: var(--retold-text-dim);
517
+ white-space: nowrap;
518
+ }
519
+ /* Long-press tooltip */
520
+ .retold-remote-longpress-tooltip
521
+ {
522
+ position: fixed;
523
+ z-index: 10000;
524
+ max-width: 80vw;
525
+ padding: 6px 12px;
526
+ border-radius: 4px;
527
+ background: var(--retold-bg-secondary);
528
+ border: 1px solid var(--retold-border);
529
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
530
+ color: var(--retold-text-primary);
531
+ font-size: 0.78rem;
532
+ word-break: break-all;
533
+ pointer-events: none;
534
+ }
535
+ /* Column toggle buttons in filter panel */
536
+ .retold-remote-filter-col-toggles
537
+ {
538
+ display: flex;
539
+ flex-wrap: wrap;
540
+ gap: 6px;
541
+ }
542
+ .retold-remote-filter-col-toggle
543
+ {
544
+ display: inline-flex;
545
+ align-items: center;
546
+ gap: 4px;
547
+ padding: 3px 10px;
548
+ border: 1px solid var(--retold-border);
549
+ border-radius: 3px;
550
+ background: transparent;
551
+ color: var(--retold-text-muted);
552
+ font-size: 0.72rem;
553
+ cursor: pointer;
554
+ font-family: inherit;
555
+ transition: color 0.15s, border-color 0.15s, background 0.15s;
556
+ user-select: none;
557
+ }
558
+ .retold-remote-filter-col-toggle:hover
559
+ {
560
+ color: var(--retold-text-secondary);
561
+ border-color: var(--retold-scrollbar-hover);
562
+ }
563
+ .retold-remote-filter-col-toggle.active
564
+ {
565
+ color: var(--retold-accent);
566
+ border-color: var(--retold-accent);
567
+ background: rgba(128, 128, 128, 0.1);
504
568
  }
505
569
  /* Empty state */
506
570
  .retold-remote-empty
@@ -833,7 +897,7 @@ class RetoldRemoteGalleryView extends libPictView
833
897
  let tmpSearchValue = tmpRemote.SearchQuery || '';
834
898
  tmpHTML += '<input type="text" class="retold-remote-gallery-search" id="RetoldRemote-Gallery-Search" '
835
899
  + 'placeholder="Search files... (/)" '
836
- + 'value="' + this._escapeHTML(tmpSearchValue) + '" '
900
+ + 'value="' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpSearchValue) + '" '
837
901
  + 'oninput="pict.views[\'RetoldRemote-Gallery\'].onSearchInput(this.value)">';
838
902
 
839
903
  // Case sensitivity and regex checkboxes
@@ -850,7 +914,7 @@ class RetoldRemoteGalleryView extends libPictView
850
914
  + '.*</label>';
851
915
  if (tmpRemote._searchRegexError)
852
916
  {
853
- tmpHTML += '<span class="retold-remote-gallery-search-regex-error" title="' + this._escapeHTML(tmpRemote._searchRegexError) + '">invalid regex</span>';
917
+ tmpHTML += '<span class="retold-remote-gallery-search-regex-error" title="' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpRemote._searchRegexError) + '">invalid regex</span>';
854
918
  }
855
919
  tmpHTML += '</div>';
856
920
  tmpHTML += '</div>';
@@ -930,6 +994,25 @@ class RetoldRemoteGalleryView extends libPictView
930
994
  tmpHTML += '</div>';
931
995
  tmpHTML += '</div>';
932
996
 
997
+ // List columns visibility (only relevant in list mode)
998
+ tmpHTML += '<div class="retold-remote-filter-section">';
999
+ tmpHTML += '<div class="retold-remote-filter-section-title">List Columns</div>';
1000
+ tmpHTML += '<div class="retold-remote-filter-col-toggles">';
1001
+ let tmpShowExt = tmpRemote.ListShowExtension !== false;
1002
+ let tmpShowSize = tmpRemote.ListShowSize !== false;
1003
+ let tmpShowDate = tmpRemote.ListShowDate !== false;
1004
+ tmpHTML += '<button class="retold-remote-filter-col-toggle' + (tmpShowExt ? ' active' : '') + '" '
1005
+ + 'onclick="pict.views[\'RetoldRemote-Gallery\'].toggleListColumn(\'ListShowExtension\')">'
1006
+ + 'Ext</button>';
1007
+ tmpHTML += '<button class="retold-remote-filter-col-toggle' + (tmpShowSize ? ' active' : '') + '" '
1008
+ + 'onclick="pict.views[\'RetoldRemote-Gallery\'].toggleListColumn(\'ListShowSize\')">'
1009
+ + 'Size</button>';
1010
+ tmpHTML += '<button class="retold-remote-filter-col-toggle' + (tmpShowDate ? ' active' : '') + '" '
1011
+ + 'onclick="pict.views[\'RetoldRemote-Gallery\'].toggleListColumn(\'ListShowDate\')">'
1012
+ + 'Date</button>';
1013
+ tmpHTML += '</div>';
1014
+ tmpHTML += '</div>';
1015
+
933
1016
  // Presets
934
1017
  tmpHTML += '<div class="retold-remote-filter-section">';
935
1018
  tmpHTML += '<div class="retold-remote-filter-section-title">Presets</div>';
@@ -965,7 +1048,7 @@ class RetoldRemoteGalleryView extends libPictView
965
1048
  tmpHTML += '<option value="">Load preset...</option>';
966
1049
  for (let i = 0; i < tmpPresets.length; i++)
967
1050
  {
968
- tmpHTML += '<option value="' + i + '">' + this._escapeHTML(tmpPresets[i].Name) + '</option>';
1051
+ tmpHTML += '<option value="' + i + '">' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpPresets[i].Name) + '</option>';
969
1052
  }
970
1053
  tmpHTML += '</select>';
971
1054
  tmpHTML += '<button class="retold-remote-filter-btn-sm" onclick="pict.views[\'RetoldRemote-Gallery\'].deleteSelectedPreset()">\u2715</button>';
@@ -1006,9 +1089,9 @@ class RetoldRemoteGalleryView extends libPictView
1006
1089
  {
1007
1090
  let tmpChip = tmpChips[i];
1008
1091
  tmpHTML += '<span class="retold-remote-filter-chip">'
1009
- + this._escapeHTML(tmpChip.label)
1092
+ + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpChip.label)
1010
1093
  + ' <button class="retold-remote-filter-chip-remove" '
1011
- + 'onclick="pict.views[\'RetoldRemote-Gallery\'].removeFilterChip(\'' + this._escapeHTML(tmpChip.key) + '\')">&times;</button>'
1094
+ + 'onclick="pict.views[\'RetoldRemote-Gallery\'].removeFilterChip(\'' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpChip.key) + '\')">&times;</button>'
1012
1095
  + '</span>';
1013
1096
  }
1014
1097
  tmpHTML += '<button class="retold-remote-filter-chip-clear" onclick="pict.views[\'RetoldRemote-Gallery\'].clearAllFilters()">Clear all</button>';
@@ -1059,7 +1142,7 @@ class RetoldRemoteGalleryView extends libPictView
1059
1142
  let tmpThumbURL = tmpProvider.getThumbnailURL(tmpItem.Path, 400, 300);
1060
1143
  if (tmpThumbURL)
1061
1144
  {
1062
- tmpHTML += '<img data-src="' + tmpThumbURL + '" alt="' + this._escapeHTML(tmpItem.Name) + '" loading="lazy">';
1145
+ tmpHTML += '<img data-src="' + tmpThumbURL + '" alt="' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpItem.Name) + '" loading="lazy">';
1063
1146
  }
1064
1147
  else
1065
1148
  {
@@ -1074,7 +1157,7 @@ class RetoldRemoteGalleryView extends libPictView
1074
1157
  let tmpThumbURL = tmpProvider.getThumbnailURL(tmpItem.Path, 400, 300);
1075
1158
  if (tmpThumbURL)
1076
1159
  {
1077
- tmpHTML += '<img data-src="' + tmpThumbURL + '" alt="' + this._escapeHTML(tmpItem.Name) + '" loading="lazy">';
1160
+ tmpHTML += '<img data-src="' + tmpThumbURL + '" alt="' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpItem.Name) + '" loading="lazy">';
1078
1161
  }
1079
1162
  else
1080
1163
  {
@@ -1105,12 +1188,12 @@ class RetoldRemoteGalleryView extends libPictView
1105
1188
  tmpHTML += '</div>'; // end thumb
1106
1189
 
1107
1190
  // Label
1108
- tmpHTML += '<div class="retold-remote-tile-label" title="' + this._escapeHTML(tmpItem.Name) + '">' + this._escapeHTML(tmpItem.Name) + '</div>';
1191
+ tmpHTML += '<div class="retold-remote-tile-label" title="' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpItem.Name) + '">' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpItem.Name) + '</div>';
1109
1192
 
1110
1193
  // Meta
1111
1194
  if (tmpItem.Type === 'file' && tmpItem.Size !== undefined)
1112
1195
  {
1113
- tmpHTML += '<div class="retold-remote-tile-meta">' + this._formatFileSize(tmpItem.Size) + '</div>';
1196
+ tmpHTML += '<div class="retold-remote-tile-meta">' + this.pict.providers['RetoldRemote-FormattingUtilities'].formatFileSize(tmpItem.Size) + '</div>';
1114
1197
  }
1115
1198
  else if (tmpItem.Type === 'folder')
1116
1199
  {
@@ -1118,7 +1201,7 @@ class RetoldRemoteGalleryView extends libPictView
1118
1201
  }
1119
1202
  else if (tmpItem.Type === 'archive')
1120
1203
  {
1121
- tmpHTML += '<div class="retold-remote-tile-meta">Archive' + (tmpItem.Size ? ' · ' + this._formatFileSize(tmpItem.Size) : '') + '</div>';
1204
+ tmpHTML += '<div class="retold-remote-tile-meta">Archive' + (tmpItem.Size ? ' · ' + this.pict.providers['RetoldRemote-FormattingUtilities'].formatFileSize(tmpItem.Size) : '') + '</div>';
1122
1205
  }
1123
1206
 
1124
1207
  tmpHTML += '</div>'; // end tile
@@ -1134,6 +1217,11 @@ class RetoldRemoteGalleryView extends libPictView
1134
1217
  */
1135
1218
  _buildListHTML(pItems, pCursorIndex)
1136
1219
  {
1220
+ let tmpRemote = this.pict.AppData.RetoldRemote;
1221
+ let tmpShowExt = tmpRemote.ListShowExtension !== false;
1222
+ let tmpShowSize = tmpRemote.ListShowSize !== false;
1223
+ let tmpShowDate = tmpRemote.ListShowDate !== false;
1224
+
1137
1225
  let tmpHTML = '<div class="retold-remote-list">';
1138
1226
  let tmpIconProvider = this.pict.providers['RetoldRemote-Icons'];
1139
1227
 
@@ -1153,24 +1241,51 @@ class RetoldRemoteGalleryView extends libPictView
1153
1241
  + 'ondblclick="pict.views[\'RetoldRemote-Gallery\'].onTileDoubleClick(' + i + ')">';
1154
1242
 
1155
1243
  tmpHTML += '<div class="retold-remote-list-icon">' + tmpIcon + '</div>';
1156
- tmpHTML += '<div class="retold-remote-list-name">' + this._escapeHTML(tmpItem.Name) + '</div>';
1157
-
1158
- if ((tmpItem.Type === 'file' || tmpItem.Type === 'archive') && tmpItem.Size !== undefined)
1159
- {
1160
- tmpHTML += '<div class="retold-remote-list-size">' + this._formatFileSize(tmpItem.Size) + '</div>';
1161
- }
1162
- else
1244
+ tmpHTML += '<div class="retold-remote-list-name" title="' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpItem.Name) + '"'
1245
+ + ' ontouchstart="pict.views[\'RetoldRemote-Gallery\']._onNameTouchStart(event, \'' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpItem.Name).replace(/'/g, '\\&#39;') + '\')"'
1246
+ + ' ontouchend="pict.views[\'RetoldRemote-Gallery\']._onNameTouchEnd(event)"'
1247
+ + ' ontouchcancel="pict.views[\'RetoldRemote-Gallery\']._onNameTouchEnd(event)"'
1248
+ + '>' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpItem.Name) + '</div>';
1249
+
1250
+ // Extension column
1251
+ if (tmpShowExt)
1163
1252
  {
1164
- tmpHTML += '<div class="retold-remote-list-size"></div>';
1253
+ let tmpExt = '';
1254
+ if (tmpItem.Type === 'file' || tmpItem.Type === 'archive')
1255
+ {
1256
+ tmpExt = (tmpItem.Extension || '').replace(/^\./, '').toLowerCase();
1257
+ }
1258
+ else if (tmpItem.Type === 'folder')
1259
+ {
1260
+ tmpExt = '';
1261
+ }
1262
+ tmpHTML += '<div class="retold-remote-list-ext">' + tmpExt + '</div>';
1165
1263
  }
1166
1264
 
1167
- if (tmpItem.Modified)
1265
+ // Size column
1266
+ if (tmpShowSize)
1168
1267
  {
1169
- tmpHTML += '<div class="retold-remote-list-date">' + new Date(tmpItem.Modified).toLocaleDateString() + '</div>';
1268
+ if ((tmpItem.Type === 'file' || tmpItem.Type === 'archive') && tmpItem.Size !== undefined)
1269
+ {
1270
+ tmpHTML += '<div class="retold-remote-list-size">' + this.pict.providers['RetoldRemote-FormattingUtilities'].formatFileSize(tmpItem.Size) + '</div>';
1271
+ }
1272
+ else
1273
+ {
1274
+ tmpHTML += '<div class="retold-remote-list-size"></div>';
1275
+ }
1170
1276
  }
1171
- else
1277
+
1278
+ // Date column
1279
+ if (tmpShowDate)
1172
1280
  {
1173
- tmpHTML += '<div class="retold-remote-list-date"></div>';
1281
+ if (tmpItem.Modified)
1282
+ {
1283
+ tmpHTML += '<div class="retold-remote-list-date">' + this.pict.providers['RetoldRemote-FormattingUtilities'].formatShortDate(tmpItem.Modified) + '</div>';
1284
+ }
1285
+ else
1286
+ {
1287
+ tmpHTML += '<div class="retold-remote-list-date"></div>';
1288
+ }
1174
1289
  }
1175
1290
 
1176
1291
  tmpHTML += '</div>';
@@ -1528,6 +1643,100 @@ class RetoldRemoteGalleryView extends libPictView
1528
1643
  this.renderGallery();
1529
1644
  }
1530
1645
 
1646
+ // ──────────────────────────────────────────────
1647
+ // List column visibility
1648
+ // ──────────────────────────────────────────────
1649
+
1650
+ /**
1651
+ * Toggle a list column on or off.
1652
+ */
1653
+ toggleListColumn(pColumnKey)
1654
+ {
1655
+ let tmpRemote = this.pict.AppData.RetoldRemote;
1656
+ let tmpCurrent = tmpRemote[pColumnKey];
1657
+ // Default is true (shown), so undefined/true -> false, false -> true
1658
+ tmpRemote[pColumnKey] = (tmpCurrent === false) ? true : false;
1659
+
1660
+ this.renderGallery();
1661
+
1662
+ if (this.pict.PictApplication && this.pict.PictApplication.saveSettings)
1663
+ {
1664
+ this.pict.PictApplication.saveSettings();
1665
+ }
1666
+ }
1667
+
1668
+ // ──────────────────────────────────────────────
1669
+ // Long-press tooltip for file names
1670
+ // ──────────────────────────────────────────────
1671
+
1672
+ /**
1673
+ * Handle touch start on a file name for long-press tooltip.
1674
+ */
1675
+ _onNameTouchStart(pEvent, pName)
1676
+ {
1677
+ let tmpSelf = this;
1678
+ // Clear any existing timer
1679
+ this._clearLongPressTimer();
1680
+
1681
+ this._longPressTimer = setTimeout(function()
1682
+ {
1683
+ tmpSelf._showLongPressTooltip(pEvent, pName);
1684
+ }, 500);
1685
+ }
1686
+
1687
+ /**
1688
+ * Handle touch end / cancel — dismiss tooltip and timer.
1689
+ */
1690
+ _onNameTouchEnd(pEvent)
1691
+ {
1692
+ this._clearLongPressTimer();
1693
+ this._hideLongPressTooltip();
1694
+ }
1695
+
1696
+ _clearLongPressTimer()
1697
+ {
1698
+ if (this._longPressTimer)
1699
+ {
1700
+ clearTimeout(this._longPressTimer);
1701
+ this._longPressTimer = null;
1702
+ }
1703
+ }
1704
+
1705
+ _showLongPressTooltip(pEvent, pName)
1706
+ {
1707
+ this._hideLongPressTooltip();
1708
+
1709
+ let tmpTooltip = document.createElement('div');
1710
+ tmpTooltip.className = 'retold-remote-longpress-tooltip';
1711
+ tmpTooltip.textContent = pName;
1712
+
1713
+ // Position near the touch point
1714
+ let tmpTouch = pEvent.touches && pEvent.touches[0];
1715
+ if (tmpTouch)
1716
+ {
1717
+ tmpTooltip.style.left = Math.min(tmpTouch.clientX, window.innerWidth - 20) + 'px';
1718
+ tmpTooltip.style.top = (tmpTouch.clientY - 50) + 'px';
1719
+ }
1720
+
1721
+ document.body.appendChild(tmpTooltip);
1722
+ this._longPressTooltipEl = tmpTooltip;
1723
+
1724
+ // Prevent the default context menu
1725
+ pEvent.preventDefault();
1726
+ }
1727
+
1728
+ _hideLongPressTooltip()
1729
+ {
1730
+ if (this._longPressTooltipEl)
1731
+ {
1732
+ if (this._longPressTooltipEl.parentNode)
1733
+ {
1734
+ this._longPressTooltipEl.parentNode.removeChild(this._longPressTooltipEl);
1735
+ }
1736
+ this._longPressTooltipEl = null;
1737
+ }
1738
+ }
1739
+
1531
1740
  // ──────────────────────────────────────────────
1532
1741
  // Utilities
1533
1742
  // ──────────────────────────────────────────────
@@ -1553,22 +1762,6 @@ class RetoldRemoteGalleryView extends libPictView
1553
1762
  if (tmpExt === 'pdf') return 'document';
1554
1763
  return 'other';
1555
1764
  }
1556
-
1557
- _formatFileSize(pBytes)
1558
- {
1559
- if (!pBytes || pBytes === 0) return '0 B';
1560
- let tmpUnits = ['B', 'KB', 'MB', 'GB', 'TB'];
1561
- let tmpIndex = Math.floor(Math.log(pBytes) / Math.log(1024));
1562
- if (tmpIndex >= tmpUnits.length) tmpIndex = tmpUnits.length - 1;
1563
- let tmpSize = pBytes / Math.pow(1024, tmpIndex);
1564
- return tmpSize.toFixed(tmpIndex === 0 ? 0 : 1) + ' ' + tmpUnits[tmpIndex];
1565
- }
1566
-
1567
- _escapeHTML(pText)
1568
- {
1569
- if (!pText) return '';
1570
- return pText.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
1571
- }
1572
1765
  }
1573
1766
 
1574
1767
  RetoldRemoteGalleryView.default_configuration = _ViewConfiguration;
@@ -48,7 +48,6 @@ class RetoldRemoteImageViewerView extends libPictView
48
48
  this._naturalWidth = 0;
49
49
  this._naturalHeight = 0;
50
50
  this._resizeHandler = null;
51
- this._indicatorTimeout = null;
52
51
  }
53
52
 
54
53
  /**
@@ -310,33 +309,7 @@ class RetoldRemoteImageViewerView extends libPictView
310
309
 
311
310
  let tmpLabel = tmpLabels[pMode] || pMode;
312
311
 
313
- // Create or reuse the indicator element
314
- let tmpIndicator = document.getElementById('RetoldRemote-FitIndicator');
315
- if (!tmpIndicator)
316
- {
317
- tmpIndicator = document.createElement('div');
318
- tmpIndicator.id = 'RetoldRemote-FitIndicator';
319
- tmpIndicator.className = 'retold-remote-fit-indicator';
320
-
321
- let tmpContainer = document.querySelector('.retold-remote-viewer-body');
322
- if (tmpContainer)
323
- {
324
- tmpContainer.appendChild(tmpIndicator);
325
- }
326
- }
327
-
328
- tmpIndicator.textContent = tmpLabel;
329
- tmpIndicator.classList.add('visible');
330
-
331
- if (this._indicatorTimeout)
332
- {
333
- clearTimeout(this._indicatorTimeout);
334
- }
335
-
336
- this._indicatorTimeout = setTimeout(function ()
337
- {
338
- tmpIndicator.classList.remove('visible');
339
- }, 1200);
312
+ this.pict.providers['RetoldRemote-ToastNotification'].showOverlayIndicator(tmpLabel, 1200);
340
313
  }
341
314
 
342
315
  /**
@@ -349,12 +322,6 @@ class RetoldRemoteImageViewerView extends libPictView
349
322
  window.removeEventListener('resize', this._resizeHandler);
350
323
  this._resizeHandler = null;
351
324
  }
352
-
353
- if (this._indicatorTimeout)
354
- {
355
- clearTimeout(this._indicatorTimeout);
356
- this._indicatorTimeout = null;
357
- }
358
325
  }
359
326
  }
360
327