mirror of
https://github.com/discourse/discourse.git
synced 2024-12-14 11:15:48 +08:00
aab2987438
* FEATURE: Log tag group changes in staff action log This commit records every change (add, change, delete) to a tag group in the staff action log. It uses a modal that was originally called ThemeChangeModal to display changes, allowing staffs to see the specific changes clearly. The modal is renamed to StaffActionLogChangeModal in this PR. ref: https://meta.discourse.org/t/-/325011/14 Co-authored-by: Keegan George <kgeorge13@gmail.com>
22 lines
518 B
JavaScript
22 lines
518 B
JavaScript
import Component from "@glimmer/component";
|
|
import { tracked } from "@glimmer/tracking";
|
|
import { action } from "@ember/object";
|
|
import { ajax } from "discourse/lib/ajax";
|
|
|
|
export default class AdminStaffActionLogComponent extends Component {
|
|
@tracked diff;
|
|
|
|
constructor() {
|
|
super(...arguments);
|
|
this.loadDiff();
|
|
}
|
|
|
|
@action
|
|
async loadDiff() {
|
|
const diff = await ajax(
|
|
`/admin/logs/staff_action_logs/${this.args.model.staffActionLog.id}/diff`
|
|
);
|
|
this.diff = diff.side_by_side;
|
|
}
|
|
}
|