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.

26 lines
691 B
JavaScript
Raw Normal View History

import Route from "@ember/routing/route";
import { service } from "@ember/service";
import { disableImplicitInjections } from "discourse/lib/implicit-injections";
@disableImplicitInjections
export default class AdminSiteTextIndexRoute extends Route {
@service siteSettings;
@service store;
queryParams = {
q: { replace: true },
overridden: { replace: true },
outdated: { replace: true },
locale: { replace: true },
};
model(params) {
return this.store.find("site-text", {
q: params.q,
overridden: params.overridden ?? false,
outdated: params.outdated ?? false,
locale: params.locale ?? this.siteSettings.default_locale,
});
}
}