#include "ignoreuserspage.hpp" #include "singletons/settingsmanager.hpp" #include "util/layoutcreator.hpp" #include #include #include #include #include // clang-format off #define INFO "/ignore in chat ignores a user\n/unignore in chat unignores a user\n\nChatterino uses the twitch api for ignored users so they are shared with the webchat.\nIf you use your own oauth key make sure that it has the correct permissions." // clang-format on namespace chatterino { namespace widgets { namespace settingspages { IgnoreUsersPage::IgnoreUsersPage() : SettingsPage("Ignore Users", ":/images/theme.svg") { singletons::SettingManager &settings = singletons::SettingManager::getInstance(); util::LayoutCreator layoutCreator(this); auto layout = layoutCreator.setLayoutType(); auto label = layout.emplace(INFO); label->setWordWrap(true); label->setStyleSheet("color: #BBB"); layout.append( this->createCheckBox("Enable twitch ignored users", settings.enableTwitchIgnoredUsers)); auto anyways = layout.emplace().withoutMargin(); { anyways.emplace("Show anyways if:"); anyways.emplace(); anyways->addStretch(1); } auto addremove = layout.emplace().withoutMargin(); { auto add = addremove.emplace("Ignore user"); auto remove = addremove.emplace("Unignore User"); addremove->addStretch(1); } auto userList = layout.emplace(); } } // namespace settingspages } // namespace widgets } // namespace chatterino