@christianriedl/media 1.0.94 → 1.0.96
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/package.json
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
const interval = ref(8000);
|
|
29
29
|
const hasCoordinates = ref(false);
|
|
30
30
|
const carousel = ref<ComponentPublicInstance | null>(null);
|
|
31
|
+
const itemName = ref("");
|
|
32
|
+
const albumName = ref("");
|
|
31
33
|
let origUrl = "";
|
|
32
34
|
let gpsLng: number[];
|
|
33
35
|
let gpsLat: number[];
|
|
@@ -60,6 +62,7 @@
|
|
|
60
62
|
return false;
|
|
61
63
|
}
|
|
62
64
|
const photos = await mediaService.getPhotos(folder);
|
|
65
|
+
albumName.value = photos.Name;
|
|
63
66
|
if(photos.Files.length > 0) {
|
|
64
67
|
items.splice(0, items.length, ...photos.Files as IPictureFile[]);
|
|
65
68
|
if (route.query.start) {
|
|
@@ -369,6 +372,7 @@
|
|
|
369
372
|
}
|
|
370
373
|
function clearName() { // also called by VImg::loadstart
|
|
371
374
|
showName.value = false;
|
|
375
|
+
itemName.value = "";
|
|
372
376
|
if (nameTimer >= 0) {
|
|
373
377
|
window.clearTimeout(nameTimer);
|
|
374
378
|
nameTimer = -1;
|
|
@@ -386,8 +390,17 @@
|
|
|
386
390
|
const name = item.Url.substr(0, idx);
|
|
387
391
|
if (!item.Name.includes(name)) {
|
|
388
392
|
showName.value = true;
|
|
393
|
+
itemName.value = item.Name;
|
|
389
394
|
nameTimer = window.setTimeout(() => { clearName(); }, mediaAppConfig.nameDurationMS);
|
|
390
395
|
}
|
|
396
|
+
else if (item.LocationIdx >= 0) {
|
|
397
|
+
const location = mediaService.getListEntry("Picture.Location", item.LocationIdx);
|
|
398
|
+
if (location && !albumName.value.includes(location)) {
|
|
399
|
+
showName.value = true;
|
|
400
|
+
itemName.value = location;
|
|
401
|
+
nameTimer = window.setTimeout(() => { clearName(); }, mediaAppConfig.nameDurationMS);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
391
404
|
}
|
|
392
405
|
</script>
|
|
393
406
|
|
|
@@ -398,7 +411,7 @@
|
|
|
398
411
|
@click="onClick" @mousedown="onMouseDown" @update:modelValue="onUpdate">
|
|
399
412
|
<v-carousel-item v-for="item in items" :key="item.DLNAID" :src="getUrl(item)" :alt="item.Name" :width="getWidth(item)" :height="getHeight(item)"
|
|
400
413
|
@load="onLoad(item)" @loadstart="clearName()">
|
|
401
|
-
<h2 v-if="showName" class="imgtext">{{
|
|
414
|
+
<h2 v-if="showName" class="imgtext">{{itemName}}</h2>
|
|
402
415
|
</v-carousel-item>
|
|
403
416
|
</v-carousel>
|
|
404
417
|
<v-dialog v-model="infoDialog" :fullscreen="isMobile" >
|
package/src/views/PhotosPage.vue
CHANGED
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
<template v-slot:activator="{ props }">
|
|
220
220
|
<v-list-item v-bind="props" :title="item.info" :value="item.info" density="compact"></v-list-item>
|
|
221
221
|
</template>
|
|
222
|
-
<v-list-item v-for="subItem in item.Folders" :key="subItem.DLNAID" :title="subItem.info" density="compact" @click.stop="showPictures(subItem)">
|
|
222
|
+
<v-list-item v-if="open.includes(item.Name)" v-for="subItem in item.Folders" :key="subItem.DLNAID" :title="subItem.info" density="compact" @click.stop="showPictures(subItem)">
|
|
223
223
|
<template v-slot:append>
|
|
224
224
|
<v-btn color="grey" variant="tonal" icon="$share" @click.stop.prevent="onShare(subItem)"></v-btn>
|
|
225
225
|
<v-btn color="grey" variant="tonal" icon="$download" @click.stop.prevent="onDownload(subItem)"></v-btn>
|