mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 22:09:35 +08:00
21 lines
626 B
JavaScript
21 lines
626 B
JavaScript
import Component from "@ember/component";
|
|
import BufferedContent from "discourse/mixins/buffered-content";
|
|
import SettingComponent from "admin/mixins/setting-component";
|
|
import { ajax } from "discourse/lib/ajax";
|
|
import { url } from "discourse/lib/computed";
|
|
|
|
export default Component.extend(BufferedContent, SettingComponent, {
|
|
layoutName: "admin/templates/components/site-setting",
|
|
updateUrl: url("model.id", "/admin/themes/%@/setting"),
|
|
|
|
_save() {
|
|
return ajax(this.updateUrl, {
|
|
type: "PUT",
|
|
data: {
|
|
name: this.setting.setting,
|
|
value: this.get("buffered.value")
|
|
}
|
|
});
|
|
}
|
|
});
|