2019-10-24 00:39:32 +08:00
|
|
|
import Route from "@ember/routing/route";
|
2019-11-04 23:56:16 +08:00
|
|
|
import { getProperties } from "@ember/object";
|
2019-03-19 04:09:13 +08:00
|
|
|
import showModal from "discourse/lib/show-modal";
|
|
|
|
|
2019-10-24 00:39:32 +08:00
|
|
|
export default Route.extend({
|
2015-11-24 05:45:05 +08:00
|
|
|
queryParams: {
|
2015-12-01 04:22:58 +08:00
|
|
|
q: { replace: true },
|
|
|
|
overridden: { replace: true },
|
2021-01-19 01:53:45 +08:00
|
|
|
locale: { replace: true },
|
2015-11-24 05:45:05 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
model(params) {
|
2015-12-01 04:22:58 +08:00
|
|
|
return this.store.find(
|
|
|
|
"site-text",
|
2021-01-19 01:53:45 +08:00
|
|
|
getProperties(params, "q", "overridden", "locale")
|
2015-12-01 04:22:58 +08:00
|
|
|
);
|
2015-11-24 05:45:05 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
setupController(controller, model) {
|
|
|
|
controller.set("siteTexts", model);
|
2019-03-19 04:09:13 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
showReseedModal() {
|
|
|
|
showModal("admin-reseed", { admin: true });
|
|
|
|
},
|
2015-11-24 05:45:05 +08:00
|
|
|
},
|
|
|
|
});
|