@christianriedl/media 1.0.61 → 1.0.62
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/PhotosPage.vue +2 -31
package/package.json
CHANGED
package/src/views/PhotosPage.vue
CHANGED
|
@@ -115,38 +115,9 @@
|
|
|
115
115
|
downloadFolder.value = item;
|
|
116
116
|
showDownload.value = true;
|
|
117
117
|
}
|
|
118
|
-
function copyToClipboardSafari(text: string) {
|
|
119
|
-
const textarea = window.document.createElement('textarea');
|
|
120
|
-
|
|
121
|
-
// create textarea
|
|
122
|
-
textarea.value = text;
|
|
123
|
-
|
|
124
|
-
// ios will zoom in on the input if the font-size is < 16px
|
|
125
|
-
textarea.style.fontSize = '20px';
|
|
126
|
-
window.document.body.appendChild(textarea);
|
|
127
|
-
|
|
128
|
-
// select text
|
|
129
|
-
if (appState.device == EDevice.iPad || appState.device == EDevice.iPhone) {
|
|
130
|
-
const range = window.document.createRange();
|
|
131
|
-
range.selectNodeContents(textarea);
|
|
132
|
-
|
|
133
|
-
const selection = window.getSelection();
|
|
134
|
-
selection.removeAllRanges();
|
|
135
|
-
selection.addRange(range);
|
|
136
|
-
textarea.setSelectionRange(0, 999999);
|
|
137
|
-
} else {
|
|
138
|
-
textarea.select();
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// copy selection
|
|
142
|
-
window.document.execCommand('copy');
|
|
143
|
-
|
|
144
|
-
// cleanup
|
|
145
|
-
window.document.body.removeChild(textarea);
|
|
146
|
-
}
|
|
147
118
|
async function onShare(item: IMediaFolder) {
|
|
148
119
|
const guid = Helper.generateUUID();
|
|
149
|
-
const url = `https://www.christian-riedl.com/
|
|
120
|
+
const url = `https://www.christian-riedl.com/photos?id=${guid}`;
|
|
150
121
|
try {
|
|
151
122
|
await window.navigator.clipboard.writeText(url);
|
|
152
123
|
const id = await mediaService.addPhotoService(guid, appConfig.user, item.DLNAID, 365);
|
|
@@ -262,7 +233,7 @@
|
|
|
262
233
|
</template>
|
|
263
234
|
<v-list-item v-for="subItem in item.Folders" :key="subItem.DLNAID" :title="itemText(subItem)" :value="itemText(subItem)" density="compact" @click.stop="listSubItem(subItem)">
|
|
264
235
|
<template v-slot:append>
|
|
265
|
-
<v-btn variant="text" color="grey" icon="$share" @click.stop.prevent="onShare(
|
|
236
|
+
<v-btn variant="text" color="grey" icon="$share" @click.stop.prevent="onShare(subItem)"></v-btn>
|
|
266
237
|
<v-btn variant="text" color="grey" icon="$download" @click.stop.prevent="onDownload(subItem)"></v-btn>
|
|
267
238
|
<v-btn variant="text" color="grey" icon="$grid" @click.stop.prevent="onLightbox(subItem)"></v-btn>
|
|
268
239
|
</template>
|