mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 04:33:44 +08:00
5fc93b95cc
This commit contains a few improvements: * Use LinkTo instead of a button with a weird action referencing the controller to navigate to the filtered settings for a plugin * Add an AdminPlugin model with tracked properties and use that when toggling the setting on/off and in the templates * Make it so the Settings button for a plugin navigates to the correct site setting category instead of always just going to the generic "plugins" one if possible
14 lines
367 B
JavaScript
14 lines
367 B
JavaScript
import Route from "@ember/routing/route";
|
|
import AdminPlugin from "admin/models/admin-plugin";
|
|
import { inject as service } from "@ember/service";
|
|
|
|
export default class AdminPluginsRoute extends Route {
|
|
@service router;
|
|
|
|
model() {
|
|
return this.store
|
|
.findAll("plugin")
|
|
.then((plugins) => plugins.map((plugin) => AdminPlugin.create(plugin)));
|
|
}
|
|
}
|