DEV: Remove unused `render()` calls (#19224)
`Route#render` and `Route#renderTemplate` have been deprecated and are removed in Ember 4.x (see: https://deprecations.emberjs.com/v3.x#toc_route-render-template) The templates of modified routes in this PR are already automatically inserted into `{{outlet}}`s.
This commit is contained in:
parent
2ecfdb345f
commit
321b14d40c
|
@ -1,10 +1,6 @@
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
renderTemplate() {
|
|
||||||
this.render("admin/templates/logs/screened-emails", { into: "adminLogs" });
|
|
||||||
},
|
|
||||||
|
|
||||||
setupController() {
|
setupController() {
|
||||||
return this.controllerFor("adminLogsScreenedEmails").show();
|
return this.controllerFor("adminLogsScreenedEmails").show();
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
renderTemplate() {
|
|
||||||
this.render("admin/templates/logs/screened-ip-addresses", {
|
|
||||||
into: "adminLogs",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
setupController() {
|
setupController() {
|
||||||
return this.controllerFor("adminLogsScreenedIpAddresses").show();
|
return this.controllerFor("adminLogsScreenedIpAddresses").show();
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
renderTemplate() {
|
|
||||||
this.render("admin/templates/logs/screened-urls", { into: "adminLogs" });
|
|
||||||
},
|
|
||||||
|
|
||||||
setupController() {
|
setupController() {
|
||||||
return this.controllerFor("adminLogsScreenedUrls").show();
|
return this.controllerFor("adminLogsScreenedUrls").show();
|
||||||
},
|
},
|
||||||
|
|
|
@ -34,13 +34,6 @@ export default DiscourseRoute.extend({
|
||||||
return this._super(value, urlKey, defaultValueType);
|
return this._super(value, urlKey, defaultValueType);
|
||||||
},
|
},
|
||||||
|
|
||||||
// TODO: make this automatic using an `{{outlet}}`
|
|
||||||
renderTemplate() {
|
|
||||||
this.render("admin/templates/logs/staff-action-logs", {
|
|
||||||
into: "adminLogs",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
onFiltersChange(filters) {
|
onFiltersChange(filters) {
|
||||||
if (filters && Object.keys(filters) === 0) {
|
if (filters && Object.keys(filters) === 0) {
|
||||||
|
|
|
@ -14,10 +14,6 @@ export default DiscourseRoute.extend({
|
||||||
return AdminUser.find(get(params, "user_id"));
|
return AdminUser.find(get(params, "user_id"));
|
||||||
},
|
},
|
||||||
|
|
||||||
renderTemplate() {
|
|
||||||
this.render({ into: "admin" });
|
|
||||||
},
|
|
||||||
|
|
||||||
afterModel(adminUser) {
|
afterModel(adminUser) {
|
||||||
return adminUser.loadDetails().then(function () {
|
return adminUser.loadDetails().then(function () {
|
||||||
adminUser.setOriginalTrustLevel();
|
adminUser.setOriginalTrustLevel();
|
||||||
|
|
|
@ -23,8 +23,4 @@ export default DiscourseRoute.extend({
|
||||||
model.set("group_ids", model.get("group_ids"));
|
model.set("group_ids", model.get("group_ids"));
|
||||||
controller.setProperties({ model, saved: false });
|
controller.setProperties({ model, saved: false });
|
||||||
},
|
},
|
||||||
|
|
||||||
renderTemplate() {
|
|
||||||
this.render("admin/templates/web-hooks-show", { into: "adminApi" });
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -33,7 +33,7 @@ export default function (filter) {
|
||||||
},
|
},
|
||||||
|
|
||||||
renderTemplate() {
|
renderTemplate() {
|
||||||
this.render("user/posts", { into: "user" });
|
this.render("user/posts");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default DiscourseRoute.extend(ViewingActionType, {
|
||||||
},
|
},
|
||||||
|
|
||||||
renderTemplate() {
|
renderTemplate() {
|
||||||
this.render("user/badges", { into: "user" });
|
this.render("user/badges");
|
||||||
},
|
},
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
|
|
@ -6,10 +6,6 @@ export default DiscourseRoute.extend(ViewingActionType, {
|
||||||
controllerName: "user-notifications",
|
controllerName: "user-notifications",
|
||||||
queryParams: { filter: { refreshModel: true } },
|
queryParams: { filter: { refreshModel: true } },
|
||||||
|
|
||||||
renderTemplate() {
|
|
||||||
this.render("user/notifications");
|
|
||||||
},
|
|
||||||
|
|
||||||
@action
|
@action
|
||||||
didTransition() {
|
didTransition() {
|
||||||
this.controllerFor("user-notifications")._showFooter();
|
this.controllerFor("user-notifications")._showFooter();
|
||||||
|
|
Loading…
Reference in New Issue