New style for file attachment items
This commit is contained in:
parent
76cd9bc55b
commit
e31ea61c97
5 changed files with 39 additions and 1 deletions
|
|
@ -999,6 +999,7 @@ export default {
|
|||
const pinnedEvents = this.$matrix.getPinnedEvents(this.room);
|
||||
updated.forEach((e) => {
|
||||
Vue.set(e, "isPinned", pinnedEvents.includes(e.threadParent ? e.threadParent.getId() : e.getId()));
|
||||
Vue.set(e, "isChannelMessage", (this.room && this.roomDisplayType == ROOM_TYPE_CHANNEL));
|
||||
});
|
||||
|
||||
updated = updated.sort((e1, e2) => {
|
||||
|
|
|
|||
|
|
@ -38,10 +38,16 @@ export default {
|
|||
computed: {
|
||||
fileTypeIcon() {
|
||||
if (util.isFileTypeAPK(this.item.event)) {
|
||||
if (this.item.event.isChannelMessage) {
|
||||
return "$vuetify.icons.ic_channel_apk";
|
||||
}
|
||||
return "$vuetify.icons.ic_apk";
|
||||
} else if (util.isFileTypeIPA(this.item.event)) {
|
||||
return "$vuetify.icons.ic_ipa";
|
||||
} else if (util.isFileTypePDF(this.item.event)) {
|
||||
if (this.item.event.isChannelMessage) {
|
||||
return "$vuetify.icons.ic_channel_pdf";
|
||||
}
|
||||
return "$vuetify.icons.ic_pdf";
|
||||
} else if (util.isFileTypeZip(this.item.event)) {
|
||||
return "$vuetify.icons.ic_zip";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue