mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 22:06:29 +08:00
be33363f13
his is a new feature that lets admins dismiss notices from the dashboard. This helps with self-service in cases where a notice is "stuck", while we work on provisions to prevent "sticking" in the first place.
26 lines
649 B
Plaintext
26 lines
649 B
Plaintext
import Component from "@glimmer/component";
|
|
import { action } from "@ember/object";
|
|
import { htmlSafe } from "@ember/template";
|
|
import DButton from "discourse/components/d-button";
|
|
import icon from "discourse-common/helpers/d-icon";
|
|
|
|
export default class AdminNotice extends Component {
|
|
@action
|
|
dismiss() {
|
|
this.args.dismissCallback(this.args.problem);
|
|
}
|
|
|
|
<template>
|
|
<div class="notice">
|
|
<div class="message">
|
|
{{if @icon (icon @icon)}}
|
|
{{htmlSafe @problem.message}}
|
|
</div>
|
|
<DButton
|
|
@action={{this.dismiss}}
|
|
@label="admin.dashboard.dismiss_notice"
|
|
/>
|
|
</div>
|
|
</template>
|
|
}
|