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.
- package/docs/README.md +181 -0
- package/docs/_cover.md +14 -0
- package/docs/_sidebar.md +10 -0
- package/docs/_topbar.md +3 -0
- package/docs/audio-viewer.md +133 -0
- package/docs/ebook-reader.md +90 -0
- package/docs/image-viewer.md +90 -0
- package/docs/server-setup.md +262 -0
- package/docs/video-viewer.md +134 -0
- package/html/docs.html +59 -0
- package/package.json +21 -7
- package/source/Pict-Application-RetoldRemote.js +143 -2
- package/source/RetoldRemote-ExtensionMaps.js +33 -0
- package/source/cli/RetoldRemote-Server-Setup.js +82 -67
- package/source/cli/commands/RetoldRemote-Command-Serve.js +5 -26
- package/source/providers/Pict-Provider-CollectionManager.js +934 -0
- package/source/providers/Pict-Provider-FormattingUtilities.js +109 -0
- package/source/providers/Pict-Provider-GalleryFilterSort.js +2 -11
- package/source/providers/Pict-Provider-GalleryNavigation.js +270 -353
- package/source/providers/Pict-Provider-RetoldRemoteIcons.js +52 -0
- package/source/providers/Pict-Provider-ToastNotification.js +96 -0
- package/source/providers/keyboard-handlers/KeyHandler-AudioExplorer.js +88 -0
- package/source/providers/keyboard-handlers/KeyHandler-Gallery.js +190 -0
- package/source/providers/keyboard-handlers/KeyHandler-Sidebar.js +65 -0
- package/source/providers/keyboard-handlers/KeyHandler-VideoExplorer.js +57 -0
- package/source/providers/keyboard-handlers/KeyHandler-Viewer.js +197 -0
- package/source/server/RetoldRemote-ArchiveService.js +2 -12
- package/source/server/RetoldRemote-AudioWaveformService.js +7 -16
- package/source/server/RetoldRemote-CollectionService.js +684 -0
- package/source/server/RetoldRemote-EbookService.js +7 -16
- package/source/server/RetoldRemote-MediaService.js +3 -14
- package/source/server/RetoldRemote-ParimeCache.js +349 -0
- package/source/server/RetoldRemote-ThumbnailCache.js +52 -20
- package/source/server/RetoldRemote-VideoFrameService.js +7 -15
- package/source/views/PictView-Remote-AudioExplorer.js +10 -43
- package/source/views/PictView-Remote-CollectionsPanel.js +1087 -0
- package/source/views/PictView-Remote-Gallery.js +237 -44
- package/source/views/PictView-Remote-ImageViewer.js +1 -34
- package/source/views/PictView-Remote-Layout.js +410 -20
- package/source/views/PictView-Remote-MediaViewer.js +338 -51
- package/source/views/PictView-Remote-SettingsPanel.js +155 -138
- package/source/views/PictView-Remote-TopBar.js +615 -14
- package/source/views/PictView-Remote-VLCSetup.js +766 -0
- package/source/views/PictView-Remote-VideoExplorer.js +20 -54
- package/web-application/css/docuserve.css +73 -0
- package/web-application/docs/README.md +181 -0
- package/web-application/docs/_cover.md +14 -0
- package/web-application/docs/_sidebar.md +10 -0
- package/web-application/docs/_topbar.md +3 -0
- package/web-application/docs/audio-viewer.md +133 -0
- package/web-application/docs/ebook-reader.md +90 -0
- package/web-application/docs/image-viewer.md +90 -0
- package/web-application/docs/server-setup.md +262 -0
- package/web-application/docs/video-viewer.md +134 -0
- package/web-application/docs.html +59 -0
- package/web-application/js/pict-docuserve.min.js +58 -0
- package/web-application/js/pict.min.js +2 -2
- package/web-application/js/pict.min.js.map +1 -1
- package/web-application/retold-remote.js +2558 -439
- package/web-application/retold-remote.js.map +1 -1
- package/web-application/retold-remote.min.js +41 -11
- package/web-application/retold-remote.min.js.map +1 -1
- package/server.js +0 -43
|
@@ -77,43 +77,25 @@ const _ViewConfiguration =
|
|
|
77
77
|
{
|
|
78
78
|
color: var(--retold-danger-muted);
|
|
79
79
|
}
|
|
80
|
-
.retold-remote-settings-
|
|
80
|
+
.retold-remote-settings-vlc-btn
|
|
81
81
|
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
color: var(--retold-text-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
{
|
|
95
|
-
display: flex;
|
|
96
|
-
justify-content: space-between;
|
|
97
|
-
align-items: center;
|
|
98
|
-
padding: 2px 0;
|
|
99
|
-
}
|
|
100
|
-
.retold-remote-settings-shortcut-desc
|
|
101
|
-
{
|
|
102
|
-
color: var(--retold-text-dim);
|
|
103
|
-
font-size: 0.72rem;
|
|
82
|
+
display: block;
|
|
83
|
+
width: 100%;
|
|
84
|
+
padding: 8px 12px;
|
|
85
|
+
border: 1px solid var(--retold-border);
|
|
86
|
+
border-radius: 4px;
|
|
87
|
+
background: var(--retold-bg-secondary);
|
|
88
|
+
color: var(--retold-text-secondary);
|
|
89
|
+
font-size: 0.75rem;
|
|
90
|
+
font-family: inherit;
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
text-align: left;
|
|
93
|
+
transition: background 0.15s, color 0.15s;
|
|
104
94
|
}
|
|
105
|
-
.retold-remote-settings-
|
|
95
|
+
.retold-remote-settings-vlc-btn:hover
|
|
106
96
|
{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
border: 1px solid var(--retold-border);
|
|
110
|
-
border-radius: 3px;
|
|
111
|
-
background: var(--retold-bg-primary);
|
|
112
|
-
color: var(--retold-accent);
|
|
113
|
-
font-size: 0.68rem;
|
|
114
|
-
font-family: var(--retold-font-mono, monospace);
|
|
115
|
-
min-width: 18px;
|
|
116
|
-
text-align: center;
|
|
97
|
+
background: var(--retold-bg-hover);
|
|
98
|
+
color: var(--retold-text-primary);
|
|
117
99
|
}
|
|
118
100
|
`
|
|
119
101
|
};
|
|
@@ -189,6 +171,15 @@ class RetoldRemoteSettingsPanelView extends libPictView
|
|
|
189
171
|
tmpHTML += '<div class="retold-remote-settings-section">';
|
|
190
172
|
tmpHTML += '<div class="retold-remote-settings-section-title">Gallery</div>';
|
|
191
173
|
|
|
174
|
+
// View mode
|
|
175
|
+
tmpHTML += '<div class="retold-remote-settings-row">';
|
|
176
|
+
tmpHTML += '<span class="retold-remote-settings-label">View mode</span>';
|
|
177
|
+
tmpHTML += '<select class="retold-remote-settings-select" onchange="pict.views[\'RetoldRemote-SettingsPanel\'].changeSetting(\'ViewMode\', this.value)">';
|
|
178
|
+
tmpHTML += '<option value="gallery"' + (tmpRemote.ViewMode === 'gallery' ? ' selected' : '') + '>Grid</option>';
|
|
179
|
+
tmpHTML += '<option value="list"' + (tmpRemote.ViewMode === 'list' ? ' selected' : '') + '>List</option>';
|
|
180
|
+
tmpHTML += '</select>';
|
|
181
|
+
tmpHTML += '</div>';
|
|
182
|
+
|
|
192
183
|
// Thumbnail size
|
|
193
184
|
tmpHTML += '<div class="retold-remote-settings-row">';
|
|
194
185
|
tmpHTML += '<span class="retold-remote-settings-label">Thumbnail size</span>';
|
|
@@ -199,12 +190,36 @@ class RetoldRemoteSettingsPanelView extends libPictView
|
|
|
199
190
|
tmpHTML += '</select>';
|
|
200
191
|
tmpHTML += '</div>';
|
|
201
192
|
|
|
202
|
-
//
|
|
193
|
+
// Sort field
|
|
203
194
|
tmpHTML += '<div class="retold-remote-settings-row">';
|
|
204
|
-
tmpHTML += '<span class="retold-remote-settings-label">
|
|
205
|
-
tmpHTML += '<select class="retold-remote-settings-select" onchange="pict.views[\'RetoldRemote-SettingsPanel\'].
|
|
206
|
-
tmpHTML += '<option value="
|
|
207
|
-
tmpHTML += '<option value="
|
|
195
|
+
tmpHTML += '<span class="retold-remote-settings-label">Sort by</span>';
|
|
196
|
+
tmpHTML += '<select class="retold-remote-settings-select" onchange="pict.views[\'RetoldRemote-SettingsPanel\'].changeSortField(this.value)">';
|
|
197
|
+
tmpHTML += '<option value="folder-first"' + (tmpRemote.SortField === 'folder-first' ? ' selected' : '') + '>Folders first</option>';
|
|
198
|
+
tmpHTML += '<option value="name"' + (tmpRemote.SortField === 'name' ? ' selected' : '') + '>Name</option>';
|
|
199
|
+
tmpHTML += '<option value="modified"' + (tmpRemote.SortField === 'modified' ? ' selected' : '') + '>Modified</option>';
|
|
200
|
+
tmpHTML += '<option value="created"' + (tmpRemote.SortField === 'created' ? ' selected' : '') + '>Created</option>';
|
|
201
|
+
tmpHTML += '</select>';
|
|
202
|
+
tmpHTML += '</div>';
|
|
203
|
+
|
|
204
|
+
// Sort direction
|
|
205
|
+
tmpHTML += '<div class="retold-remote-settings-row">';
|
|
206
|
+
tmpHTML += '<span class="retold-remote-settings-label">Sort direction</span>';
|
|
207
|
+
tmpHTML += '<select class="retold-remote-settings-select" onchange="pict.views[\'RetoldRemote-SettingsPanel\'].changeSortDirection(this.value)">';
|
|
208
|
+
tmpHTML += '<option value="asc"' + (tmpRemote.SortDirection === 'asc' ? ' selected' : '') + '>Ascending</option>';
|
|
209
|
+
tmpHTML += '<option value="desc"' + (tmpRemote.SortDirection === 'desc' ? ' selected' : '') + '>Descending</option>';
|
|
210
|
+
tmpHTML += '</select>';
|
|
211
|
+
tmpHTML += '</div>';
|
|
212
|
+
|
|
213
|
+
// Default media filter
|
|
214
|
+
let tmpFilterMediaType = (tmpRemote.FilterState && tmpRemote.FilterState.MediaType) || 'all';
|
|
215
|
+
tmpHTML += '<div class="retold-remote-settings-row">';
|
|
216
|
+
tmpHTML += '<span class="retold-remote-settings-label">Media filter</span>';
|
|
217
|
+
tmpHTML += '<select class="retold-remote-settings-select" onchange="pict.views[\'RetoldRemote-SettingsPanel\'].changeMediaFilter(this.value)">';
|
|
218
|
+
tmpHTML += '<option value="all"' + (tmpFilterMediaType === 'all' ? ' selected' : '') + '>All files</option>';
|
|
219
|
+
tmpHTML += '<option value="images"' + (tmpFilterMediaType === 'images' ? ' selected' : '') + '>Images</option>';
|
|
220
|
+
tmpHTML += '<option value="video"' + (tmpFilterMediaType === 'video' ? ' selected' : '') + '>Video</option>';
|
|
221
|
+
tmpHTML += '<option value="audio"' + (tmpFilterMediaType === 'audio' ? ' selected' : '') + '>Audio</option>';
|
|
222
|
+
tmpHTML += '<option value="documents"' + (tmpFilterMediaType === 'documents' ? ' selected' : '') + '>Documents</option>';
|
|
208
223
|
tmpHTML += '</select>';
|
|
209
224
|
tmpHTML += '</div>';
|
|
210
225
|
|
|
@@ -216,12 +231,20 @@ class RetoldRemoteSettingsPanelView extends libPictView
|
|
|
216
231
|
+ ' onchange="pict.views[\'RetoldRemote-SettingsPanel\'].toggleHiddenFiles(this.checked)">';
|
|
217
232
|
tmpHTML += '</div>';
|
|
218
233
|
|
|
219
|
-
//
|
|
234
|
+
tmpHTML += '</div>'; // end gallery section
|
|
235
|
+
|
|
236
|
+
// Viewer section
|
|
237
|
+
tmpHTML += '<div class="retold-remote-settings-section">';
|
|
238
|
+
tmpHTML += '<div class="retold-remote-settings-section-title">Viewer</div>';
|
|
239
|
+
|
|
240
|
+
// Image fit mode
|
|
220
241
|
tmpHTML += '<div class="retold-remote-settings-row">';
|
|
221
|
-
tmpHTML += '<span class="retold-remote-settings-label">
|
|
222
|
-
tmpHTML += '<
|
|
223
|
-
|
|
224
|
-
|
|
242
|
+
tmpHTML += '<span class="retold-remote-settings-label">Image fit mode</span>';
|
|
243
|
+
tmpHTML += '<select class="retold-remote-settings-select" onchange="pict.views[\'RetoldRemote-SettingsPanel\'].changeImageFitMode(this.value)">';
|
|
244
|
+
tmpHTML += '<option value="fit"' + (tmpRemote.ImageFitMode === 'fit' ? ' selected' : '') + '>Fit to window</option>';
|
|
245
|
+
tmpHTML += '<option value="auto"' + (tmpRemote.ImageFitMode === 'auto' ? ' selected' : '') + '>Original if smaller</option>';
|
|
246
|
+
tmpHTML += '<option value="original"' + (tmpRemote.ImageFitMode === 'original' ? ' selected' : '') + '>Original size</option>';
|
|
247
|
+
tmpHTML += '</select>';
|
|
225
248
|
tmpHTML += '</div>';
|
|
226
249
|
|
|
227
250
|
// Autoplay video
|
|
@@ -240,7 +263,15 @@ class RetoldRemoteSettingsPanelView extends libPictView
|
|
|
240
263
|
+ ' onchange="pict.views[\'RetoldRemote-SettingsPanel\'].toggleAutoplay(\'AutoplayAudio\', this.checked)">';
|
|
241
264
|
tmpHTML += '</div>';
|
|
242
265
|
|
|
243
|
-
|
|
266
|
+
// Navigation bar in distraction-free
|
|
267
|
+
tmpHTML += '<div class="retold-remote-settings-row">';
|
|
268
|
+
tmpHTML += '<span class="retold-remote-settings-label">Nav bar in distraction-free</span>';
|
|
269
|
+
tmpHTML += '<input type="checkbox" class="retold-remote-settings-checkbox"'
|
|
270
|
+
+ (tmpRemote.DistractionFreeShowNav ? ' checked' : '')
|
|
271
|
+
+ ' onchange="pict.views[\'RetoldRemote-SettingsPanel\'].toggleDistractionFreeNav(this.checked)">';
|
|
272
|
+
tmpHTML += '</div>';
|
|
273
|
+
|
|
274
|
+
tmpHTML += '</div>'; // end viewer section
|
|
244
275
|
|
|
245
276
|
// Server capabilities
|
|
246
277
|
tmpHTML += '<div class="retold-remote-settings-section">';
|
|
@@ -275,106 +306,27 @@ class RetoldRemoteSettingsPanelView extends libPictView
|
|
|
275
306
|
tmpHTML += '</div>';
|
|
276
307
|
tmpHTML += '</div>'; // end capabilities section
|
|
277
308
|
|
|
278
|
-
//
|
|
309
|
+
// VLC Setup
|
|
279
310
|
tmpHTML += '<div class="retold-remote-settings-section">';
|
|
280
|
-
tmpHTML += '<div class="retold-remote-settings-section-title">
|
|
281
|
-
|
|
282
|
-
tmpHTML +=
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
tmpHTML +=
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
{ key: 'Enter', desc: 'Open item' },
|
|
294
|
-
{ key: 'Esc', desc: 'Go up one folder' },
|
|
295
|
-
{ key: 'Home', desc: 'Jump to first item' },
|
|
296
|
-
{ key: 'End', desc: 'Jump to last item' },
|
|
297
|
-
{ key: 'g', desc: 'Toggle grid / list' },
|
|
298
|
-
{ key: 'f', desc: 'Advanced filter panel' },
|
|
299
|
-
{ key: 's', desc: 'Focus sort dropdown' },
|
|
300
|
-
{ key: 'x', desc: 'Clear all filters' },
|
|
301
|
-
{ key: 'c', desc: 'Settings panel' },
|
|
302
|
-
{ key: 'd', desc: 'Distraction-free mode' }
|
|
303
|
-
]);
|
|
304
|
-
|
|
305
|
-
tmpHTML += this._buildShortcutGroup('Sidebar (F9)',
|
|
306
|
-
[
|
|
307
|
-
{ key: '\u2191 \u2193', desc: 'Navigate file list' },
|
|
308
|
-
{ key: 'Home', desc: 'Jump to first' },
|
|
309
|
-
{ key: 'End', desc: 'Jump to last' },
|
|
310
|
-
{ key: 'Enter', desc: 'Open item' },
|
|
311
|
-
{ key: 'Esc', desc: 'Return to gallery' }
|
|
312
|
-
]);
|
|
313
|
-
|
|
314
|
-
tmpHTML += this._buildShortcutGroup('Media Viewer',
|
|
315
|
-
[
|
|
316
|
-
{ key: 'Esc', desc: 'Back to gallery' },
|
|
317
|
-
{ key: '\u2192 j', desc: 'Next file' },
|
|
318
|
-
{ key: '\u2190 k', desc: 'Previous file' },
|
|
319
|
-
{ key: 'Space', desc: 'Play / pause' },
|
|
320
|
-
{ key: 'f', desc: 'Fullscreen' },
|
|
321
|
-
{ key: 'i', desc: 'File info overlay' },
|
|
322
|
-
{ key: '+ -', desc: 'Zoom in / out' },
|
|
323
|
-
{ key: '0', desc: 'Reset zoom' },
|
|
324
|
-
{ key: 'z', desc: 'Cycle fit mode' },
|
|
325
|
-
{ key: 'd', desc: 'Distraction-free mode' }
|
|
326
|
-
]);
|
|
327
|
-
|
|
328
|
-
tmpHTML += this._buildShortcutGroup('Video Menu',
|
|
329
|
-
[
|
|
330
|
-
{ key: 'Space', desc: 'Play in browser' },
|
|
331
|
-
{ key: 'Enter', desc: 'Play in browser' },
|
|
332
|
-
{ key: 'e', desc: 'Explore video frames' },
|
|
333
|
-
{ key: 't', desc: 'Extract thumbnail' },
|
|
334
|
-
{ key: 'v', desc: 'Open with VLC' },
|
|
335
|
-
{ key: '\u2192 j', desc: 'Next file' },
|
|
336
|
-
{ key: '\u2190 k', desc: 'Previous file' },
|
|
337
|
-
{ key: 'Esc', desc: 'Back to gallery' }
|
|
338
|
-
]);
|
|
339
|
-
|
|
340
|
-
tmpHTML += this._buildShortcutGroup('Video Explorer',
|
|
341
|
-
[
|
|
342
|
-
{ key: 'Esc', desc: 'Back' }
|
|
343
|
-
]);
|
|
344
|
-
|
|
345
|
-
tmpHTML += this._buildShortcutGroup('Audio Explorer',
|
|
346
|
-
[
|
|
347
|
-
{ key: 'Space', desc: 'Play selection' },
|
|
348
|
-
{ key: '+ -', desc: 'Zoom in / out' },
|
|
349
|
-
{ key: '0', desc: 'Zoom to fit' },
|
|
350
|
-
{ key: 'z', desc: 'Zoom to selection' },
|
|
351
|
-
{ key: 'Esc', desc: 'Clear selection / back' }
|
|
352
|
-
]);
|
|
353
|
-
|
|
354
|
-
tmpHTML += '</div>'; // end shortcuts section
|
|
311
|
+
tmpHTML += '<div class="retold-remote-settings-section-title">VLC Streaming</div>';
|
|
312
|
+
tmpHTML += '<button class="retold-remote-settings-vlc-btn" onclick="pict.views[\'RetoldRemote-VLCSetup\'].openModal()">';
|
|
313
|
+
tmpHTML += 'VLC Protocol Setup';
|
|
314
|
+
tmpHTML += '</button>';
|
|
315
|
+
tmpHTML += '</div>';
|
|
316
|
+
|
|
317
|
+
// Help button
|
|
318
|
+
tmpHTML += '<div class="retold-remote-settings-section">';
|
|
319
|
+
tmpHTML += '<div class="retold-remote-settings-section-title">Help</div>';
|
|
320
|
+
tmpHTML += '<button class="retold-remote-settings-vlc-btn" onclick="pict.providers[\'RetoldRemote-GalleryNavigation\']._toggleHelpPanel()">';
|
|
321
|
+
tmpHTML += 'Help (F1)';
|
|
322
|
+
tmpHTML += '</button>';
|
|
323
|
+
tmpHTML += '</div>';
|
|
355
324
|
|
|
356
325
|
tmpHTML += '</div>'; // end settings
|
|
357
326
|
|
|
358
327
|
tmpContainer.innerHTML = tmpHTML;
|
|
359
328
|
}
|
|
360
329
|
|
|
361
|
-
_buildShortcutGroup(pTitle, pShortcuts)
|
|
362
|
-
{
|
|
363
|
-
let tmpHTML = '<div class="retold-remote-settings-shortcut-group">';
|
|
364
|
-
tmpHTML += '<div class="retold-remote-settings-shortcut-group-title">' + pTitle + '</div>';
|
|
365
|
-
|
|
366
|
-
for (let i = 0; i < pShortcuts.length; i++)
|
|
367
|
-
{
|
|
368
|
-
tmpHTML += '<div class="retold-remote-settings-shortcut-row">';
|
|
369
|
-
tmpHTML += '<span class="retold-remote-settings-shortcut-desc">' + pShortcuts[i].desc + '</span>';
|
|
370
|
-
tmpHTML += '<span class="retold-remote-settings-shortcut-key">' + pShortcuts[i].key + '</span>';
|
|
371
|
-
tmpHTML += '</div>';
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
tmpHTML += '</div>';
|
|
375
|
-
return tmpHTML;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
330
|
changeTheme(pThemeKey)
|
|
379
331
|
{
|
|
380
332
|
let tmpThemeProvider = this.pict.providers['RetoldRemote-Theme'];
|
|
@@ -439,6 +391,71 @@ class RetoldRemoteSettingsPanelView extends libPictView
|
|
|
439
391
|
}
|
|
440
392
|
}
|
|
441
393
|
}
|
|
394
|
+
|
|
395
|
+
changeImageFitMode(pMode)
|
|
396
|
+
{
|
|
397
|
+
let tmpImageViewer = this.pict.views['RetoldRemote-ImageViewer'];
|
|
398
|
+
if (tmpImageViewer)
|
|
399
|
+
{
|
|
400
|
+
tmpImageViewer.setFitMode(pMode);
|
|
401
|
+
}
|
|
402
|
+
else
|
|
403
|
+
{
|
|
404
|
+
let tmpRemote = this.pict.AppData.RetoldRemote;
|
|
405
|
+
tmpRemote.ImageFitMode = pMode;
|
|
406
|
+
this.pict.PictApplication.saveSettings();
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
changeSortField(pValue)
|
|
411
|
+
{
|
|
412
|
+
let tmpRemote = this.pict.AppData.RetoldRemote;
|
|
413
|
+
tmpRemote.SortField = pValue;
|
|
414
|
+
this.pict.PictApplication.saveSettings();
|
|
415
|
+
this._refilterGallery();
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
changeSortDirection(pValue)
|
|
419
|
+
{
|
|
420
|
+
let tmpRemote = this.pict.AppData.RetoldRemote;
|
|
421
|
+
tmpRemote.SortDirection = pValue;
|
|
422
|
+
this.pict.PictApplication.saveSettings();
|
|
423
|
+
this._refilterGallery();
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
changeMediaFilter(pValue)
|
|
427
|
+
{
|
|
428
|
+
let tmpRemote = this.pict.AppData.RetoldRemote;
|
|
429
|
+
tmpRemote.GalleryFilter = pValue;
|
|
430
|
+
if (tmpRemote.FilterState)
|
|
431
|
+
{
|
|
432
|
+
tmpRemote.FilterState.MediaType = pValue;
|
|
433
|
+
}
|
|
434
|
+
this.pict.PictApplication.saveSettings();
|
|
435
|
+
this._refilterGallery();
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Re-run the filter/sort pipeline and refresh the gallery.
|
|
440
|
+
*/
|
|
441
|
+
_refilterGallery()
|
|
442
|
+
{
|
|
443
|
+
let tmpRemote = this.pict.AppData.RetoldRemote;
|
|
444
|
+
let tmpFilterSort = this.pict.providers['RetoldRemote-GalleryFilterSort'];
|
|
445
|
+
if (tmpFilterSort)
|
|
446
|
+
{
|
|
447
|
+
tmpFilterSort.runFilterPipeline();
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
if (tmpRemote.ActiveMode === 'gallery')
|
|
451
|
+
{
|
|
452
|
+
let tmpGalleryView = this.pict.views['RetoldRemote-Gallery'];
|
|
453
|
+
if (tmpGalleryView)
|
|
454
|
+
{
|
|
455
|
+
tmpGalleryView.renderGallery();
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
442
459
|
}
|
|
443
460
|
|
|
444
461
|
RetoldRemoteSettingsPanelView.default_configuration = _ViewConfiguration;
|