discourse/app/assets/javascripts/admin/addon/routes/admin-site-text-index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
738 B
JavaScript
Raw Normal View History

import Route from "@ember/routing/route";
import { action, getProperties } from "@ember/object";
import { inject as service } from "@ember/service";
import ReseedModal from "admin/components/modal/reseed";
export default class AdminSiteTextIndexRoute extends Route {
@service modal;
queryParams = {
q: { replace: true },
overridden: { replace: true },
outdated: { replace: true },
locale: { replace: true },
};
model(params) {
return this.store.find(
"site-text",
getProperties(params, "q", "overridden", "outdated", "locale")
);
}
setupController(controller, model) {
controller.set("siteTexts", model);
}
@action
showReseedModal() {
this.modal.show(ReseedModal);
}
}