mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
added usercard button to link to twitch's userbutton
This commit is contained in:
parent
afe5e826a1
commit
74d55941a0
1 changed files with 8 additions and 0 deletions
|
@ -84,6 +84,8 @@ UserInfoPopup::UserInfoPopup()
|
|||
.assign(&this->ui_.ignoreHighlights);
|
||||
auto viewLogs = user.emplace<EffectLabel2>(this);
|
||||
viewLogs->getLabel().setText("Online logs");
|
||||
auto usercard = user.emplace<EffectLabel2>(this);
|
||||
usercard->getLabel().setText("Usercard");
|
||||
|
||||
auto mod = user.emplace<Button>(this);
|
||||
mod->setPixmap(app->resources->buttons.mod);
|
||||
|
@ -103,6 +105,12 @@ UserInfoPopup::UserInfoPopup()
|
|||
logs->show();
|
||||
});
|
||||
|
||||
QObject::connect(usercard.getElement(), &Button::leftClicked, [this] {
|
||||
QDesktopServices::openUrl("https://www.twitch.tv/popout/" +
|
||||
this->channel_->getName() +
|
||||
"/viewercard/" + this->userName_);
|
||||
});
|
||||
|
||||
QObject::connect(mod.getElement(), &Button::leftClicked, [this] {
|
||||
this->channel_->sendMessage("/mod " + this->userName_);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue