mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-22 05:52:11 +08:00
Fixes an issue where the history link on hover for a theme site setting would point to the staff action logs for regular site settings, not the theme site setting ones which include the theme name in the subject and also have a different `change_theme_site_setting` action. c.f. https://meta.discourse.org/t/link-to-change-history-on-themeable-site-settings/377394
27 lines
713 B
Text
Vendored
27 lines
713 B
Text
Vendored
import { service } from "@ember/service";
|
|
import { i18n } from "discourse-i18n";
|
|
import SiteSettingComponent from "./site-setting";
|
|
|
|
export default class ThemeSiteSettingEditor extends SiteSettingComponent {
|
|
@service toasts;
|
|
|
|
get staffLogFilter() {
|
|
return {
|
|
subject: `${this.args.model.name}: ${this.setting.setting}`,
|
|
action_name: "change_theme_site_setting",
|
|
};
|
|
}
|
|
|
|
_save() {
|
|
return this.setting
|
|
.updateSetting(this.args.model.id, this.buffered.get("value"))
|
|
.then(() => {
|
|
this.toasts.success({
|
|
data: {
|
|
message: i18n("admin.customize.theme.theme_site_setting_saved"),
|
|
},
|
|
duration: "short",
|
|
});
|
|
});
|
|
}
|
|
}
|