retold-remote 0.0.1 → 0.0.2
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.
- package/html/index.html +2 -0
- package/package.json +20 -14
- package/source/Pict-Application-RetoldRemote.js +46 -5
- package/source/cli/RetoldRemote-CLI-Run.js +0 -0
- package/source/cli/RetoldRemote-Server-Setup.js +790 -8
- package/source/cli/commands/RetoldRemote-Command-Serve.js +34 -1
- package/source/providers/Pict-Provider-GalleryFilterSort.js +61 -9
- package/source/providers/Pict-Provider-GalleryNavigation.js +517 -18
- package/source/providers/Pict-Provider-RetoldRemote.js +11 -2
- package/source/providers/Pict-Provider-RetoldRemoteIcons.js +1 -0
- package/source/server/RetoldRemote-ArchiveService.js +830 -0
- package/source/server/RetoldRemote-AudioWaveformService.js +673 -0
- package/source/server/RetoldRemote-EbookService.js +242 -0
- package/source/server/RetoldRemote-MediaService.js +1 -1
- package/source/server/RetoldRemote-ToolDetector.js +31 -1
- package/source/server/RetoldRemote-VideoFrameService.js +486 -0
- package/source/views/PictView-Remote-AudioExplorer.js +1213 -0
- package/source/views/PictView-Remote-Gallery.js +141 -2
- package/source/views/PictView-Remote-Layout.js +18 -27
- package/source/views/PictView-Remote-MediaViewer.js +638 -39
- package/source/views/PictView-Remote-SettingsPanel.js +23 -0
- package/source/views/PictView-Remote-TopBar.js +121 -0
- package/source/views/PictView-Remote-VideoExplorer.js +1229 -0
- package/web-application/index.html +2 -0
- package/web-application/js/epub.min.js +1 -0
- package/web-application/retold-remote.js +7030 -1244
- package/web-application/retold-remote.js.map +1 -1
- package/web-application/retold-remote.min.js +13 -44
- package/web-application/retold-remote.min.js.map +1 -1
- package/web-application/retold-remote.compatible.js +0 -5764
- package/web-application/retold-remote.compatible.js.map +0 -1
- package/web-application/retold-remote.compatible.min.js +0 -120
- package/web-application/retold-remote.compatible.min.js.map +0 -1
|
@@ -186,6 +186,22 @@ class RetoldRemoteSettingsPanelView extends libPictView
|
|
|
186
186
|
+ ' onchange="pict.views[\'RetoldRemote-SettingsPanel\'].toggleDistractionFreeNav(this.checked)">';
|
|
187
187
|
tmpHTML += '</div>';
|
|
188
188
|
|
|
189
|
+
// Autoplay video
|
|
190
|
+
tmpHTML += '<div class="retold-remote-settings-row">';
|
|
191
|
+
tmpHTML += '<span class="retold-remote-settings-label">Autoplay video</span>';
|
|
192
|
+
tmpHTML += '<input type="checkbox" class="retold-remote-settings-checkbox"'
|
|
193
|
+
+ (tmpRemote.AutoplayVideo ? ' checked' : '')
|
|
194
|
+
+ ' onchange="pict.views[\'RetoldRemote-SettingsPanel\'].toggleAutoplay(\'AutoplayVideo\', this.checked)">';
|
|
195
|
+
tmpHTML += '</div>';
|
|
196
|
+
|
|
197
|
+
// Autoplay audio
|
|
198
|
+
tmpHTML += '<div class="retold-remote-settings-row">';
|
|
199
|
+
tmpHTML += '<span class="retold-remote-settings-label">Autoplay audio</span>';
|
|
200
|
+
tmpHTML += '<input type="checkbox" class="retold-remote-settings-checkbox"'
|
|
201
|
+
+ (tmpRemote.AutoplayAudio ? ' checked' : '')
|
|
202
|
+
+ ' onchange="pict.views[\'RetoldRemote-SettingsPanel\'].toggleAutoplay(\'AutoplayAudio\', this.checked)">';
|
|
203
|
+
tmpHTML += '</div>';
|
|
204
|
+
|
|
189
205
|
tmpHTML += '</div>'; // end gallery section
|
|
190
206
|
|
|
191
207
|
// Server capabilities
|
|
@@ -295,6 +311,13 @@ class RetoldRemoteSettingsPanelView extends libPictView
|
|
|
295
311
|
});
|
|
296
312
|
}
|
|
297
313
|
|
|
314
|
+
toggleAutoplay(pKey, pChecked)
|
|
315
|
+
{
|
|
316
|
+
let tmpRemote = this.pict.AppData.RetoldRemote;
|
|
317
|
+
tmpRemote[pKey] = pChecked;
|
|
318
|
+
this.pict.PictApplication.saveSettings();
|
|
319
|
+
}
|
|
320
|
+
|
|
298
321
|
toggleDistractionFreeNav(pChecked)
|
|
299
322
|
{
|
|
300
323
|
let tmpRemote = this.pict.AppData.RetoldRemote;
|
|
@@ -81,6 +81,53 @@ const _ViewConfiguration =
|
|
|
81
81
|
color: var(--retold-text-primary);
|
|
82
82
|
border-color: var(--retold-accent);
|
|
83
83
|
}
|
|
84
|
+
.retold-remote-topbar-filter-btn
|
|
85
|
+
{
|
|
86
|
+
position: relative;
|
|
87
|
+
padding: 4px 8px;
|
|
88
|
+
border: 1px solid var(--retold-border);
|
|
89
|
+
border-radius: 3px;
|
|
90
|
+
background: transparent;
|
|
91
|
+
color: var(--retold-text-muted);
|
|
92
|
+
font-size: 0.82rem;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
transition: color 0.15s, border-color 0.15s, background 0.15s;
|
|
95
|
+
font-family: inherit;
|
|
96
|
+
line-height: 1;
|
|
97
|
+
}
|
|
98
|
+
.retold-remote-topbar-filter-btn:hover
|
|
99
|
+
{
|
|
100
|
+
color: var(--retold-text-primary);
|
|
101
|
+
border-color: var(--retold-accent);
|
|
102
|
+
}
|
|
103
|
+
.retold-remote-topbar-filter-btn.filter-active
|
|
104
|
+
{
|
|
105
|
+
color: var(--retold-accent);
|
|
106
|
+
border-color: var(--retold-accent);
|
|
107
|
+
background: rgba(128, 128, 128, 0.1);
|
|
108
|
+
}
|
|
109
|
+
.retold-remote-topbar-filter-btn.filter-bar-open
|
|
110
|
+
{
|
|
111
|
+
color: var(--retold-text-primary);
|
|
112
|
+
border-color: var(--retold-text-muted);
|
|
113
|
+
background: rgba(128, 128, 128, 0.06);
|
|
114
|
+
}
|
|
115
|
+
.retold-remote-topbar-filter-badge
|
|
116
|
+
{
|
|
117
|
+
position: absolute;
|
|
118
|
+
top: -4px;
|
|
119
|
+
right: -4px;
|
|
120
|
+
min-width: 14px;
|
|
121
|
+
height: 14px;
|
|
122
|
+
line-height: 14px;
|
|
123
|
+
padding: 0 3px;
|
|
124
|
+
border-radius: 7px;
|
|
125
|
+
background: var(--retold-accent);
|
|
126
|
+
color: var(--retold-bg-tertiary);
|
|
127
|
+
font-size: 0.55rem;
|
|
128
|
+
font-weight: 700;
|
|
129
|
+
text-align: center;
|
|
130
|
+
}
|
|
84
131
|
`,
|
|
85
132
|
|
|
86
133
|
Templates:
|
|
@@ -93,6 +140,7 @@ const _ViewConfiguration =
|
|
|
93
140
|
<div class="retold-remote-topbar-location" id="RetoldRemote-TopBar-Location"></div>
|
|
94
141
|
<div class="retold-remote-topbar-info" id="RetoldRemote-TopBar-Info"></div>
|
|
95
142
|
<div class="retold-remote-topbar-actions">
|
|
143
|
+
<button class="retold-remote-topbar-filter-btn" id="RetoldRemote-TopBar-FilterBtn" onclick="pict.views['ContentEditor-TopBar'].toggleFilterBar()" title="Toggle filter bar (/)">◢</button>
|
|
96
144
|
<button class="retold-remote-topbar-btn" onclick="pict.views['ContentEditor-Layout'].toggleSidebar()" title="Toggle Sidebar">☰</button>
|
|
97
145
|
</div>
|
|
98
146
|
</div>
|
|
@@ -157,6 +205,79 @@ class RetoldRemoteTopBarView extends libPictView
|
|
|
157
205
|
tmpLocationEl.innerHTML = tmpHTML;
|
|
158
206
|
}
|
|
159
207
|
|
|
208
|
+
/**
|
|
209
|
+
* Toggle the filter bar visibility.
|
|
210
|
+
* If hidden, show it and focus the search box.
|
|
211
|
+
* If visible, hide it.
|
|
212
|
+
*/
|
|
213
|
+
toggleFilterBar()
|
|
214
|
+
{
|
|
215
|
+
let tmpRemote = this.pict.AppData.RetoldRemote;
|
|
216
|
+
tmpRemote.FilterBarVisible = !tmpRemote.FilterBarVisible;
|
|
217
|
+
|
|
218
|
+
let tmpGalleryView = this.pict.views['RetoldRemote-Gallery'];
|
|
219
|
+
if (tmpGalleryView)
|
|
220
|
+
{
|
|
221
|
+
tmpGalleryView.renderGallery();
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
this.updateFilterIcon();
|
|
225
|
+
|
|
226
|
+
// If we just opened the bar, focus the search input
|
|
227
|
+
if (tmpRemote.FilterBarVisible)
|
|
228
|
+
{
|
|
229
|
+
setTimeout(() =>
|
|
230
|
+
{
|
|
231
|
+
let tmpSearch = document.getElementById('RetoldRemote-Gallery-Search');
|
|
232
|
+
if (tmpSearch)
|
|
233
|
+
{
|
|
234
|
+
tmpSearch.focus();
|
|
235
|
+
}
|
|
236
|
+
}, 50);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Update the filter icon in the top bar to reflect active filter state.
|
|
242
|
+
*/
|
|
243
|
+
updateFilterIcon()
|
|
244
|
+
{
|
|
245
|
+
let tmpBtn = document.getElementById('RetoldRemote-TopBar-FilterBtn');
|
|
246
|
+
if (!tmpBtn)
|
|
247
|
+
{
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
let tmpRemote = this.pict.AppData.RetoldRemote;
|
|
252
|
+
let tmpFilterSort = this.pict.providers['RetoldRemote-GalleryFilterSort'];
|
|
253
|
+
let tmpActiveChipCount = tmpFilterSort ? tmpFilterSort.getActiveFilterChips().length : 0;
|
|
254
|
+
let tmpBarVisible = tmpRemote.FilterBarVisible || false;
|
|
255
|
+
|
|
256
|
+
// Reset classes
|
|
257
|
+
tmpBtn.classList.remove('filter-active', 'filter-bar-open');
|
|
258
|
+
|
|
259
|
+
if (tmpActiveChipCount > 0)
|
|
260
|
+
{
|
|
261
|
+
// Active filters: show funnel icon with badge
|
|
262
|
+
tmpBtn.classList.add('filter-active');
|
|
263
|
+
tmpBtn.innerHTML = '◓<span class="retold-remote-topbar-filter-badge">' + tmpActiveChipCount + '</span>';
|
|
264
|
+
tmpBtn.title = tmpActiveChipCount + ' active filter' + (tmpActiveChipCount > 1 ? 's' : '') + ' (/)';
|
|
265
|
+
}
|
|
266
|
+
else if (tmpBarVisible)
|
|
267
|
+
{
|
|
268
|
+
// Bar open but no filters: show open-state icon
|
|
269
|
+
tmpBtn.classList.add('filter-bar-open');
|
|
270
|
+
tmpBtn.innerHTML = '◢';
|
|
271
|
+
tmpBtn.title = 'Hide filter bar (/)';
|
|
272
|
+
}
|
|
273
|
+
else
|
|
274
|
+
{
|
|
275
|
+
// Default: no filters, bar hidden
|
|
276
|
+
tmpBtn.innerHTML = '◢';
|
|
277
|
+
tmpBtn.title = 'Toggle filter bar (/)';
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
160
281
|
/**
|
|
161
282
|
* Update the info display with folder summary.
|
|
162
283
|
*/
|