Frontend: Touch swipe on thumbnail in edit dialog

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-04-16 16:30:45 +02:00
parent f99307f181
commit 34143840aa
2 changed files with 12 additions and 5 deletions

View file

@ -42,7 +42,7 @@
<v-tabs-items touchless>
<v-tab-item>
<p-tab-photo-edit-details :model="model" ref="details"
@close="close"></p-tab-photo-edit-details>
@close="close" @prev="prev" @next="next"></p-tab-photo-edit-details>
</v-tab-item>
<v-tab-item lazy>

View file

@ -17,6 +17,7 @@
class="accent lighten-2 elevation-0"
style="cursor: pointer"
@click.exact="openPhoto()"
v-touch="{left, right}"
>
<v-layout
slot="placeholder"
@ -438,7 +439,7 @@
let localDate = DateTime.fromISO(utcDate);
if(this.model.TimeZone) {
if (this.model.TimeZone) {
localDate = localDate.setZone(this.model.TimeZone);
} else {
localDate = localDate.toUTC(0);
@ -468,6 +469,12 @@
},
},
methods: {
left() {
this.$emit('next');
},
right() {
this.$emit('prev');
},
openPhoto() {
this.$viewer.show([this.model], 0)
},
@ -486,9 +493,9 @@
}
this.model.update().then(() => {
if (close) {
this.$emit('close');
}
if (close) {
this.$emit('close');
}
});
},
close() {