2018-06-15 23:03:24 +08:00
|
|
|
import SiteSetting from "admin/models/site-setting";
|
2015-03-03 01:12:19 +08:00
|
|
|
|
|
|
|
export default Discourse.Route.extend({
|
2017-03-22 04:13:19 +08:00
|
|
|
queryParams: {
|
|
|
|
filter: { replace: true }
|
|
|
|
},
|
|
|
|
|
2015-03-03 01:12:19 +08:00
|
|
|
model() {
|
|
|
|
return SiteSetting.findAll();
|
|
|
|
},
|
|
|
|
|
|
|
|
afterModel(siteSettings) {
|
2018-12-11 08:59:59 +08:00
|
|
|
const controller = this.controllerFor("adminSiteSettings");
|
|
|
|
|
2018-12-11 23:48:12 +08:00
|
|
|
if (!controller.get("visibleSiteSettings")) {
|
|
|
|
controller.set("visibleSiteSettings", siteSettings);
|
2018-12-11 08:59:59 +08:00
|
|
|
}
|
2019-05-01 21:44:45 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
refreshAll() {
|
|
|
|
SiteSetting.findAll().then(settings => {
|
|
|
|
this.controllerFor("adminSiteSettings").set("model", settings);
|
|
|
|
});
|
|
|
|
}
|
2015-03-03 01:12:19 +08:00
|
|
|
}
|
|
|
|
});
|