File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
apps/files/src/components Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 5959 </span >
6060
6161 <!-- File name -->
62- <span class =" files-list__row-name-text" >{{ displayName }}</span >
62+ <span class =" files-list__row-name-text" >
63+ <!-- Keep the displayName stuck to the extension to avoid whitespace rendering issues-->
64+ <span class =" files-list__row-name-name" v-text =" displayName" />
65+ <span class =" files-list__row-name-ext" v-text =" source.extension" />
66+ </span >
6367 </a >
6468 </td >
6569
@@ -237,8 +241,12 @@ export default Vue.extend({
237241 return this .source ?.fileid ?.toString ?.()
238242 },
239243 displayName() {
240- return this .source .attributes .displayName
241- || this .source .basename
244+ const ext = (this .source .extension || ' ' )
245+ const name = (this .source .attributes .displayName
246+ || this .source .basename )
247+
248+ // Strip extension from name if defined
249+ return ! ext ? name : name .slice (0 , 0 - ext .length )
242250 },
243251
244252 size() {
Original file line number Diff line number Diff line change @@ -299,6 +299,12 @@ export default Vue.extend({
299299 // Make some space for the outline
300300 padding : 5px 10px ;
301301 margin-left : -10px ;
302+ // Align two name and ext
303+ display : inline-flex ;
304+ }
305+
306+ .files-list__row-name-ext {
307+ color : var (--color-text-maxcontrast );
302308 }
303309 }
304310
You can’t perform that action at this time.
0 commit comments