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";
|
2024-11-20 04:45:18 +08:00
|
|
|
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() {
|
2024-11-20 04:45:18 +08:00
|
|
|
return i18n("admin.plugins.title");
|
2024-08-30 12:53:36 +08:00
|
|
|
}
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|