@christianriedl/media 1.0.42 → 1.0.43
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,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject, ref } from 'vue';
|
|
3
3
|
import { Helper } from '@christianriedl/utils';
|
|
4
|
-
import { IMediaFolder, getMediaSymbol } from '@christianriedl/media';
|
|
4
|
+
import { IMediaFolder, MediaService, getMediaSymbol } from '@christianriedl/media';
|
|
5
5
|
|
|
6
6
|
const props = defineProps<{ folder: IMediaFolder }>();
|
|
7
7
|
const emits = defineEmits<{ (e: 'close'): void }>();
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
const quality = ref<Quality>(Quality.Medium);
|
|
25
|
-
const qualities = Helper.getEnumOptions(Quality);
|
|
25
|
+
const qualities = Helper.getEnumOptions(Quality, true);
|
|
26
26
|
const height = ref<Height>(Height.Medium);
|
|
27
|
-
const heights = Helper.getEnumOptions(Height);
|
|
27
|
+
const heights = Helper.getEnumOptions(Height, true);
|
|
28
28
|
|
|
29
29
|
function onChange() {
|
|
30
30
|
if (height.value == Height.Original)
|
|
@@ -33,17 +33,18 @@
|
|
|
33
33
|
function onCancel() {
|
|
34
34
|
emits('close');
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
const
|
|
36
|
+
async function onDownload() {
|
|
37
|
+
const folder = await mediaService.getPhotos(props.folder);
|
|
38
|
+
const downloadUrl = mediaService.getPicturesDownloadUrl(folder.Url, height.value, quality.value);
|
|
38
39
|
window.open(downloadUrl);
|
|
39
40
|
emits('close');
|
|
40
41
|
}
|
|
41
42
|
</script>
|
|
42
43
|
|
|
43
44
|
<template>
|
|
44
|
-
<v-card class="bg-media" :width="
|
|
45
|
+
<v-card class="bg-media" :width="500">
|
|
45
46
|
<v-card-title class="headline">Download Pictures</v-card-title>
|
|
46
|
-
<v-card-subtitle
|
|
47
|
+
<v-card-subtitle>Only 'Original' height includes metadata</v-card-subtitle>
|
|
47
48
|
<v-card-text>
|
|
48
49
|
<v-container>
|
|
49
50
|
<v-row dense align="center">
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
</v-select>
|
|
58
59
|
</v-col>
|
|
59
60
|
<v-col cols="4">
|
|
60
|
-
<v-text-field
|
|
61
|
+
<v-text-field type="number" v-model="quality" density="compact" hide-details></v-text-field>
|
|
61
62
|
</v-col>
|
|
62
63
|
</v-row>
|
|
63
64
|
<v-row dense align="center">
|
|
@@ -71,17 +72,19 @@
|
|
|
71
72
|
</v-select>
|
|
72
73
|
</v-col>
|
|
73
74
|
<v-col cols="4">
|
|
74
|
-
<v-text-field
|
|
75
|
+
<v-text-field type="number" v-model="height" density="compact" hide-details></v-text-field>
|
|
75
76
|
</v-col>
|
|
76
77
|
</v-row>
|
|
77
78
|
</v-container>
|
|
78
79
|
</v-card-text>
|
|
79
80
|
<v-card-actions>
|
|
80
|
-
<v-btn icon="$
|
|
81
|
-
<v-btn icon="$download" @click="onDownload">Download</v-btn>
|
|
81
|
+
<v-btn icon="$download" class="action-btn" variant="text" @click="onDownload">Download</v-btn>
|
|
82
82
|
</v-card-actions>
|
|
83
83
|
</v-card>
|
|
84
84
|
</template>
|
|
85
85
|
|
|
86
86
|
<style scoped>
|
|
87
|
+
.action-btn {
|
|
88
|
+
justify-content: left
|
|
89
|
+
}
|
|
87
90
|
</style>
|
package/src/views/PhotosPage.vue
CHANGED
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
</template>
|
|
204
204
|
<v-list-item v-for="subItem in item.Folders" :key="subItem.DLNAID" :title="itemText(subItem)" :value="itemText(subItem)" density="compact" @click.stop="listSubItem(subItem)">
|
|
205
205
|
<template v-slot:append>
|
|
206
|
-
<v-btn variant="text" color="grey" icon="$download" @click.stop.prevent="onDownload(
|
|
206
|
+
<v-btn variant="text" color="grey" icon="$download" @click.stop.prevent="onDownload(subItem)"></v-btn>
|
|
207
207
|
<v-btn variant="text" color="grey" icon="$grid" @click.stop.prevent="onLightbox(subItem)"></v-btn>
|
|
208
208
|
</template>
|
|
209
209
|
</v-list-item>
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
</v-list>
|
|
212
212
|
</v-card>
|
|
213
213
|
<v-dialog v-model="showDownload">
|
|
214
|
-
<photo-download :folder="downloadFolder" @close="onCloseDialog"></photo-download>
|
|
214
|
+
<photo-download :folder="downloadFolder" v-click-outside="onCloseDialog" @close="onCloseDialog"></photo-download>
|
|
215
215
|
</v-dialog>
|
|
216
216
|
</template>
|
|
217
217
|
|