2024-03-07 01:05:11 +08:00
|
|
|
import { service } from "@ember/service";
|
2024-08-30 12:53:36 +08:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
|
|
import I18n from "discourse-i18n";
|
2023-10-11 02:38:59 +08:00
|
|
|
import AdminPlugin from "admin/models/admin-plugin";
|
2023-03-15 21:17:51 +08:00
|
|
|
|
2024-08-30 12:53:36 +08:00
|
|
|
export default class AdminPluginsRoute extends DiscourseRoute {
|
2023-07-19 03:52:55 +08:00
|
|
|
@service router;
|
|
|
|
|
2024-07-06 04:25:42 +08:00
|
|
|
async model() {
|
|
|
|
const plugins = await this.store.findAll("plugin");
|
|
|
|
return plugins.map((plugin) => AdminPlugin.create(plugin));
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|
2024-08-30 12:53:36 +08:00
|
|
|
|
|
|
|
titleToken() {
|
|
|
|
return I18n.t("admin.plugins.title");
|
|
|
|
}
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|