Skip to content

Commit

Permalink
Merge pull request #37152 from nextcloud/artonge/fix/title_foar_versi…
Browse files Browse the repository at this point in the history
…on_date

Use native tooltip for version's date
  • Loading branch information
artonge authored Mar 16, 2023
2 parents 15b80b6 + 97b56da commit ad2e242
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions apps/files_versions/src/components/Version.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</template>
<template #subtitle>
<div class="version__info">
<span v-tooltip="formattedDate">{{ version.mtime | humanDateFromNow }}</span>
<span :title="formattedDate">{{ version.mtime | humanDateFromNow }}</span>
<!-- Separate dot to improve alignement -->
<span class="version__info__size">•</span>
<span class="version__info__size">{{ version.size | humanReadableSize }}</span>
Expand Down Expand Up @@ -223,6 +223,11 @@ export default {
return this.version.preview
}
},

/** @return {string} */
formattedDate() {
return moment(this.version.mtime).format('LLL')
},
},
methods: {
openVersionLabelModal() {
Expand All @@ -245,10 +250,6 @@ export default {
deleteVersion() {
this.$emit('delete', this.version)
},

formattedDate() {
return moment(this.version.mtime)
},
},
}
</script>
Expand Down
Loading

0 comments on commit ad2e242

Please sign in to comment.