Fixed fallback filename in capture cards
This commit is contained in:
parent
06f6c08b4f
commit
605c132739
2 changed files with 15 additions and 9 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
:class="{ 'uk-card-secondary': $store.state.globalSettings.darkMode }"
|
:class="{ 'uk-card-secondary': $store.state.globalSettings.darkMode }"
|
||||||
>
|
>
|
||||||
<div class="uk-card-media-top">
|
<div class="uk-card-media-top">
|
||||||
<a class="lightbox-link" :href="imgURL" :data-caption="captureState.filename">
|
<a class="lightbox-link" :href="imgURL" :data-caption="fileName">
|
||||||
<img
|
<img
|
||||||
class="uk-width-1-1"
|
class="uk-width-1-1"
|
||||||
:data-src="thumbURL"
|
:data-src="thumbURL"
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
uk-grid
|
uk-grid
|
||||||
>
|
>
|
||||||
<div class="uk-margin-remove-top uk-padding-remove uk-width-expand">
|
<div class="uk-margin-remove-top uk-padding-remove uk-width-expand">
|
||||||
{{ captureState.filename }}
|
{{ fileName }}
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-remove-top uk-padding-remove uk-width-auto">
|
<div class="uk-margin-remove-top uk-padding-remove uk-width-auto">
|
||||||
<a href="#" class="uk-icon" @click="delCaptureConfirm()">
|
<a href="#" class="uk-icon" @click="delCaptureConfirm()">
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<button class="uk-modal-close-default" type="button" uk-close></button>
|
<button class="uk-modal-close-default" type="button" uk-close></button>
|
||||||
<h2 class="uk-modal-title">{{ captureState.filename }}</h2>
|
<h2 class="uk-modal-title">{{ fileName }}</h2>
|
||||||
<p><b>Path: </b>{{ captureState.path }}</p>
|
<p><b>Path: </b>{{ captureState.path }}</p>
|
||||||
<p><b>Time: </b>{{ betterTimestring }}</p>
|
<p><b>Time: </b>{{ betterTimestring }}</p>
|
||||||
<p><b>ID: </b>{{ captureState.metadata.id }}</p>
|
<p><b>ID: </b>{{ captureState.metadata.id }}</p>
|
||||||
|
|
@ -148,6 +148,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
fileName: function() {
|
||||||
|
return this.captureState.filename // If this.captureState.filename exists
|
||||||
|
? this.captureState.filename // Use this.captureState.filename
|
||||||
|
: this.captureState.metadata.filename; // Otherwise use old this.captureState.metadata.filename
|
||||||
|
},
|
||||||
tagModalID: function() {
|
tagModalID: function() {
|
||||||
return this.makeModalName("tag-modal-");
|
return this.makeModalName("tag-modal-");
|
||||||
},
|
},
|
||||||
|
|
@ -164,13 +169,17 @@ export default {
|
||||||
return this.captureURL + "/download?thumbnail=true";
|
return this.captureURL + "/download?thumbnail=true";
|
||||||
},
|
},
|
||||||
imgURL: function() {
|
imgURL: function() {
|
||||||
return this.captureURL + "/download/" + this.captureState.filename;
|
return this.captureURL + "/download/" + this.fileName;
|
||||||
},
|
},
|
||||||
tagURL: function() {
|
tagURL: function() {
|
||||||
return this.captureURL + "/tags";
|
return this.captureURL + "/tags";
|
||||||
},
|
},
|
||||||
captureURL: function() {
|
captureURL: function() {
|
||||||
return this.$store.getters.uri + "/camera/capture/" + this.captureState.metadata.id;
|
return (
|
||||||
|
this.$store.getters.uri +
|
||||||
|
"/camera/capture/" +
|
||||||
|
this.captureState.metadata.id
|
||||||
|
);
|
||||||
},
|
},
|
||||||
betterTimestring: function() {
|
betterTimestring: function() {
|
||||||
var dtSplit = this.captureState.metadata.time.split("_");
|
var dtSplit = this.captureState.metadata.time.split("_");
|
||||||
|
|
|
||||||
|
|
@ -80,10 +80,7 @@
|
||||||
:metadata="item.metadata"
|
:metadata="item.metadata"
|
||||||
:thumbnail="item.thumbnail"
|
:thumbnail="item.thumbnail"
|
||||||
/>
|
/>
|
||||||
<captureCard
|
<captureCard v-else :capture-state="item" />
|
||||||
v-else
|
|
||||||
:captureState="item"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue