@ -82,15 +82,19 @@
< / template >
< script >
import axios from '@nextcloud/axios '
import { getCurrentUser } from '@nextcloud/auth '
import { orderBy } from '@nextcloud/files'
import { loadState } from '@nextcloud/initial-state'
import { generateOcsUrl } from '@nextcloud/router'
import { CollectionList } from 'nextcloud-vue-collections'
import axios from '@nextcloud/axios'
import moment from '@nextcloud/moment'
import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar.js'
import Config from '../services/ConfigService.ts'
import { shareWithTitle } from '../utils/SharedWithMe.js'
import Config from '../services/ConfigService.ts'
import Share from '../models/Share.ts'
import ShareTypes from '../mixins/ShareTypes.js'
import SharingEntryInternal from '../components/SharingEntryInternal.vue'
@ -241,7 +245,7 @@ export default {
updateExpirationSubtitle ( share ) {
const expiration = moment ( share . expireDate ) . unix ( )
this . $set ( this . sharedWithMe , 'subtitle' , t ( 'files_sharing' , 'Expires {relativetime}' , {
relativetime : OC . Util . relativeModifiedDate ( expiration * 1000 ) ,
relativetime : moment ( expiration * 1000 ) . fromNow ( ) ,
} ) )
/ / s h a r e h a v e e x p i r e d
@ -310,7 +314,7 @@ export default {
/ / i n t e r v a l u p d a t e
this . expirationInterval = setInterval ( this . updateExpirationSubtitle , 10000 , share )
}
} else if ( this . fileInfo && this . fileInfo . shareOwnerId !== undefined ? this . fileInfo . shareOwnerId !== OC . currentUser : false ) {
} else if ( this . fileInfo && this . fileInfo . shareOwnerId !== undefined ? this . fileInfo . shareOwnerId !== getCurrentUser ( ) . uid : false ) {
/ / F a l l b a c k t o c o m p a r e o w n e r a n d c u r r e n t u s e r .
this . sharedWithMe = {
displayName : this . fileInfo . shareOwner ,