mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00

The settings tab of each category channel should now present the option to allow or disallow channel wide mentions: @here and @all. When disallowed, using these mentions in the channel should have no effect.
29 lines
653 B
JavaScript
29 lines
653 B
JavaScript
import discourseLater from "discourse-common/lib/later";
|
|
import Component from "@glimmer/component";
|
|
import { action } from "@ember/object";
|
|
import { tracked } from "@glimmer/tracking";
|
|
import { cancel } from "@ember/runloop";
|
|
|
|
const ACTIVE_DURATION = 2000;
|
|
|
|
export default class ChatChannelSettingsSavedIndicator extends Component {
|
|
@tracked isActive = false;
|
|
property = null;
|
|
|
|
@action
|
|
activate() {
|
|
cancel(this._deactivateHandler);
|
|
|
|
this.isActive = true;
|
|
|
|
this._deactivateHandler = discourseLater(() => {
|
|
this.isActive = false;
|
|
}, ACTIVE_DURATION);
|
|
}
|
|
|
|
@action
|
|
teardown() {
|
|
cancel(this._deactivateHandler);
|
|
}
|
|
}
|