mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add 'open in mod view' button to split context menu (#2321)
This commit is contained in:
parent
d3b2ab1d8a
commit
88e31b12a7
|
@ -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 "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: 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)
|
- 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: 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 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)
|
- Minor: Added reconnect link to the "You are banned" message. (#2266)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#define OPEN_IN_BROWSER "Open stream in browser"
|
#define OPEN_IN_BROWSER "Open stream in browser"
|
||||||
#define OPEN_PLAYER_IN_BROWSER "Open player 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 OPEN_IN_STREAMLINK "Open in streamlink"
|
||||||
#define DONT_OPEN "Don't open"
|
#define DONT_OPEN "Don't open"
|
||||||
#define OPEN_WHISPERS_IN_BROWSER "Open whispers in browser"
|
#define OPEN_WHISPERS_IN_BROWSER "Open whispers in browser"
|
||||||
|
|
|
@ -630,6 +630,17 @@ void Split::openBrowserPlayer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Split::openModViewInBrowser()
|
||||||
|
{
|
||||||
|
auto channel = this->getChannel();
|
||||||
|
|
||||||
|
if (auto twitchChannel = dynamic_cast<TwitchChannel *>(channel.get()))
|
||||||
|
{
|
||||||
|
QDesktopServices::openUrl("https://twitch.tv/moderator/" +
|
||||||
|
twitchChannel->getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Split::openInStreamlink()
|
void Split::openInStreamlink()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
@ -133,6 +133,7 @@ public slots:
|
||||||
void popup();
|
void popup();
|
||||||
void clear();
|
void clear();
|
||||||
void openInBrowser();
|
void openInBrowser();
|
||||||
|
void openModViewInBrowser();
|
||||||
void openWhispersInBrowser();
|
void openWhispersInBrowser();
|
||||||
void openBrowserPlayer();
|
void openBrowserPlayer();
|
||||||
void openInStreamlink();
|
void openInStreamlink();
|
||||||
|
|
|
@ -374,6 +374,13 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
|
||||||
menu->addAction("Open in custom player", this->split_,
|
menu->addAction("Open in custom player", this->split_,
|
||||||
&Split::openWithCustomScheme);
|
&Split::openWithCustomScheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->split_->getChannel()->hasModRights())
|
||||||
|
{
|
||||||
|
menu->addAction(OPEN_MOD_VIEW_IN_BROWSER, this->split_,
|
||||||
|
&Split::openModViewInBrowser);
|
||||||
|
}
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue