@christianriedl/media 1.0.25 → 1.0.26
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 +49 -8
package/package.json
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
const heightStyle = computed(() => { return { height: appState.bodyHeight.value + 'px', overflowY: 'hidden' } });
|
|
13
13
|
const isMobile = appState.isMobile;
|
|
14
14
|
const url = ref('');
|
|
15
|
-
const
|
|
15
|
+
const infoDialog = ref(false);
|
|
16
|
+
const keyDialog = ref(false);
|
|
16
17
|
const folderId = decodeURIComponent(route.query!.id!.toString());
|
|
17
18
|
const index = ref(0);
|
|
18
19
|
const items = reactive<IPictureFile[]>([]);
|
|
@@ -104,8 +105,8 @@
|
|
|
104
105
|
});
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
|
-
function
|
|
108
|
-
|
|
108
|
+
function onDblClick(ev: Event) {
|
|
109
|
+
keyDialog.value = true;
|
|
109
110
|
}
|
|
110
111
|
async function onKey(ev: KeyboardEvent) {
|
|
111
112
|
switch (ev.code) {
|
|
@@ -124,9 +125,10 @@
|
|
|
124
125
|
const item = items[index.value];
|
|
125
126
|
const exif = await mediaService.getExifInfo(item.DLNAParentID, item.DLNAID);
|
|
126
127
|
setMetaData(exif, item);
|
|
127
|
-
|
|
128
|
+
infoDialog.value = true;
|
|
128
129
|
break;
|
|
129
130
|
case "KeyP":
|
|
131
|
+
case "KeyC":
|
|
130
132
|
cycle.value = true;
|
|
131
133
|
break;
|
|
132
134
|
case "Digit0":
|
|
@@ -161,6 +163,13 @@
|
|
|
161
163
|
break;
|
|
162
164
|
}
|
|
163
165
|
}
|
|
166
|
+
function onKeyClick(code: string) {
|
|
167
|
+
keyDialog.value = false;
|
|
168
|
+
if (code != 'close') {
|
|
169
|
+
const keyEvent = new KeyboardEvent("key", { "code": code, "bubbles": true, "cancelable": false });
|
|
170
|
+
onKey(keyEvent);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
164
173
|
function itemWidth(item: IPictureFile): number {
|
|
165
174
|
const fac = item.Height / height.value;
|
|
166
175
|
return Math.floor(item.Width * fac);
|
|
@@ -236,13 +245,13 @@
|
|
|
236
245
|
<v-container fluid :style="heightStyle">
|
|
237
246
|
<v-carousel hide-delimiters :show-arrows="false" v-model="index"
|
|
238
247
|
:width="width" :height="height" :cycle="cycle" :interval="interval"
|
|
239
|
-
@change="onInput">
|
|
248
|
+
@change="onInput" @dblclick="onDblClick">
|
|
240
249
|
<v-carousel-item v-for="item in items" :key="item.DLNAID">
|
|
241
250
|
<img :src="item.realUrl" />
|
|
242
251
|
</v-carousel-item>
|
|
243
252
|
</v-carousel>
|
|
244
|
-
<v-dialog v-model="
|
|
245
|
-
<v-card v-if="
|
|
253
|
+
<v-dialog v-model="infoDialog" :fullscreen="isMobile">
|
|
254
|
+
<v-card v-if="infoDialog" width="400">
|
|
246
255
|
<v-card-title class="headline">Metadata</v-card-title>
|
|
247
256
|
<v-card-text>
|
|
248
257
|
<v-container>
|
|
@@ -253,7 +262,7 @@
|
|
|
253
262
|
</v-container>
|
|
254
263
|
</v-card-text>
|
|
255
264
|
<v-card-actions>
|
|
256
|
-
<v-btn @click="
|
|
265
|
+
<v-btn @click="infoDialog = false">
|
|
257
266
|
<v-icon large icon="$stop" />
|
|
258
267
|
</v-btn>
|
|
259
268
|
<v-btn v-if="hasCoordinates" @click="showMap">
|
|
@@ -262,6 +271,38 @@
|
|
|
262
271
|
</v-card-actions>
|
|
263
272
|
</v-card>
|
|
264
273
|
</v-dialog>
|
|
274
|
+
<v-dialog v-model="keyDialog" :fullscreen="isMobile">
|
|
275
|
+
<v-card v-if="keyDialog" width="400">
|
|
276
|
+
<v-card-text>
|
|
277
|
+
<v-container>
|
|
278
|
+
<v-row dense>
|
|
279
|
+
<v-col cols="4"><v-btn @click="onKeyClick('Escape')">Back</v-btn></v-col>
|
|
280
|
+
<v-col cols="4"><v-btn @click="onKeyClick('Digit0')">Pause</v-btn></v-col>
|
|
281
|
+
<v-col cols="4"><v-btn @click="onKeyClick('KeyC')">Cont</v-btn></v-col>
|
|
282
|
+
</v-row>
|
|
283
|
+
<v-row dense>
|
|
284
|
+
<v-col cols="4"><v-btn @click="onKeyClick('Digit1')">1</v-btn></v-col>
|
|
285
|
+
<v-col cols="4"><v-btn @click="onKeyClick('Digit2')">2</v-btn></v-col>
|
|
286
|
+
<v-col cols="4"><v-btn @click="onKeyClick('Digit3')">3</v-btn></v-col>
|
|
287
|
+
</v-row>
|
|
288
|
+
<v-row dense>
|
|
289
|
+
<v-col cols="4"><v-btn @click="onKeyClick('Digit4')">4</v-btn></v-col>
|
|
290
|
+
<v-col cols="4"><v-btn @click="onKeyClick('Digit5')">5</v-btn></v-col>
|
|
291
|
+
<v-col cols="4"><v-btn @click="onKeyClick('Digit6')">6</v-btn></v-col>
|
|
292
|
+
</v-row>
|
|
293
|
+
<v-row dense>
|
|
294
|
+
<v-col cols="4"><v-btn @click="onKeyClick('Digit7')">7</v-btn></v-col>
|
|
295
|
+
<v-col cols="4"><v-btn @click="onKeyClick('Digit8')">8</v-btn></v-col>
|
|
296
|
+
<v-col cols="4"><v-btn @click="onKeyClick('Digit9')">9</v-btn></v-col>
|
|
297
|
+
</v-row>
|
|
298
|
+
<v-row dense>
|
|
299
|
+
<v-col cols="4"><v-btn @click="onKeyClick('KeyI')">Info</v-btn></v-col>
|
|
300
|
+
<v-col cols="4"><v-btn @click="onKeyClick('close')">Close</v-btn></v-col>
|
|
301
|
+
</v-row>
|
|
302
|
+
</v-container>
|
|
303
|
+
</v-card-text>
|
|
304
|
+
</v-card>
|
|
305
|
+
</v-dialog>
|
|
265
306
|
</v-container>
|
|
266
307
|
</template>
|
|
267
308
|
|