3939 </div >
4040 </template >
4141
42+ <!-- author -->
43+ <template #name >
44+ <div class =" version__info" >
45+ <div v-if =" versionLabel" class =" version__info__label" >{{ versionLabel }}</div >
46+ <div v-if =" versionAuthor" class =" version__info version__info__author" >
47+ <div >•</div >
48+ <div >{{ versionAuthor }}</div >
49+ <NcAvatar class =" avatar"
50+ :user =" version.author"
51+ :size =" 24"
52+ :disable-menu =" true"
53+ :disable-tooltip =" true"
54+ :show-user-status =" false" />
55+ </div >
56+ </div >
57+ </template >
58+
4259 <!-- Version file size as subline -->
4360 <template #subname >
4461 <div class =" version__info" >
@@ -113,11 +130,13 @@ import Pencil from 'vue-material-design-icons/Pencil.vue'
113130
114131import NcActionButton from ' @nextcloud/vue/dist/Components/NcActionButton.js'
115132import NcActionLink from ' @nextcloud/vue/dist/Components/NcActionLink.js'
133+ import NcAvatar from ' @nextcloud/vue/dist/Components/NcAvatar.js'
116134import NcListItem from ' @nextcloud/vue/dist/Components/NcListItem.js'
117135import Tooltip from ' @nextcloud/vue/dist/Directives/Tooltip.js'
118136
119137import { defineComponent , type PropType } from ' vue'
120- import { getRootUrl } from ' @nextcloud/router'
138+ import axios from ' @nextcloud/axios'
139+ import { getRootUrl , generateOcsUrl } from ' @nextcloud/router'
121140import { joinPaths } from ' @nextcloud/paths'
122141import { loadState } from ' @nextcloud/initial-state'
123142import { Permission , formatFileSize } from ' @nextcloud/files'
@@ -132,6 +151,7 @@ export default defineComponent({
132151 components: {
133152 NcActionLink ,
134153 NcActionButton ,
154+ NcAvatar ,
135155 NcListItem ,
136156 BackupRestore ,
137157 Download ,
@@ -145,6 +165,10 @@ export default defineComponent({
145165 tooltip: Tooltip ,
146166 },
147167
168+ created() {
169+ this .fetchDisplayName ()
170+ },
171+
148172 filters: {
149173 humanReadableSize(bytes : number ): string {
150174 return formatFileSize (bytes )
@@ -193,6 +217,7 @@ export default defineComponent({
193217 previewLoaded: false ,
194218 previewErrored: false ,
195219 capabilities: loadState (' core' , ' capabilities' , { files: { version_labeling: false , version_deletion: false } }),
220+ versionAuthor: ' ' ,
196221 }
197222 },
198223
@@ -279,6 +304,14 @@ export default defineComponent({
279304 this .$emit (' delete' , this .version )
280305 },
281306
307+ async fetchDisplayName() {
308+ // check to make sure that we have a valid author - in case database did not migrate, null author, etc.
309+ if (this .version .author ) {
310+ const { data } = await axios .get (generateOcsUrl (` /cloud/users/${this .version .author } ` ))
311+ this .versionAuthor = data .ocs .data .displayname
312+ }
313+ },
314+
282315 click() {
283316 if (! this .canView ) {
284317 window .location = this .downloadURL
@@ -310,8 +343,13 @@ export default defineComponent({
310343 align-items : center ;
311344 gap : 0.5rem ;
312345
313- & __size {
346+ & __label {
347+ font-weight : 700 ;
348+ }
349+
350+ & __size , & __author {
314351 color : var (--color-text-lighter );
352+ font-weight : 500 ;
315353 }
316354 }
317355
0 commit comments