Frontend: Use thumb model in edit dialog and places

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-04-21 16:46:08 +02:00
parent 3a257684bd
commit 2ba120f563
3 changed files with 7 additions and 3 deletions

View file

@ -378,6 +378,7 @@
import {DateTime} from "luxon";
import moment from "moment-timezone"
import countries from "resources/countries.json";
import Thumb from "model/thumb";
export default {
name: 'p-tab-photo-edit-details',
@ -481,7 +482,7 @@
this.$emit('prev');
},
openPhoto() {
this.$viewer.show([this.model], 0)
this.$viewer.show(Thumb.fromFiles([this.model]), 0)
},
refresh(model) {
if (!model.hasId()) return;

View file

@ -37,6 +37,8 @@
</template>
<script>
import Thumb from "model/thumb";
export default {
name: 'p-tab-photo-edit-files',
props: {
@ -60,7 +62,7 @@
computed: {},
methods: {
openPhoto() {
this.$viewer.show([this.model], 0)
this.$viewer.show(Thumb.fromFiles([this.model]), 0)
},
setPrimary(file) {
this.model.setPrimary(file.FileUUID);

View file

@ -27,6 +27,7 @@
import Photo from "model/photo";
import mapboxgl from "mapbox-gl";
import Api from "../common/api";
import Thumb from "../model/thumb";
export default {
name: 'p-page-places',
@ -80,7 +81,7 @@
if (this.photos.length > 0) {
const index = this.photos.findIndex((p) => p.PhotoUUID === id);
this.$viewer.show(this.photos, index)
this.$viewer.show(Thumb.fromPhotos(this.photos), index)
} else {
this.$notify.warning("No photos found");
}