New style for file attachment items

This commit is contained in:
N-Pex 2024-11-04 11:29:19 +01:00
parent 76cd9bc55b
commit e31ea61c97
5 changed files with 39 additions and 1 deletions

View file

@ -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) => {

View file

@ -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";