discourse/app/assets/javascripts/admin/addon/routes/admin-dashboard.js
Kelv 1e0d773b54
DEV: duplicate scroll-top util function to lib and replace current usage with new path (#32367)
This was refactored from an actual Mixin some time back. This PR moves
the function to the lib folder and keeps the same logic/interface
otherwise.

We'll remove the mixin file once all non-core repos change to use the
new file.
2025-04-21 08:12:51 +08:00

15 lines
445 B
JavaScript

import { scrollTop } from "discourse/lib/scroll-top";
import DiscourseRoute from "discourse/routes/discourse";
import { i18n } from "discourse-i18n";
export default class AdminDashboardRoute extends DiscourseRoute {
titleToken() {
return i18n("admin.config.dashboard.title");
}
activate() {
this.controllerFor("admin-dashboard").fetchProblems();
this.controllerFor("admin-dashboard").fetchDashboard();
scrollTop();
}
}