Recheck on state change
parent
7138768551
commit
2b212543d5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -38,7 +38,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Emit, Mixins } from 'vue-property-decorator';
|
||||
import { Component, Prop, Emit, Mixins, Watch } from 'vue-property-decorator';
|
||||
import { IDay, IPhoto } from "../types";
|
||||
|
||||
import * as dav from "../services/DavRequests";
|
||||
|
@ -53,6 +53,7 @@ export default class Photo extends Mixins(GlobalMixin) {
|
|||
@Prop() data: IPhoto;
|
||||
@Prop() rowHeight: number;
|
||||
@Prop() day: IDay;
|
||||
@Prop() state: number;
|
||||
|
||||
@Emit('reprocess') emitReprocess(remIds: Set<number>, updatedDays: Set<IDay>) {}
|
||||
@Emit('select') emitSelect(data: IPhoto) {}
|
||||
|
@ -77,7 +78,8 @@ export default class Photo extends Mixins(GlobalMixin) {
|
|||
return getPreviewUrl(this.data.fileid, this.data.etag);
|
||||
}
|
||||
|
||||
mounted() {
|
||||
@Watch('state')
|
||||
stateChange() {
|
||||
// Check if current image already loaded
|
||||
if (this.data?.fileid) {
|
||||
const img = this.$refs.image as HTMLImageElement;
|
||||
|
|
|
@ -22,9 +22,13 @@
|
|||
|
||||
<div class="photo" v-for="photo of item.photos" :key="photo.fileid">
|
||||
<Folder v-if="photo.isfolder"
|
||||
:data="photo" :rowHeight="rowHeight" />
|
||||
:data="photo"
|
||||
:rowHeight="rowHeight" />
|
||||
<Photo v-else
|
||||
:data="photo" :rowHeight="rowHeight" :day="item.day"
|
||||
:data="photo"
|
||||
:rowHeight="rowHeight"
|
||||
:day="item.day"
|
||||
:state="state"
|
||||
@select="selectPhoto"
|
||||
@reprocess="deleteFromViewWithAnimation"
|
||||
@clickImg="clickPhoto" />
|
||||
|
|
Loading…
Reference in New Issue