This commit introduces the ability to edit the channel
slug from the About tab for the chat channel when the user
is admin. Similar to the create channel modal functionality
introduced in 641e94f, if
the slug is left empty then we autogenerate a slug based
on the channel name, and if the user just changes the slug
manually we use that instead.
We do not do any link remapping or anything else of the
sort, when the category slug is changed that does not happen
either.
21 lines
555 B
JavaScript
21 lines
555 B
JavaScript
import Controller from "@ember/controller";
|
|
import { action } from "@ember/object";
|
|
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
|
import showModal from "discourse/lib/show-modal";
|
|
|
|
export default class ChatChannelInfoAboutController extends Controller.extend(
|
|
ModalFunctionality
|
|
) {
|
|
@action
|
|
onEditChatChannelName() {
|
|
showModal("chat-channel-edit-name-slug", { model: this.model });
|
|
}
|
|
|
|
@action
|
|
onEditChatChannelDescription() {
|
|
showModal("chat-channel-edit-description", {
|
|
model: this.model,
|
|
});
|
|
}
|
|
}
|