Node.js based forum software built for the modern web
feat: add event type to topic event component
Oplikobcb94edeb48f
diff --git a/public/src/modules/helpers.common.js b/public/src/modules/helpers.common.jsindex 706c44c6fa..25907fb446 100644--- a/public/src/modules/helpers.common.js+++ b/public/src/modules/helpers.common.js@@ -196,7 +196,7 @@ module.exports = function (utils, Benchpress, relative_path) {function renderEvents(events) {return events.reduce((html, event) => {- html += `<li component="topic/event" class="timeline-event" data-topic-event-id="${event.id}">+ html += `<li component="topic/event" class="timeline-event" data-topic-event-id="${event.id}" data-topic-event-type="${event.type}"><div class="timeline-badge"><i class="fa ${event.icon || 'fa-circle'}"></i></div>@@ -216,7 +216,7 @@ module.exports = function (utils, Benchpress, relative_path) {html += `<span class="timeago timeline-text" title="${event.timestampISO}"></span>`;if (this.privileges.isAdminOrMod) {- html += ` <span component="topic/event/delete" data-topic-event-id="${event.id}" class="timeline-text pointer" title="[[topic:delete-event]]"><i class="fa fa-trash"></i></span>`;+ html += ` <span component="topic/event/delete" data-topic-event-id="${event.id}" data-topic-event-type="${event.type} class="timeline-text pointer" title="[[topic:delete-event]]"><i class="fa fa-trash"></i></span>`;}return html;