This commit is expanding on previous work making everything chat working through an URL. Improves drawer templates to be all URLs Implements some kind of router for the drawer Removes few remaining actions for opening channels
20 lines
518 B
JavaScript
20 lines
518 B
JavaScript
import Controller from "@ember/controller";
|
|
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
|
import { action } from "@ember/object";
|
|
import { inject as service } from "@ember/service";
|
|
|
|
export default class ChatChannelToggleController extends Controller.extend(
|
|
ModalFunctionality
|
|
) {
|
|
@service chat;
|
|
@service router;
|
|
|
|
chatChannel = null;
|
|
|
|
@action
|
|
channelStatusChanged(channel) {
|
|
this.send("closeModal");
|
|
this.router.transitionTo("chat.channel", ...channel.routeModels);
|
|
}
|
|
}
|