2019-10-24 00:39:32 +08:00
|
|
|
import Route from "@ember/routing/route";
|
|
|
|
export default Route.extend({
|
2015-02-07 06:32:59 +08:00
|
|
|
model() {
|
2015-02-11 01:14:23 +08:00
|
|
|
return this.store.findAll("plugin");
|
2015-02-07 06:32:59 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
2015-07-03 00:45:17 +08:00
|
|
|
showSettings(plugin) {
|
|
|
|
const controller = this.controllerFor("adminSiteSettings");
|
2015-09-09 01:28:05 +08:00
|
|
|
this.transitionTo("adminSiteSettingsCategory", "plugins").then(() => {
|
2015-07-03 00:45:17 +08:00
|
|
|
if (plugin) {
|
2020-05-10 19:07:45 +08:00
|
|
|
// 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");
|
2015-07-03 00:45:17 +08:00
|
|
|
}
|
|
|
|
});
|
2015-02-07 06:32:59 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|