@christianriedl/media 1.0.26 → 1.0.28

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianriedl/media",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "description": "RIC media interfaces",
5
5
 
6
6
  "main": "dist/index.js",
@@ -1,12 +1,13 @@
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, Dictionary, Helper } from '@christianriedl/utils';
4
+ import { IAppState, IAppConfig, Dictionary, Helper } from '@christianriedl/utils';
5
5
  import { EMediaType, IPictureFile, MediaService } from '@christianriedl/media';
6
6
 
7
7
  const router = useRouter();
8
8
  const route = useRoute();
9
9
  const appState = inject<IAppState>('appstate')!;
10
+ const appConfig = inject<IAppConfig>('appconfig')!;
10
11
  const getMediaService = inject<() => MediaService>('get-media')!;
11
12
  const mediaService = getMediaService();
12
13
  const heightStyle = computed(() => { return { height: appState.bodyHeight.value + 'px', overflowY: 'hidden' } });
@@ -88,8 +89,10 @@
88
89
  return mediaService.getPhotoUrl(url.value, item.Url, `${width.value}x${0}x${item.Orientation}`);
89
90
  }
90
91
  function showMap(ev: Event) {
92
+ const current = items[index.value];
93
+ window.history.replaceState(null, "", `${appConfig.urlPrefix}photoalbum?id=${folderId}&start=${current.DLNAID}`);
91
94
  router.push({
92
- path: 'gps', query: {
95
+ path: 'map', query: {
93
96
  lat: `${gpsLat[0]} ${gpsLat[1]}`,
94
97
  lng: `${gpsLng[0]} ${gpsLng[1]}`
95
98
  }
@@ -127,10 +130,10 @@
127
130
  setMetaData(exif, item);
128
131
  infoDialog.value = true;
129
132
  break;
130
- case "KeyP":
131
133
  case "KeyC":
132
134
  cycle.value = true;
133
135
  break;
136
+ case "KeyP":
134
137
  case "Digit0":
135
138
  cycle.value = false;
136
139
  break;
@@ -243,14 +246,14 @@
243
246
 
244
247
  <template>
245
248
  <v-container fluid :style="heightStyle">
246
- <v-carousel hide-delimiters :show-arrows="false" v-model="index"
249
+ <v-carousel hide-delimiters :show-arrows="false" v-model="index"
247
250
  :width="width" :height="height" :cycle="cycle" :interval="interval"
248
251
  @change="onInput" @dblclick="onDblClick">
249
252
  <v-carousel-item v-for="item in items" :key="item.DLNAID">
250
253
  <img :src="item.realUrl" />
251
254
  </v-carousel-item>
252
255
  </v-carousel>
253
- <v-dialog v-model="infoDialog" :fullscreen="isMobile">
256
+ <v-dialog v-model="infoDialog" :fullscreen="isMobile" v-click-outside="infoDialog = false">
254
257
  <v-card v-if="infoDialog" width="400">
255
258
  <v-card-title class="headline">Metadata</v-card-title>
256
259
  <v-card-text>
@@ -271,7 +274,7 @@
271
274
  </v-card-actions>
272
275
  </v-card>
273
276
  </v-dialog>
274
- <v-dialog v-model="keyDialog" :fullscreen="isMobile">
277
+ <v-dialog v-model="keyDialog" :fullscreen="isMobile" v-click-outside="keyDialog = false">
275
278
  <v-card v-if="keyDialog" width="400">
276
279
  <v-card-text>
277
280
  <v-container>