discourse/plugins/chat/assets/javascripts/discourse/chat-route-map.js
Joffrey JAFFEUX d75d64bf16
FEATURE: new jump to channel menu (#22383)
This commit replaces two existing screens:
- draft
- channel selection modal

Main features compared to existing solutions
- features are now combined, meaning you can for example create multi users DM
- it will show users with chat disabled
- it shows unread state
- hopefully a better look/feel
- lots of small details and fixes...

Other noticeable fixes
- starting a DM with a user, even from the user card and clicking <kbd>Chat</kbd> will not show a green dot for the target user (or even the channel) until a message is actually sent
- it should almost never do a full page reload anymore

---------

Co-authored-by: Martin Brennan <mjrbrennan@gmail.com>
Co-authored-by: Jordan Vidrine <30537603+jordanvidrine@users.noreply.github.com>
Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
2023-07-05 18:18:27 +02:00

33 lines
1.1 KiB
JavaScript

export default function () {
this.route("chat", { path: "/chat" }, function () {
// TODO(roman): Remove after the 3.1 release
this.route("channel-legacy", {
path: "/channel/:channelId/:channelTitle",
});
this.route("channel", { path: "/c/:channelTitle/:channelId" }, function () {
this.route("near-message", { path: "/:messageId" });
this.route("threads", { path: "/t" });
this.route("thread", { path: "/t/:threadId" });
});
this.route(
"channel.info",
{ path: "/c/:channelTitle/:channelId/info" },
function () {
this.route("about", { path: "/about" });
this.route("members", { path: "/members" });
this.route("settings", { path: "/settings" });
}
);
this.route("browse", { path: "/browse" }, function () {
this.route("all", { path: "/all" });
this.route("closed", { path: "/closed" });
this.route("open", { path: "/open" });
this.route("archived", { path: "/archived" });
});
this.route("message", { path: "/message/:messageId" });
});
}