2018-06-26 17:42:35 +02:00
|
|
|
#include "BrowserExtensionPage.hpp"
|
2018-06-23 22:49:07 +02:00
|
|
|
|
2018-06-26 14:09:39 +02:00
|
|
|
#include "util/LayoutCreator.hpp"
|
2018-06-23 22:49:07 +02:00
|
|
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
|
|
|
#define CHROME_EXTENSION_LINK \
|
|
|
|
"https://chrome.google.com/webstore/detail/chatterino-native-host/" \
|
|
|
|
"glknmaideaikkmemifbfkhnomoknepka"
|
2018-06-24 10:57:37 +02:00
|
|
|
#define FIREFOX_EXTENSION_LINK \
|
|
|
|
"https://addons.mozilla.org/en-US/firefox/addon/chatterino-native-host/"
|
2018-06-23 22:49:07 +02:00
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
|
|
|
BrowserExtensionPage::BrowserExtensionPage()
|
2018-10-20 00:53:19 +02:00
|
|
|
: SettingsPage("Browser integration", ":/settings/browser.svg")
|
2018-06-23 22:49:07 +02:00
|
|
|
{
|
2018-08-06 21:17:03 +02:00
|
|
|
auto layout =
|
|
|
|
LayoutCreator<BrowserExtensionPage>(this).setLayoutType<QVBoxLayout>();
|
2018-06-23 22:49:07 +02:00
|
|
|
|
2018-08-06 21:17:03 +02:00
|
|
|
auto label = layout.emplace<QLabel>(
|
|
|
|
"The browser extension will replace the default Twitch.tv chat with "
|
|
|
|
"chatterino while chatterino is running.");
|
2018-06-23 22:49:07 +02:00
|
|
|
label->setWordWrap(true);
|
|
|
|
|
|
|
|
auto chrome = layout.emplace<QLabel>("<a href=\"" CHROME_EXTENSION_LINK
|
|
|
|
"\">Download for Google Chrome</a>");
|
|
|
|
chrome->setOpenExternalLinks(true);
|
2018-08-06 21:17:03 +02:00
|
|
|
auto firefox =
|
|
|
|
layout.emplace<QLabel>("<a href=\"" FIREFOX_EXTENSION_LINK
|
|
|
|
"\">Download for Mozilla Firefox</a>");
|
2018-06-23 22:49:07 +02:00
|
|
|
firefox->setOpenExternalLinks(true);
|
|
|
|
layout->addStretch(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace chatterino
|