mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-25 03:18:54 +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.
47 lines
1.3 KiB
JavaScript
Vendored
47 lines
1.3 KiB
JavaScript
Vendored
import { tracked } from "@glimmer/tracking";
|
|
import { action } from "@ember/object";
|
|
import discourseDebounce from "discourse/lib/debounce";
|
|
import { INPUT_DELAY } from "discourse/lib/environment";
|
|
import AdminEmailLogsController from "admin/controllers/admin-email-logs";
|
|
import IncomingEmail from "admin/models/incoming-email";
|
|
|
|
export default class AdminEmailLogsRejectedController extends AdminEmailLogsController {
|
|
@tracked filterFrom = "";
|
|
@tracked filterTo = "";
|
|
@tracked filterSubject = "";
|
|
@tracked filterError = "";
|
|
|
|
filters = [
|
|
{ property: "filterFrom", name: "from" },
|
|
{ property: "filterTo", name: "to" },
|
|
{ property: "filterSubject", name: "subject" },
|
|
{ property: "filterError", name: "error" },
|
|
];
|
|
|
|
@action
|
|
updateFilter(filterType, event) {
|
|
const value = event.target.value;
|
|
|
|
switch (filterType) {
|
|
case "from":
|
|
this.filterFrom = value;
|
|
break;
|
|
case "to":
|
|
this.filterTo = value;
|
|
break;
|
|
case "subject":
|
|
this.filterSubject = value;
|
|
break;
|
|
case "error":
|
|
this.filterError = value;
|
|
break;
|
|
}
|
|
|
|
discourseDebounce(this, this.loadLogs, IncomingEmail, INPUT_DELAY);
|
|
}
|
|
|
|
@action
|
|
loadMore() {
|
|
this.loadLogs(IncomingEmail, true);
|
|
}
|
|
}
|