diff --git a/CHANGELOG.md b/CHANGELOG.md index a0f7ae0ca..8ed1e7ef9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Major: Added "Channel Filters". See https://wiki.chatterino.com/Filters/ for how they work or how to configure them. (#1748, #2083, #2090, #2200) - Major: Added Streamer Mode configuration (under `Settings -> General`), where you can select which features of Chatterino should behave differently when you are in Streamer Mode. (#2001) - Major: Color mentions to match the mentioned users. You can disable this by unchecking "Color @usernames" under `Settings -> General -> Advanced (misc.)`. (#1963, #2284) +- Minor: Added a button to the split context menu to open the moderation view for a channel when the account selected has moderator permissions. (#2321) - Minor: Made BetterTTV emote tooltips use authors' display name. (#2267) - Minor: Added Ctrl + 1/2/3/... and Ctrl+9 shortcuts to Emote Popup (activated with Ctrl+E). They work exactly the same as shortcuts in main window. (#2263) - Minor: Added reconnect link to the "You are banned" message. (#2266) diff --git a/src/widgets/helper/CommonTexts.hpp b/src/widgets/helper/CommonTexts.hpp index 2254f9698..83a2447fb 100644 --- a/src/widgets/helper/CommonTexts.hpp +++ b/src/widgets/helper/CommonTexts.hpp @@ -2,6 +2,7 @@ #define OPEN_IN_BROWSER "Open stream in browser" #define OPEN_PLAYER_IN_BROWSER "Open player in browser" +#define OPEN_MOD_VIEW_IN_BROWSER "Open mod view in browser" #define OPEN_IN_STREAMLINK "Open in streamlink" #define DONT_OPEN "Don't open" #define OPEN_WHISPERS_IN_BROWSER "Open whispers in browser" diff --git a/src/widgets/splits/Split.cpp b/src/widgets/splits/Split.cpp index 260316a62..4a37dd9e0 100644 --- a/src/widgets/splits/Split.cpp +++ b/src/widgets/splits/Split.cpp @@ -630,6 +630,17 @@ void Split::openBrowserPlayer() } } +void Split::openModViewInBrowser() +{ + auto channel = this->getChannel(); + + if (auto twitchChannel = dynamic_cast(channel.get())) + { + QDesktopServices::openUrl("https://twitch.tv/moderator/" + + twitchChannel->getName()); + } +} + void Split::openInStreamlink() { try diff --git a/src/widgets/splits/Split.hpp b/src/widgets/splits/Split.hpp index 587c2199f..c799c19db 100644 --- a/src/widgets/splits/Split.hpp +++ b/src/widgets/splits/Split.hpp @@ -133,6 +133,7 @@ public slots: void popup(); void clear(); void openInBrowser(); + void openModViewInBrowser(); void openWhispersInBrowser(); void openBrowserPlayer(); void openInStreamlink(); diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index bd5330cbc..1d9f79d0f 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -374,6 +374,13 @@ std::unique_ptr SplitHeader::createMainMenu() menu->addAction("Open in custom player", this->split_, &Split::openWithCustomScheme); } + + if (this->split_->getChannel()->hasModRights()) + { + menu->addAction(OPEN_MOD_VIEW_IN_BROWSER, this->split_, + &Split::openModViewInBrowser); + } + menu->addSeparator(); }