2019-10-24 00:39:32 +08:00
|
|
|
import Route from "@ember/routing/route";
|
2023-03-15 21:17:51 +08:00
|
|
|
import { action, getProperties } from "@ember/object";
|
2019-03-19 04:09:13 +08:00
|
|
|
import showModal from "discourse/lib/show-modal";
|
|
|
|
|
2023-03-15 21:17:51 +08:00
|
|
|
export default class AdminSiteTextIndexRoute extends Route {
|
|
|
|
queryParams = {
|
2015-12-01 04:22:58 +08:00
|
|
|
q: { replace: true },
|
|
|
|
overridden: { replace: true },
|
2023-07-10 10:06:40 +08:00
|
|
|
outdated: { replace: true },
|
2021-01-19 01:53:45 +08:00
|
|
|
locale: { replace: true },
|
2023-03-15 21:17:51 +08:00
|
|
|
};
|
2015-11-24 05:45:05 +08:00
|
|
|
|
|
|
|
model(params) {
|
2015-12-01 04:22:58 +08:00
|
|
|
return this.store.find(
|
|
|
|
"site-text",
|
2023-07-10 10:06:40 +08:00
|
|
|
getProperties(params, "q", "overridden", "outdated", "locale")
|
2015-12-01 04:22:58 +08:00
|
|
|
);
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|
2015-11-24 05:45:05 +08:00
|
|
|
|
|
|
|
setupController(controller, model) {
|
|
|
|
controller.set("siteTexts", model);
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|
2019-03-19 04:09:13 +08:00
|
|
|
|
2023-03-15 21:17:51 +08:00
|
|
|
@action
|
|
|
|
showReseedModal() {
|
|
|
|
showModal("admin-reseed", { admin: true });
|
|
|
|
}
|
|
|
|
}
|