@christianriedl/media 1.0.56 → 1.0.58
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 +1 -1
- package/src/views/PhotoAlbumPage.vue +27 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject, ref, reactive, computed, onMounted, onBeforeMount, onUnmounted, nextTick, watch } from 'vue';
|
|
3
3
|
import { useRouter, useRoute } from 'vue-router';
|
|
4
|
-
import { IAppState, IAppConfig, Dictionary, Helper, appStateSymbol, appConfigSymbol } from '@christianriedl/utils';
|
|
4
|
+
import { IAppState, IAppConfig, EDevice, EBrowser, Dictionary, Helper, appStateSymbol, appConfigSymbol } from '@christianriedl/utils';
|
|
5
5
|
import { EMediaType, IPictureFile, MediaService, IMediaAppConfig, EPictureQuality, getMediaSymbol } from '@christianriedl/media';
|
|
6
6
|
|
|
7
7
|
const router = useRouter();
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
let origUrl = "";
|
|
30
30
|
let gpsLng: number[];
|
|
31
31
|
let gpsLat: number[];
|
|
32
|
+
let mouseDownTime: number = 0;
|
|
33
|
+
let mouseTimer: number = -1;
|
|
32
34
|
|
|
33
35
|
watch([appState.bodyHeight, appState.pageWidth], () => {
|
|
34
36
|
width.value = appState.pageWidth.value;
|
|
@@ -123,7 +125,29 @@
|
|
|
123
125
|
});
|
|
124
126
|
}
|
|
125
127
|
function onClick() {
|
|
126
|
-
|
|
128
|
+
if (appState.device == EDevice.iPad) {
|
|
129
|
+
if (mouseTimer >= 0) { // 2. click
|
|
130
|
+
window.clearTimeout(mouseTimer);
|
|
131
|
+
onKeyClick("KeyF");
|
|
132
|
+
mouseTimer = -1;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
mouseTimer = window.setTimeout(() => {
|
|
136
|
+
mouseTimer = -1;
|
|
137
|
+
keyDialog.value = true;
|
|
138
|
+
}, 500);
|
|
139
|
+
}
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
const msecDiff = new Date().getTime() - mouseDownTime;
|
|
143
|
+
if (msecDiff < 500)
|
|
144
|
+
keyDialog.value = true;
|
|
145
|
+
else
|
|
146
|
+
onKeyClick("KeyF");
|
|
147
|
+
mouseDownTime = 0;
|
|
148
|
+
}
|
|
149
|
+
function onMouseDown() {
|
|
150
|
+
mouseDownTime = new Date().getTime();
|
|
127
151
|
}
|
|
128
152
|
async function onKey(ev: KeyboardEvent) {
|
|
129
153
|
switch (ev.code) {
|
|
@@ -315,7 +339,7 @@
|
|
|
315
339
|
<v-container fluid :style="heightStyle" class="bg-grey-darken-3 pa-0">
|
|
316
340
|
<v-carousel hide-delimiters :show-arrows="false" v-model="index"
|
|
317
341
|
:width="width" :height="height" :cycle="cycle" :interval="interval"
|
|
318
|
-
@click="onClick" @
|
|
342
|
+
@click="onClick" @mousedown="onMouseDown" @update:modelValue="infoDialog = false">
|
|
319
343
|
<v-carousel-item v-for="item in items" :key="item.DLNAID">
|
|
320
344
|
<img :src="getUrl(item)" :alt="item.Name" :width="getWidth(item)" :height="getHeight(item)" />
|
|
321
345
|
</v-carousel-item>
|