2023-02-13 18:53:15 +08:00
|
|
|
import SiteSettingComponent from "./site-setting";
|
2019-06-22 01:49:14 +08:00
|
|
|
import { ajax } from "discourse/lib/ajax";
|
2020-02-04 17:49:17 +08:00
|
|
|
import { url } from "discourse/lib/computed";
|
2018-03-05 08:04:23 +08:00
|
|
|
|
2023-02-13 18:53:15 +08:00
|
|
|
export default class extends SiteSettingComponent {
|
|
|
|
@url("model.id", "/admin/themes/%@/setting") updateUrl;
|
2019-10-28 17:33:31 +08:00
|
|
|
|
2019-10-30 01:01:45 +08:00
|
|
|
_save() {
|
2020-02-04 17:49:17 +08:00
|
|
|
return ajax(this.updateUrl, {
|
2019-10-30 01:01:45 +08:00
|
|
|
type: "PUT",
|
|
|
|
data: {
|
|
|
|
name: this.setting.setting,
|
|
|
|
value: this.get("buffered.value"),
|
|
|
|
},
|
|
|
|
});
|
2023-02-13 18:53:15 +08:00
|
|
|
}
|
|
|
|
}
|