UX: Add click handler to open image in labels tab #3532

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2023-07-20 17:16:27 +02:00
parent 7c70ac0126
commit 74f6954a90
2 changed files with 7 additions and 2 deletions

View file

@ -1,6 +1,6 @@
<template>
<div class="p-photo-preview pa-0 ma-0 elevation-0 v-card v-sheet v-sheet--tile no-transition" :title="title">
<div class="v-responsive v-image card darken-1 elevation-0 clickable">
<div class="v-responsive v-image card darken-1 elevation-0 clickable" @click.prevent.stop="openPhoto">
<div class="v-responsive__sizer" style="padding-bottom: 100%;"></div>
<div class="v-image__image v-image__image--cover" :style="cover"></div>
<div class="v-responsive__content"></div>
@ -38,6 +38,10 @@ export default {
},
methods: {
openPhoto() {
if (!this.$viewer || !this.model) {
return;
}
this.$viewer.show(Thumb.fromFiles([this.model]), 0);
},
},

View file

@ -1,7 +1,7 @@
<template>
<v-dialog :value="show" fullscreen hide-overlay scrollable
lazy persistent class="p-photo-edit-dialog" @keydown.esc="close">
<v-card color="application" class="fill-height">
<v-card color="application">
<v-toolbar dark flat color="navigation" :dense="$vuetify.breakpoint.smAndDown">
<v-btn icon dark class="action-close" @click.stop="close">
<v-icon>close</v-icon>
@ -25,6 +25,7 @@
<v-tabs
v-model="active"
flat grow
class="form"
color="secondary"
slider-color="secondary-dark"
:height="$vuetify.breakpoint.smAndDown ? 48 : 64"