discourse/app/assets/javascripts/admin/routes/admin-plugins.js

Failed to ignore revisions in .git-blame-ignore-revs.

23 lines
710 B
JavaScript
Raw Normal View History

import Route from "@ember/routing/route";
export default Route.extend({
model() {
2018-06-15 11:03:24 -04:00
return this.store.findAll("plugin");
},
actions: {
showSettings(plugin) {
2018-06-15 11:03:24 -04:00
const controller = this.controllerFor("adminSiteSettings");
this.transitionTo("adminSiteSettingsCategory", "plugins").then(() => {
if (plugin) {
// filterContent() is normally on a debounce from typing.
// Because we don't want the default of "All Results", we tell it
// to skip the next debounce.
controller.set("filter", `plugin:${plugin.id}`);
controller.set("_skipBounce", true);
controller.filterContentNow("plugins");
}
});
}
}
});