Files
discourse/plugins/chat/assets/javascripts/discourse/components/chat-channel-settings-saved-indicator.js
Joffrey JAFFEUX 68c4f16a73 FEATURE: channels can allow/disallow @all/@here mentions (#19317)
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.
2022-12-05 17:03:51 +01:00

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);
}
}