Add timestamp tooltip

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2021-06-02 19:51:52 +00:00
parent fdb55c65f8
commit b13593896e
9 changed files with 60 additions and 49 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -78,6 +78,8 @@
import { encodePath } from '@nextcloud/paths' import { encodePath } from '@nextcloud/paths'
import $ from 'jquery' import $ from 'jquery'
import axios from '@nextcloud/axios' import axios from '@nextcloud/axios'
import moment from '@nextcloud/moment'
import AppSidebar from '@nextcloud/vue/dist/Components/AppSidebar' import AppSidebar from '@nextcloud/vue/dist/Components/AppSidebar'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton' import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent' import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent'
@ -169,6 +171,14 @@ export default {
return OC.Util.relativeModifiedDate(this.fileInfo.mtime) return OC.Util.relativeModifiedDate(this.fileInfo.mtime)
}, },
/**
* File last modified full string
* @returns {string}
*/
fullTime() {
return moment(this.fileInfo.mtime).format('LLL')
},
/** /**
* File size formatted string * File size formatted string
* @returns {string} * @returns {string}
@ -202,6 +212,7 @@ export default {
loading: this.loading, loading: this.loading,
starred: this.fileInfo.isFavourited, starred: this.fileInfo.isFavourited,
subtitle: this.subtitle, subtitle: this.subtitle,
subtitleTooltip: this.fullTime,
title: this.fileInfo.name, title: this.fileInfo.name,
} }
} else if (this.error) { } else if (this.error) {