discourse/app/assets/javascripts/admin/addon/routes/admin-email-incomings.js
Kris f0069a4fab
REFACTOR: modernize email logs, fix filtering (#34015)
Started off attempting to fix filters, but was frustrated working with
the old patterns and template duplication so I've updated everything and
tried to consolidate into a `email-logs-list.gjs` component.

The primary issue was that the filters only worked once, and if you
needed to change them or remove them... you couldn't and had to refresh
the page.


Before: 


https://github.com/user-attachments/assets/9cfa0328-41d4-4178-ab87-ba2ff495d932



After:


https://github.com/user-attachments/assets/febcff8f-3dfa-4b86-9be1-f333e6502648
2025-08-27 13:43:12 -04:00

13 lines
384 B
JavaScript
Vendored

import DiscourseRoute from "discourse/routes/discourse";
import IncomingEmail from "admin/models/incoming-email";
export default class AdminEmailIncomingsRoute extends DiscourseRoute {
model() {
return IncomingEmail.findAll({ status: this.status });
}
setupController(controller) {
super.setupController(...arguments);
controller.set("status", this.status);
}
}