mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 03:57:24 +08:00

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)));
|
|
}
|
|
}
|