diff --git a/src/webpage/localuser.ts b/src/webpage/localuser.ts index d763b7f..5aa8289 100644 --- a/src/webpage/localuser.ts +++ b/src/webpage/localuser.ts @@ -36,7 +36,12 @@ class Localuser { badges = new Map< string, {id: string; description: string; icon: string; link?: string; translate?: boolean} - >(badgeArr); + >( + badgeArr as [ + string, + {id: string; description: string; icon: string; link?: string; translate?: boolean}, + ][], + ); lastSequence: number | null = null; token!: string; userinfo!: Specialuser; diff --git a/src/webpage/message.ts b/src/webpage/message.ts index 867d276..627036a 100644 --- a/src/webpage/message.ts +++ b/src/webpage/message.ts @@ -455,15 +455,19 @@ class Message extends SnowFlake { } if (this.message_reference) { const replyline = document.createElement("div"); + const minipfp = document.createElement("img"); minipfp.classList.add("replypfp"); replyline.appendChild(minipfp); + const username = document.createElement("span"); replyline.appendChild(username); + const reply = document.createElement("div"); username.classList.add("username"); reply.classList.add("replytext", "ellipsis"); replyline.appendChild(reply); + const line2 = document.createElement("hr"); replyline.appendChild(line2); line2.classList.add("reply"); @@ -480,6 +484,11 @@ class Message extends SnowFlake { username.textContent = "Blocked user"; return; } + if (message.attachments.length || message.embeds.length) { + const b = document.createElement("b"); + b.innerText = I18n.getTranslation("message.attached"); + reply.append(b); + } const author = message.author; reply.appendChild(message.content.makeHTML({stdsize: true})); minipfp.src = author.getpfpsrc(); diff --git a/translations/en.json b/translations/en.json index 8138d2a..a3d7341 100644 --- a/translations/en.json +++ b/translations/en.json @@ -321,7 +321,8 @@ "delete": "Delete message", "edit": "Edit message", "edited": "(edited)", - "deleted": "Deleted message" + "deleted": "Deleted message", + "attached": "Sent an attachment" }, "instanceStats": { "name": "Instance stats: $1",