mirror of
https://github.com/discourse/discourse.git
synced 2024-12-18 23:03:57 +08:00
48193767bf
Automatically generated by `eslint --fix` to satisfy the updated configuration
24 lines
623 B
JavaScript
24 lines
623 B
JavaScript
import { alias } from "@ember/object/computed";
|
|
import { ajax } from "discourse/lib/ajax";
|
|
import { url } from "discourse/lib/computed";
|
|
import SiteSettingComponent from "./site-setting";
|
|
|
|
export default class ThemeTranslation extends SiteSettingComponent {
|
|
@alias("translation") setting;
|
|
@alias("translation.key") settingName;
|
|
@url("model.id", "/admin/themes/%@") updateUrl;
|
|
|
|
type = "string";
|
|
|
|
_save() {
|
|
const translations = {
|
|
[this.get("translation.key")]: this.get("buffered.value"),
|
|
};
|
|
|
|
return ajax(this.updateUrl, {
|
|
type: "PUT",
|
|
data: { theme: { translations } },
|
|
});
|
|
}
|
|
}
|