2024-07-25 21:09:06 +08:00
|
|
|
import { service } from "@ember/service";
|
2024-09-10 13:16:16 +08:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
|
|
import I18n from "discourse-i18n";
|
2024-03-18 06:50:39 +08:00
|
|
|
import SiteSetting from "admin/models/site-setting";
|
|
|
|
|
2024-09-10 13:16:16 +08:00
|
|
|
export default class AdminPluginsShowSettingsRoute extends DiscourseRoute {
|
2024-03-18 06:50:39 +08:00
|
|
|
@service router;
|
|
|
|
|
|
|
|
queryParams = {
|
|
|
|
filter: { replace: true },
|
|
|
|
};
|
|
|
|
|
2024-07-06 04:25:42 +08:00
|
|
|
async model(params) {
|
2024-03-18 06:50:39 +08:00
|
|
|
const plugin = this.modelFor("adminPlugins.show");
|
2024-08-20 07:59:43 +08:00
|
|
|
return {
|
|
|
|
plugin,
|
|
|
|
settings: await SiteSetting.findAll({ plugin: plugin.name }),
|
|
|
|
initialFilter: params.filter,
|
|
|
|
};
|
2024-03-18 06:50:39 +08:00
|
|
|
}
|
2024-09-10 13:16:16 +08:00
|
|
|
|
|
|
|
titleToken() {
|
|
|
|
return I18n.t("admin.plugins.change_settings_short");
|
|
|
|
}
|
2024-03-18 06:50:39 +08:00
|
|
|
}
|