mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-26 01:04:55 +08:00
This was a regression introduced in
f0069a4fab where clicking on an email
log's subject link did not open a modal that displays the details of the
incoming email.
In this commit, the following changes were also made:
1. Make all `admin-email-logs/*` routes inherit from the same parent
route.
Having two different parent routes doing the same thing was probably
something that was missed in the refactor previously.
20 lines
623 B
JavaScript
Vendored
20 lines
623 B
JavaScript
Vendored
import { action } from "@ember/object";
|
|
import { service } from "@ember/service";
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
import IncomingEmailModal from "admin/components/modal/incoming-email";
|
|
import IncomingEmail from "admin/models/incoming-email";
|
|
|
|
export default class AdminEmailLogsRoute extends DiscourseRoute {
|
|
@service modal;
|
|
|
|
setupController(controller) {
|
|
super.setupController(...arguments);
|
|
controller.set("status", this.status);
|
|
}
|
|
|
|
@action
|
|
async showIncomingEmail(id) {
|
|
const model = await IncomingEmail.find(id);
|
|
this.modal.show(IncomingEmailModal, { model });
|
|
}
|
|
}
|