mirror of
https://github.com/discourse/discourse.git
synced 2025-05-26 08:11:50 +08:00

* `@ember/owner` instead of `@ember/application` * `discourse-i18n` instead of `I18n` * `{ service } from "@ember/service"` instead of `inject as service`
22 lines
665 B
JavaScript
22 lines
665 B
JavaScript
import Component from "@glimmer/component";
|
|
import { action } from "@ember/object";
|
|
import { getOwner } from "@ember/owner";
|
|
import { service } from "@ember/service";
|
|
import ChatModalArchiveChannel from "discourse/plugins/chat/discourse/components/chat/modal/archive-channel";
|
|
import ChatFabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
|
|
|
export default class ChatStyleguideChatModalArchiveChannel extends Component {
|
|
@service modal;
|
|
|
|
channel = new ChatFabricators(getOwner(this)).channel();
|
|
|
|
@action
|
|
openModal() {
|
|
return this.modal.show(ChatModalArchiveChannel, {
|
|
model: {
|
|
channel: this.channel,
|
|
},
|
|
});
|
|
}
|
|
}
|