feat: mod time title on file info

This commit is contained in:
Ramires Viana 2021-04-23 11:57:56 +00:00
parent 1c25f6ee69
commit 7d1e03075d
2 changed files with 8 additions and 2 deletions

View File

@ -16,7 +16,7 @@
<strong>{{ $t("prompts.size") }}:</strong> <strong>{{ $t("prompts.size") }}:</strong>
<span id="content_length"></span> {{ humanSize }} <span id="content_length"></span> {{ humanSize }}
</p> </p>
<p v-if="selected.length < 2"> <p v-if="selected.length < 2" :title="modTime">
<strong>{{ $t("prompts.lastModified") }}:</strong> {{ humanTime }} <strong>{{ $t("prompts.lastModified") }}:</strong> {{ humanTime }}
</p> </p>
@ -110,6 +110,9 @@ export default {
return moment(this.req.items[this.selected[0]].modified).fromNow(); return moment(this.req.items[this.selected[0]].modified).fromNow();
}, },
modTime: function () {
return new Date(Date.parse(this.req.modified)).toLocaleString();
},
name: function () { name: function () {
return this.selectedCount === 0 return this.selectedCount === 0
? this.req.name ? this.req.name

View File

@ -78,7 +78,7 @@
<div class="share__box__element"> <div class="share__box__element">
<strong>{{ $t("prompts.displayName") }}</strong> {{ req.name }} <strong>{{ $t("prompts.displayName") }}</strong> {{ req.name }}
</div> </div>
<div class="share__box__element"> <div class="share__box__element" :title="modTime">
<strong>{{ $t("prompts.lastModified") }}:</strong> {{ humanTime }} <strong>{{ $t("prompts.lastModified") }}:</strong> {{ humanTime }}
</div> </div>
<div class="share__box__element"> <div class="share__box__element">
@ -244,6 +244,9 @@ export default {
humanTime: function () { humanTime: function () {
return moment(this.req.modified).fromNow(); return moment(this.req.modified).fromNow();
}, },
modTime: function () {
return new Date(Date.parse(this.req.modified)).toLocaleString();
},
}, },
methods: { methods: {
...mapMutations(["resetSelected", "updateRequest", "setLoading"]), ...mapMutations(["resetSelected", "updateRequest", "setLoading"]),