2019-02-27 00:53:52 +08:00
|
|
|
import AdminEmailLogsController from "admin/controllers/admin-email-logs";
|
2019-11-12 02:34:01 +08:00
|
|
|
import discourseDebounce from "discourse/lib/debounce";
|
2018-06-15 23:03:24 +08:00
|
|
|
import IncomingEmail from "admin/models/incoming-email";
|
2020-01-17 01:56:53 +08:00
|
|
|
import { observes } from "discourse-common/utils/decorators";
|
2020-03-11 22:28:16 +08:00
|
|
|
import { INPUT_DELAY } from "discourse-common/config/environment";
|
2016-01-19 07:57:55 +08:00
|
|
|
|
2019-02-27 00:53:52 +08:00
|
|
|
export default AdminEmailLogsController.extend({
|
2020-01-17 01:56:53 +08:00
|
|
|
@observes("filter.{status,from,to,subject,error}")
|
2019-11-12 02:34:01 +08:00
|
|
|
filterIncomingEmails: discourseDebounce(function() {
|
2019-02-27 00:53:52 +08:00
|
|
|
this.loadLogs(IncomingEmail);
|
2020-03-11 22:28:16 +08:00
|
|
|
}, INPUT_DELAY),
|
2019-02-27 00:53:52 +08:00
|
|
|
|
|
|
|
actions: {
|
|
|
|
loadMore() {
|
|
|
|
this.loadLogs(IncomingEmail, true);
|
|
|
|
}
|
|
|
|
}
|
2016-01-19 07:57:55 +08:00
|
|
|
});
|