Compare commits

...

8 commits

Author SHA1 Message Date
pajlada
b9e265e944
Merge f54bdf939a into d3000ba597 2024-11-03 13:30:19 +01:00
nerix
d3000ba597
feat: show warning before blocking followed channel (#5615) 2024-11-03 12:29:57 +00:00
nerix
8220a1fbd4
feat: make usernames in USERNOTICEs clickable (#5686) 2024-11-03 11:17:16 +00:00
pajlada
403fc6d3c4
fix: ensure timer doesn't run if the QuickSwitcherPopup is dead (#5687) 2024-11-03 10:49:00 +00:00
nerix
4b725c4d6b
fix(7TV): ignore entitlement.reset (#5685) 2024-11-02 22:32:49 +01:00
Rasmus Karlsson
f54bdf939a
add changelog entry 2024-09-08 14:54:02 +02:00
Rasmus Karlsson
adf124c11b
feat: add SettingWidget
bit more like a builder pattern for adding settings to settings pages

i have migrated a few settings, but don't want to do all of them
2024-09-08 14:52:11 +02:00
Rasmus Karlsson
74101d40f5
fix: only require one of the keywords to match when searching for
settings
2024-09-08 14:30:16 +02:00
32 changed files with 710 additions and 228 deletions

View file

@ -34,10 +34,12 @@
- Minor: Moderators can now see which mods start and cancel raids. (#5563) - Minor: Moderators can now see which mods start and cancel raids. (#5563)
- Minor: The emote popup now reloads when Twitch emotes are reloaded. (#5580) - Minor: The emote popup now reloads when Twitch emotes are reloaded. (#5580)
- Minor: Added `--login <username>` CLI argument to specify which account to start logged in as. (#5626) - Minor: Added `--login <username>` CLI argument to specify which account to start logged in as. (#5626)
- Minor: When blocking a channel, Chatterino will now warn you about that action. (#5615)
- Minor: Indicate when subscriptions and resubscriptions are for multiple months. (#5642) - Minor: Indicate when subscriptions and resubscriptions are for multiple months. (#5642)
- Minor: Proxy URL information is now included in the `/debug-env` command. (#5648) - Minor: Proxy URL information is now included in the `/debug-env` command. (#5648)
- Minor: Make raid entry message usernames clickable. (#5651) - Minor: Make raid entry message usernames clickable. (#5651)
- Minor: Tabs unhighlight when their content is read in other tabs. (#5649) - Minor: Tabs unhighlight when their content is read in other tabs. (#5649)
- Minor: Made usernames in bits and sub messages clickable. (#5686)
- Bugfix: Fixed tab move animation occasionally failing to start after closing a tab. (#5426, #5612) - Bugfix: Fixed tab move animation occasionally failing to start after closing a tab. (#5426, #5612)
- Bugfix: If a network request errors with 200 OK, Qt's error code is now reported instead of the HTTP status. (#5378) - Bugfix: If a network request errors with 200 OK, Qt's error code is now reported instead of the HTTP status. (#5378)
- Bugfix: Fixed restricted users usernames not being clickable. (#5405) - Bugfix: Fixed restricted users usernames not being clickable. (#5405)
@ -55,6 +57,7 @@
- Bugfix: Fixed event emotes not showing up in autocomplete and popups. (#5239, #5580, #5582, #5632) - Bugfix: Fixed event emotes not showing up in autocomplete and popups. (#5239, #5580, #5582, #5632)
- Bugfix: Fixed tab visibility being controllable in the emote popup. (#5530) - Bugfix: Fixed tab visibility being controllable in the emote popup. (#5530)
- Bugfix: Fixed account switch not being saved if no other settings were changed. (#5558) - Bugfix: Fixed account switch not being saved if no other settings were changed. (#5558)
- Bugfix: Fixed a crash that could occur when handling the quick switcher popup really quickly. (#5687)
- Bugfix: Fixed 7TV badges being inadvertently animated. (#5674) - Bugfix: Fixed 7TV badges being inadvertently animated. (#5674)
- Bugfix: Fixed some tooltips not being readable. (#5578) - Bugfix: Fixed some tooltips not being readable. (#5578)
- Bugfix: Fixed log files being locked longer than needed. (#5592) - Bugfix: Fixed log files being locked longer than needed. (#5592)
@ -74,6 +77,7 @@
- Dev: Refactor and document `Scrollbar`. (#5334, #5393) - Dev: Refactor and document `Scrollbar`. (#5334, #5393)
- Dev: Refactor `TwitchIrcServer`, making it abstracted. (#5421, #5435) - Dev: Refactor `TwitchIrcServer`, making it abstracted. (#5421, #5435)
- Dev: Reduced the amount of scale events. (#5404, #5406) - Dev: Reduced the amount of scale events. (#5404, #5406)
- Dev: Refactored settings widget creation. (#5585)
- Dev: Removed unused timegate settings. (#5361) - Dev: Removed unused timegate settings. (#5361)
- Dev: Add `Channel::addSystemMessage` helper function, allowing us to avoid the common `channel->addMessage(makeSystemMessage(...));` pattern. (#5500) - Dev: Add `Channel::addSystemMessage` helper function, allowing us to avoid the common `channel->addMessage(makeSystemMessage(...));` pattern. (#5500)
- Dev: Unsingletonize `Resources2`. (#5460) - Dev: Unsingletonize `Resources2`. (#5460)
@ -118,6 +122,7 @@
- Dev: Refactored IRC message building. (#5663) - Dev: Refactored IRC message building. (#5663)
- Dev: Fixed some compiler warnings. (#5672) - Dev: Fixed some compiler warnings. (#5672)
- Dev: Unified parsing of historic and live IRC messages. (#5678) - Dev: Unified parsing of historic and live IRC messages. (#5678)
- Dev: 7TV's `entitlement.reset` is now explicitly ignored. (#5685)
## 2.5.1 ## 2.5.1

View file

@ -422,7 +422,7 @@ public:
// get followed channel // get followed channel
MOCK_METHOD( MOCK_METHOD(
void, getFollowedChannel, void, getFollowedChannel,
(QString userID, QString broadcasterID, (QString userID, QString broadcasterID, const QObject *caller,
ResultCallback<std::optional<HelixFollowedChannel>> successCallback, ResultCallback<std::optional<HelixFollowedChannel>> successCallback,
FailureCallback<QString> failureCallback), FailureCallback<QString> failureCallback),
(override)); (override));

View file

@ -61,6 +61,11 @@ chatterino--DescriptionLabel {
color: #999; color: #999;
} }
QLabel#description {
color: #999;
padding-left: 10px;
}
chatterino--NavigationLabel { chatterino--NavigationLabel {
font-family: "Segoe UI light"; font-family: "Segoe UI light";
font-size: 15px; font-size: 15px;

View file

@ -720,6 +720,8 @@ set(SOURCE_FILES
widgets/settingspages/PluginsPage.hpp widgets/settingspages/PluginsPage.hpp
widgets/settingspages/SettingsPage.cpp widgets/settingspages/SettingsPage.cpp
widgets/settingspages/SettingsPage.hpp widgets/settingspages/SettingsPage.hpp
widgets/settingspages/SettingWidget.cpp
widgets/settingspages/SettingWidget.hpp
widgets/splits/ClosedSplits.cpp widgets/splits/ClosedSplits.cpp
widgets/splits/ClosedSplits.hpp widgets/splits/ClosedSplits.hpp

View file

@ -75,6 +75,8 @@ const QRegularExpression mentionRegex("^@" + regexHelpString);
// if findAllUsernames setting is enabled, matches strings like in the examples above, but without @ symbol at the beginning // if findAllUsernames setting is enabled, matches strings like in the examples above, but without @ symbol at the beginning
const QRegularExpression allUsernamesMentionRegex("^" + regexHelpString); const QRegularExpression allUsernamesMentionRegex("^" + regexHelpString);
const QRegularExpression SPACE_REGEX("\\s");
const QSet<QString> zeroWidthEmotes{ const QSet<QString> zeroWidthEmotes{
"SoSnowy", "IceCold", "SantaHat", "TopHat", "SoSnowy", "IceCold", "SantaHat", "TopHat",
"ReinDeer", "CandyCane", "cvMask", "cvHazmat", "ReinDeer", "CandyCane", "cvMask", "cvHazmat",
@ -512,7 +514,7 @@ MessageBuilder::MessageBuilder(SystemMessageTag, const QString &text,
// check system message for links // check system message for links
// (e.g. needed for sub ticket message in sub only mode) // (e.g. needed for sub ticket message in sub only mode)
const QStringList textFragments = const QStringList textFragments =
text.split(QRegularExpression("\\s"), Qt::SkipEmptyParts); text.split(SPACE_REGEX, Qt::SkipEmptyParts);
for (const auto &word : textFragments) for (const auto &word : textFragments)
{ {
auto link = linkparser::parse(word); auto link = linkparser::parse(word);
@ -531,33 +533,100 @@ MessageBuilder::MessageBuilder(SystemMessageTag, const QString &text,
this->message().searchText = text; this->message().searchText = text;
} }
MessageBuilder::MessageBuilder(RaidEntryMessageTag, const QString &text, MessagePtrMut MessageBuilder::makeSystemMessageWithUser(
const QString &loginName, const QString &text, const QString &loginName, const QString &displayName,
const QString &displayName, const MessageColor &userColor, const QTime &time)
const MessageColor &userColor, const QTime &time)
: MessageBuilder()
{ {
this->emplace<TimestampElement>(time); MessageBuilder builder;
builder.emplace<TimestampElement>(time);
const QStringList textFragments = const auto textFragments = text.split(SPACE_REGEX, Qt::SkipEmptyParts);
text.split(QRegularExpression("\\s"), Qt::SkipEmptyParts);
for (const auto &word : textFragments) for (const auto &word : textFragments)
{ {
if (word == displayName) if (word == displayName)
{ {
this->emplace<MentionElement>(displayName, loginName, builder.emplace<MentionElement>(displayName, loginName,
MessageColor::System, userColor); MessageColor::System, userColor);
continue; continue;
} }
this->emplace<TextElement>(word, MessageElementFlag::Text, builder.emplace<TextElement>(word, MessageElementFlag::Text,
MessageColor::System); MessageColor::System);
} }
this->message().flags.set(MessageFlag::System); builder->flags.set(MessageFlag::System);
this->message().flags.set(MessageFlag::DoNotTriggerNotification); builder->flags.set(MessageFlag::DoNotTriggerNotification);
this->message().messageText = text; builder->messageText = text;
this->message().searchText = text; builder->searchText = text;
return builder.release();
}
MessagePtrMut MessageBuilder::makeSubgiftMessage(const QString &text,
const QVariantMap &tags,
const QTime &time)
{
MessageBuilder builder;
builder.emplace<TimestampElement>(time);
auto gifterLogin = tags.value("login").toString();
auto gifterDisplayName = tags.value("display-name").toString();
if (gifterDisplayName.isEmpty())
{
gifterDisplayName = gifterLogin;
}
MessageColor gifterColor = MessageColor::System;
if (auto colorTag = tags.value("color").value<QColor>(); colorTag.isValid())
{
gifterColor = MessageColor(colorTag);
}
auto recipientLogin =
tags.value("msg-param-recipient-user-name").toString();
if (recipientLogin.isEmpty())
{
recipientLogin = tags.value("msg-param-recipient-name").toString();
}
auto recipientDisplayName =
tags.value("msg-param-recipient-display-name").toString();
if (recipientDisplayName.isEmpty())
{
recipientDisplayName = recipientLogin;
}
const auto textFragments = text.split(SPACE_REGEX, Qt::SkipEmptyParts);
for (const auto &word : textFragments)
{
if (word == gifterDisplayName)
{
builder.emplace<MentionElement>(gifterDisplayName, gifterLogin,
MessageColor::System, gifterColor);
continue;
}
if (word.endsWith('!') &&
word.size() == recipientDisplayName.size() + 1 &&
word.startsWith(recipientDisplayName))
{
builder
.emplace<MentionElement>(recipientDisplayName, recipientLogin,
MessageColor::System,
MessageColor::System)
->setTrailingSpace(false);
builder.emplace<TextElement>(u"!"_s, MessageElementFlag::Text,
MessageColor::System);
continue;
}
builder.emplace<TextElement>(word, MessageElementFlag::Text,
MessageColor::System);
}
builder->flags.set(MessageFlag::System);
builder->flags.set(MessageFlag::DoNotTriggerNotification);
builder->messageText = text;
builder->searchText = text;
return builder.release();
} }
MessageBuilder::MessageBuilder(TimeoutMessageTag, const QString &timeoutUser, MessageBuilder::MessageBuilder(TimeoutMessageTag, const QString &timeoutUser,

View file

@ -52,8 +52,6 @@ namespace linkparser {
struct SystemMessageTag { struct SystemMessageTag {
}; };
struct RaidEntryMessageTag {
};
struct TimeoutMessageTag { struct TimeoutMessageTag {
}; };
struct LiveUpdatesUpdateEmoteMessageTag { struct LiveUpdatesUpdateEmoteMessageTag {
@ -69,7 +67,6 @@ struct ImageUploaderResultTag {
// NOLINTBEGIN(readability-identifier-naming) // NOLINTBEGIN(readability-identifier-naming)
const SystemMessageTag systemMessage{}; const SystemMessageTag systemMessage{};
const RaidEntryMessageTag raidEntryMessage{};
const TimeoutMessageTag timeoutMessage{}; const TimeoutMessageTag timeoutMessage{};
const LiveUpdatesUpdateEmoteMessageTag liveUpdatesUpdateEmoteMessage{}; const LiveUpdatesUpdateEmoteMessageTag liveUpdatesUpdateEmoteMessage{};
const LiveUpdatesRemoveEmoteMessageTag liveUpdatesRemoveEmoteMessage{}; const LiveUpdatesRemoveEmoteMessageTag liveUpdatesRemoveEmoteMessage{};
@ -109,9 +106,6 @@ public:
MessageBuilder(SystemMessageTag, const QString &text, MessageBuilder(SystemMessageTag, const QString &text,
const QTime &time = QTime::currentTime()); const QTime &time = QTime::currentTime());
MessageBuilder(RaidEntryMessageTag, const QString &text,
const QString &loginName, const QString &displayName,
const MessageColor &userColor, const QTime &time);
MessageBuilder(TimeoutMessageTag, const QString &timeoutUser, MessageBuilder(TimeoutMessageTag, const QString &timeoutUser,
const QString &sourceUser, const QString &systemMessageText, const QString &sourceUser, const QString &systemMessageText,
int times, const QTime &time = QTime::currentTime()); int times, const QTime &time = QTime::currentTime());
@ -255,6 +249,15 @@ public:
const std::shared_ptr<MessageThread> &thread = {}, const std::shared_ptr<MessageThread> &thread = {},
const MessagePtr &parent = {}); const MessagePtr &parent = {});
static MessagePtrMut makeSystemMessageWithUser(
const QString &text, const QString &loginName,
const QString &displayName, const MessageColor &userColor,
const QTime &time);
static MessagePtrMut makeSubgiftMessage(const QString &text,
const QVariantMap &tags,
const QTime &time);
private: private:
struct TextState { struct TextState {
TwitchChannel *twitchChannel = nullptr; TwitchChannel *twitchChannel = nullptr;

View file

@ -233,6 +233,10 @@ void SeventvEventAPI::handleDispatch(const Dispatch &dispatch)
} }
} }
break; break;
case SubscriptionType::ResetEntitlement: {
// unhandled (not clear what we'd do here yet)
}
break;
default: { default: {
qCDebug(chatterinoSeventvEventAPI) qCDebug(chatterinoSeventvEventAPI)
<< "Unknown subscription type:" << "Unknown subscription type:"

View file

@ -27,6 +27,7 @@ enum class SubscriptionType {
CreateEntitlement, CreateEntitlement,
UpdateEntitlement, UpdateEntitlement,
DeleteEntitlement, DeleteEntitlement,
ResetEntitlement,
INVALID, INVALID,
}; };
@ -119,6 +120,8 @@ constexpr magic_enum::customize::customize_t magic_enum::customize::enum_name<
return "entitlement.update"; return "entitlement.update";
case SubscriptionType::DeleteEntitlement: case SubscriptionType::DeleteEntitlement:
return "entitlement.delete"; return "entitlement.delete";
case SubscriptionType::ResetEntitlement:
return "entitlement.reset";
default: default:
return default_tag; return default_tag;

View file

@ -699,35 +699,6 @@ void IrcMessageHandler::parseUserNoticeMessageInto(Communi::IrcMessage *message,
{ {
messageText = "Announcement"; messageText = "Announcement";
} }
else if (msgType == "raid")
{
auto login = tags.value("login").toString();
auto displayName = tags.value("msg-param-displayName").toString();
if (!login.isEmpty() && !displayName.isEmpty())
{
MessageColor color = MessageColor::System;
if (auto colorTag = tags.value("color").value<QColor>();
colorTag.isValid())
{
color = MessageColor(colorTag);
}
auto b = MessageBuilder(
raidEntryMessage, parseTagString(messageText), login,
displayName, color, calculateMessageTime(message).time());
b->flags.set(MessageFlag::Subscription);
if (mirrored)
{
b->flags.set(MessageFlag::SharedMessage);
}
auto newMessage = b.release();
sink.addMessage(newMessage, MessageContext::Original);
return;
}
}
else if (msgType == "subgift") else if (msgType == "subgift")
{ {
if (auto monthsIt = tags.find("msg-param-gift-months"); if (auto monthsIt = tags.find("msg-param-gift-months");
@ -762,6 +733,20 @@ void IrcMessageHandler::parseUserNoticeMessageInto(Communi::IrcMessage *message,
} }
} }
} }
// subgifts are special because they include two users
auto msg = MessageBuilder::makeSubgiftMessage(
parseTagString(messageText), tags,
calculateMessageTime(message).time());
msg->flags.set(MessageFlag::Subscription);
if (mirrored)
{
msg->flags.set(MessageFlag::SharedMessage);
}
sink.addMessage(msg, MessageContext::Original);
return;
} }
else if (msgType == "sub" || msgType == "resub") else if (msgType == "sub" || msgType == "resub")
{ {
@ -795,17 +780,37 @@ void IrcMessageHandler::parseUserNoticeMessageInto(Communi::IrcMessage *message,
} }
} }
auto b = MessageBuilder(systemMessage, parseTagString(messageText), auto displayName = [&] {
calculateMessageTime(message).time()); if (msgType == u"raid")
{
return tags.value("msg-param-displayName").toString();
}
return tags.value("display-name").toString();
}();
auto login = tags.value("login").toString();
if (displayName.isEmpty())
{
displayName = login;
}
b->flags.set(MessageFlag::Subscription); MessageColor userColor = MessageColor::System;
if (auto colorTag = tags.value("color").value<QColor>();
colorTag.isValid())
{
userColor = MessageColor(colorTag);
}
auto msg = MessageBuilder::makeSystemMessageWithUser(
parseTagString(messageText), login, displayName, userColor,
calculateMessageTime(message).time());
msg->flags.set(MessageFlag::Subscription);
if (mirrored) if (mirrored)
{ {
b->flags.set(MessageFlag::SharedMessage); msg->flags.set(MessageFlag::SharedMessage);
} }
auto newMessage = b.release();
sink.addMessage(newMessage, MessageContext::Original); sink.addMessage(msg, MessageContext::Original);
} }
} }

View file

@ -274,7 +274,7 @@ void TwitchChannel::refreshTwitchChannelEmotes(bool manualRefresh)
getHelix()->getFollowedChannel( getHelix()->getFollowedChannel(
getApp()->getAccounts()->twitch.getCurrent()->getUserId(), getApp()->getAccounts()->twitch.getCurrent()->getUserId(),
this->roomId(), this->roomId(), nullptr,
[weak{this->weak_from_this()}, makeEmotes](const auto &chan) { [weak{this->weak_from_this()}, makeEmotes](const auto &chan) {
auto self = std::dynamic_pointer_cast<TwitchChannel>(weak.lock()); auto self = std::dynamic_pointer_cast<TwitchChannel>(weak.lock());
if (!self || !chan) if (!self || !chan)

View file

@ -3138,7 +3138,7 @@ void Helix::getUserEmotes(
} }
void Helix::getFollowedChannel( void Helix::getFollowedChannel(
QString userID, QString broadcasterID, QString userID, QString broadcasterID, const QObject *caller,
ResultCallback<std::optional<HelixFollowedChannel>> successCallback, ResultCallback<std::optional<HelixFollowedChannel>> successCallback,
FailureCallback<QString> failureCallback) FailureCallback<QString> failureCallback)
{ {
@ -3147,6 +3147,7 @@ void Helix::getFollowedChannel(
{u"user_id"_s, userID}, {u"user_id"_s, userID},
{u"broadcaster_id"_s, broadcasterID}, {u"broadcaster_id"_s, broadcasterID},
}) })
.caller(caller)
.onSuccess([successCallback](auto result) { .onSuccess([successCallback](auto result) {
if (result.status() != 200) if (result.status() != 200)
{ {

View file

@ -1143,7 +1143,7 @@ public:
/// https://dev.twitch.tv/docs/api/reference/#get-followed-channels /// https://dev.twitch.tv/docs/api/reference/#get-followed-channels
/// (non paginated) /// (non paginated)
virtual void getFollowedChannel( virtual void getFollowedChannel(
QString userID, QString broadcasterID, QString userID, QString broadcasterID, const QObject *caller,
ResultCallback<std::optional<HelixFollowedChannel>> successCallback, ResultCallback<std::optional<HelixFollowedChannel>> successCallback,
FailureCallback<QString> failureCallback) = 0; FailureCallback<QString> failureCallback) = 0;
@ -1486,7 +1486,7 @@ public:
/// https://dev.twitch.tv/docs/api/reference/#get-followed-channels /// https://dev.twitch.tv/docs/api/reference/#get-followed-channels
/// (non paginated) /// (non paginated)
void getFollowedChannel( void getFollowedChannel(
QString userID, QString broadcasterID, QString userID, QString broadcasterID, const QObject *caller,
ResultCallback<std::optional<HelixFollowedChannel>> successCallback, ResultCallback<std::optional<HelixFollowedChannel>> successCallback,
FailureCallback<QString> failureCallback) final; FailureCallback<QString> failureCallback) final;

View file

@ -41,6 +41,7 @@ DraggablePopup::DraggablePopup(bool closeAutomatically, QWidget *parent)
BaseWindow::ClearBuffersOnDpiChange, BaseWindow::ClearBuffersOnDpiChange,
parent) parent)
, lifetimeHack_(std::make_shared<bool>(false)) , lifetimeHack_(std::make_shared<bool>(false))
, closeAutomatically_(closeAutomatically)
, dragTimer_(this) , dragTimer_(this)
{ {
@ -128,4 +129,14 @@ Button *DraggablePopup::createPinButton()
return this->pinButton_; return this->pinButton_;
} }
bool DraggablePopup::ensurePinned()
{
if (this->closeAutomatically_ && !this->isPinned_)
{
this->togglePinned();
return true;
}
return false;
}
} // namespace chatterino } // namespace chatterino

View file

@ -38,10 +38,18 @@ protected:
// button pixmap // button pixmap
void togglePinned(); void togglePinned();
/// Ensures that this popup is pinned (if it's expected to close automatically)
///
/// @returns `true` if the popup was pinned as a result (i.e. if the popup
/// was unpinned and said to automatically close before)
bool ensurePinned();
private: private:
// isMoving_ is set to true if the user is holding the left mouse button down and has moved the mouse a small amount away from the original click point (startPosDrag_) // isMoving_ is set to true if the user is holding the left mouse button down and has moved the mouse a small amount away from the original click point (startPosDrag_)
bool isMoving_ = false; bool isMoving_ = false;
bool closeAutomatically_ = false;
// startPosDrag_ is the coordinates where the user originally pressed the mouse button down to start dragging // startPosDrag_ is the coordinates where the user originally pressed the mouse button down to start dragging
QPoint startPosDrag_; QPoint startPosDrag_;

View file

@ -2,6 +2,7 @@
#include "Application.hpp" #include "Application.hpp"
#include "common/Channel.hpp" #include "common/Channel.hpp"
#include "common/Literals.hpp"
#include "common/network/NetworkRequest.hpp" #include "common/network/NetworkRequest.hpp"
#include "common/QLogging.hpp" #include "common/QLogging.hpp"
#include "controllers/accounts/AccountController.hpp" #include "controllers/accounts/AccountController.hpp"
@ -37,6 +38,8 @@
#include <QCheckBox> #include <QCheckBox>
#include <QDesktopServices> #include <QDesktopServices>
#include <QMessageBox>
#include <QMetaEnum>
#include <QNetworkAccessManager> #include <QNetworkAccessManager>
#include <QNetworkReply> #include <QNetworkReply>
#include <QPointer> #include <QPointer>
@ -141,6 +144,8 @@ int calculateTimeoutDuration(TimeoutButton timeout)
namespace chatterino { namespace chatterino {
using namespace literals;
UserInfoPopup::UserInfoPopup(bool closeAutomatically, Split *split) UserInfoPopup::UserInfoPopup(bool closeAutomatically, Split *split)
: DraggablePopup(closeAutomatically, split) : DraggablePopup(closeAutomatically, split)
, split_(split) , split_(split)
@ -623,57 +628,72 @@ void UserInfoPopup::installEvents()
return; return;
} }
switch (newState) if (newState == Qt::Unchecked)
{ {
case Qt::CheckState::Unchecked: { this->ui_.block->setEnabled(false);
this->ui_.block->setEnabled(false);
getApp()->getAccounts()->twitch.getCurrent()->unblockUser( getApp()->getAccounts()->twitch.getCurrent()->unblockUser(
this->userId_, this, this->userId_, this,
[this, reenableBlockCheckbox, currentUser] { [this, reenableBlockCheckbox, currentUser] {
this->channel_->addSystemMessage( this->channel_->addSystemMessage(
QString("You successfully unblocked user %1") QString("You successfully unblocked user %1")
.arg(this->userName_)); .arg(this->userName_));
reenableBlockCheckbox(); reenableBlockCheckbox();
}, },
[this, reenableBlockCheckbox] { [this, reenableBlockCheckbox] {
this->channel_->addSystemMessage( this->channel_->addSystemMessage(
QString( QString("User %1 couldn't be unblocked, an unknown "
"User %1 couldn't be unblocked, an unknown "
"error occurred!") "error occurred!")
.arg(this->userName_)); .arg(this->userName_));
reenableBlockCheckbox(); reenableBlockCheckbox();
}); });
} return;
break;
case Qt::CheckState::PartiallyChecked: {
// We deliberately ignore this state
}
break;
case Qt::CheckState::Checked: {
this->ui_.block->setEnabled(false);
getApp()->getAccounts()->twitch.getCurrent()->blockUser(
this->userId_, this,
[this, reenableBlockCheckbox, currentUser] {
this->channel_->addSystemMessage(
QString("You successfully blocked user %1")
.arg(this->userName_));
reenableBlockCheckbox();
},
[this, reenableBlockCheckbox] {
this->channel_->addSystemMessage(
QString(
"User %1 couldn't be blocked, an unknown "
"error occurred!")
.arg(this->userName_));
reenableBlockCheckbox();
});
}
break;
} }
if (newState == Qt::Checked)
{
this->ui_.block->setEnabled(false);
bool wasPinned = this->ensurePinned();
auto btn = QMessageBox::warning(
this, u"Blocking " % this->userName_,
u"Blocking %1 can cause unintended side-effects like unfollowing.\n\n"_s
"Are you sure you want to block %1?".arg(this->userName_),
QMessageBox::Yes | QMessageBox::Cancel,
QMessageBox::Cancel);
if (wasPinned)
{
this->togglePinned();
}
if (btn != QMessageBox::Yes)
{
reenableBlockCheckbox();
QSignalBlocker blocker(this->ui_.block);
this->ui_.block->setCheckState(Qt::Unchecked);
return;
}
getApp()->getAccounts()->twitch.getCurrent()->blockUser(
this->userId_, this,
[this, reenableBlockCheckbox, currentUser] {
this->channel_->addSystemMessage(
QString("You successfully blocked user %1")
.arg(this->userName_));
reenableBlockCheckbox();
},
[this, reenableBlockCheckbox] {
this->channel_->addSystemMessage(
QString("User %1 couldn't be blocked, an "
"unknown error occurred!")
.arg(this->userName_));
reenableBlockCheckbox();
});
return;
}
qCWarning(chatterinoWidget)
<< "Unexpected check-state when blocking" << this->userName_
<< QMetaEnum::fromType<Qt::CheckState>().valueToKey(newState);
}); });
// ignore highlights // ignore highlights

View file

@ -141,7 +141,7 @@ void QuickSwitcherPopup::updateSuggestions(const QString &text)
* Timeout interval 0 means the call will be delayed until all window events * Timeout interval 0 means the call will be delayed until all window events
* have been processed (cf. https://doc.qt.io/qt-5/qtimer.html#interval-prop). * have been processed (cf. https://doc.qt.io/qt-5/qtimer.html#interval-prop).
*/ */
QTimer::singleShot(0, [this] { QTimer::singleShot(0, this, [this] {
this->adjustSize(); this->adjustSize();
}); });
} }

View file

@ -20,6 +20,7 @@
#include "util/IncognitoBrowser.hpp" #include "util/IncognitoBrowser.hpp"
#include "widgets/BaseWindow.hpp" #include "widgets/BaseWindow.hpp"
#include "widgets/settingspages/GeneralPageView.hpp" #include "widgets/settingspages/GeneralPageView.hpp"
#include "widgets/settingspages/SettingWidget.hpp"
#include <magic_enum/magic_enum.hpp> #include <magic_enum/magic_enum.hpp>
#include <QDesktopServices> #include <QDesktopServices>
@ -265,10 +266,13 @@ void GeneralPage::initLayout(GeneralPageView &layout)
}, },
false, "Choose which tabs are visible in the notebook"); false, "Choose which tabs are visible in the notebook");
layout.addCheckbox( SettingWidget::inverseCheckbox("Show message reply context",
"Show message reply context", s.hideReplyContext, true, s.hideReplyContext)
"This setting will only affect how messages are shown. You can reply " ->setTooltip(
"to a message regardless of this setting."); "This setting will only affect how messages are shown. You can "
"reply to a message regardless of this setting.")
->addTo(layout);
layout.addCheckbox("Show message reply button", s.showReplyButton, false, layout.addCheckbox("Show message reply button", s.showReplyButton, false,
"Show a reply button next to every chat message"); "Show a reply button next to every chat message");
@ -614,10 +618,19 @@ void GeneralPage::initLayout(GeneralPageView &layout)
"Google", "Google",
}, },
s.emojiSet); s.emojiSet);
layout.addCheckbox("Show BTTV global emotes", s.enableBTTVGlobalEmotes); SettingWidget::checkbox("Show BetterTTV global emotes",
layout.addCheckbox("Show BTTV channel emotes", s.enableBTTVChannelEmotes); s.enableBTTVGlobalEmotes)
layout.addCheckbox("Enable BTTV live emote updates (requires restart)", ->addKeywords({"bttv"})
s.enableBTTVLiveUpdates); ->addTo(layout);
SettingWidget::checkbox("Show BetterTTV channel emotes",
s.enableBTTVChannelEmotes)
->addKeywords({"bttv"})
->addTo(layout);
SettingWidget::checkbox(
"Enable BetterTTV live emote updates (requires restart)",
s.enableBTTVLiveUpdates)
->addKeywords({"bttv"})
->addTo(layout);
layout.addCheckbox("Show FFZ global emotes", s.enableFFZGlobalEmotes); layout.addCheckbox("Show FFZ global emotes", s.enableFFZGlobalEmotes);
layout.addCheckbox("Show FFZ channel emotes", s.enableFFZChannelEmotes); layout.addCheckbox("Show FFZ channel emotes", s.enableFFZChannelEmotes);
layout.addCheckbox("Show 7TV global emotes", s.enableSevenTVGlobalEmotes); layout.addCheckbox("Show 7TV global emotes", s.enableSevenTVGlobalEmotes);
@ -1063,10 +1076,11 @@ void GeneralPage::initLayout(GeneralPageView &layout)
false, false,
"Make all clickable links lowercase to deter " "Make all clickable links lowercase to deter "
"phishing attempts."); "phishing attempts.");
layout.addCheckbox( SettingWidget::checkbox("Show user's pronouns in user card", s.showPronouns)
"Show user's pronouns in user card", s.showPronouns, false, ->setDescription(
"Shows users' pronouns in their user card. " R"(Pronouns are retrieved from <a href="https://pr.alejo.io">pr.alejo.io</a> when a user card is opened.)")
"Pronouns are retrieved from alejo.io when the user card is opened."); ->addTo(layout);
layout.addCheckbox("Bold @usernames", s.boldUsernames, false, layout.addCheckbox("Bold @usernames", s.boldUsernames, false,
"Bold @mentions to make them more noticable."); "Bold @mentions to make them more noticable.");
layout.addCheckbox("Color @usernames", s.colorUsernames, false, layout.addCheckbox("Color @usernames", s.colorUsernames, false,
@ -1191,25 +1205,20 @@ void GeneralPage::initLayout(GeneralPageView &layout)
"@mention for the related thread. If the reply context is hidden, " "@mention for the related thread. If the reply context is hidden, "
"these mentions will never be stripped."); "these mentions will never be stripped.");
layout.addDropdownEnumClass<ChatSendProtocol>( SettingWidget::dropdown("Chat send protocol", s.chatSendProtocol)
"Chat send protocol", qmagicenum::enumNames<ChatSendProtocol>(), ->setTooltip("'Helix' will use Twitch's Helix API to send message. "
s.chatSendProtocol, "'IRC' will use IRC to send messages.")
"'Helix' will use Twitch's Helix API to send message. 'IRC' will use " ->addTo(layout);
"IRC to send messages.",
{});
layout.addCheckbox( SettingWidget::checkbox("Show send message button", s.showSendButton)
"Show send message button", s.showSendButton, false, ->setTooltip("Show a Send button next to each split input that can be "
"Show a Send button next to each split input that can be " "clicked to send the message")
"clicked to send the message"); ->addTo(layout);
auto *soundBackend = layout.addDropdownEnumClass<SoundBackend>( SettingWidget::dropdown("Sound backend (requires restart)", s.soundBackend)
"Sound backend (requires restart)", ->setTooltip("Change this only if you're noticing issues "
qmagicenum::enumNames<SoundBackend>(), s.soundBackend, "with sound playback on your system")
"Change this only if you're noticing issues with sound playback on " ->addTo(layout);
"your system",
{});
soundBackend->setMinimumWidth(soundBackend->minimumSizeHint().width());
layout.addStretch(); layout.addStretch();

View file

@ -6,6 +6,7 @@
#include "widgets/dialogs/ColorPickerDialog.hpp" #include "widgets/dialogs/ColorPickerDialog.hpp"
#include "widgets/helper/color/ColorButton.hpp" #include "widgets/helper/color/ColorButton.hpp"
#include "widgets/helper/Line.hpp" #include "widgets/helper/Line.hpp"
#include "widgets/settingspages/SettingWidget.hpp"
#include <QRegularExpression> #include <QRegularExpression>
#include <QScrollArea> #include <QScrollArea>
@ -44,9 +45,16 @@ GeneralPageView::GeneralPageView(QWidget *parent)
}); });
} }
void GeneralPageView::addWidget(QWidget *widget) void GeneralPageView::addWidget(QWidget *widget, QStringList keywords)
{ {
this->contentLayout_->addWidget(widget); this->contentLayout_->addWidget(widget);
if (!keywords.isEmpty())
{
this->groups_.back().widgets.push_back({
.element = widget,
.keywords = keywords,
});
}
} }
void GeneralPageView::addLayout(QLayout *layout) void GeneralPageView::addLayout(QLayout *layout)
@ -376,11 +384,10 @@ bool GeneralPageView::filterElements(const QString &query)
currentSubtitleVisible = true; currentSubtitleVisible = true;
widget.element->show(); widget.element->show();
groupAny = true; groupAny = true;
break;
} }
else
{ widget.element->hide();
widget.element->hide();
}
} }
} }

View file

@ -21,6 +21,7 @@ class QScrollArea;
namespace chatterino { namespace chatterino {
class ColorButton; class ColorButton;
class SettingWidget;
class Space : public QLabel class Space : public QLabel
{ {
@ -95,7 +96,7 @@ class GeneralPageView : public QWidget
public: public:
GeneralPageView(QWidget *parent = nullptr); GeneralPageView(QWidget *parent = nullptr);
void addWidget(QWidget *widget); void addWidget(QWidget *widget, QStringList keywords = {});
void addLayout(QLayout *layout); void addLayout(QLayout *layout);
void addStretch(); void addStretch();
@ -274,50 +275,6 @@ public:
return combo; return combo;
} }
template <typename T, std::size_t N>
ComboBox *addDropdownEnumClass(const QString &text,
const std::array<QStringView, N> &items,
EnumStringSetting<T> &setting,
QString toolTipText,
const QString &defaultValueText)
{
auto *combo = this->addDropdown(text, {}, std::move(toolTipText));
for (const auto &item : items)
{
combo->addItem(item.toString());
}
if (!defaultValueText.isEmpty())
{
combo->setCurrentText(defaultValueText);
}
setting.connect(
[&setting, combo](const QString &value) {
auto enumValue =
qmagicenum::enumCast<T>(value, qmagicenum::CASE_INSENSITIVE)
.value_or(setting.defaultValue);
auto i = magic_enum::enum_integer(enumValue);
combo->setCurrentIndex(i);
},
this->managedConnections_);
QObject::connect(
combo, &QComboBox::currentTextChanged,
[&setting](const auto &newText) {
// The setter for EnumStringSetting does not check that this value is valid
// Instead, it's up to the getters to make sure that the setting is legic - see the enum_cast above
// You could also use the settings `getEnum` function
setting = newText;
getApp()->getWindows()->forceLayoutChannelViews();
});
return combo;
}
void enableIf(QComboBox *widget, auto &setting, auto cb) void enableIf(QComboBox *widget, auto &setting, auto cb)
{ {
auto updateVisibility = [cb = std::move(cb), &setting, widget]() { auto updateVisibility = [cb = std::move(cb), &setting, widget]() {

View file

@ -0,0 +1,144 @@
#include "widgets/settingspages/SettingWidget.hpp"
#include "widgets/settingspages/GeneralPageView.hpp"
#include <QBoxLayout>
#include <QCheckBox>
#include <QLabel>
namespace {
constexpr int MAX_TOOLTIP_LINE_LENGTH = 50;
const auto MAX_TOOLTIP_LINE_LENGTH_PATTERN =
QStringLiteral(R"(.{%1}\S*\K(\s+))").arg(MAX_TOOLTIP_LINE_LENGTH);
const QRegularExpression MAX_TOOLTIP_LINE_LENGTH_REGEX(
MAX_TOOLTIP_LINE_LENGTH_PATTERN);
} // namespace
namespace chatterino {
SettingWidget::SettingWidget(const QString &mainKeyword)
: vLayout(new QVBoxLayout(this))
, hLayout(new QHBoxLayout)
{
this->vLayout->setContentsMargins(0, 0, 0, 0);
this->hLayout->setContentsMargins(0, 0, 0, 0);
this->vLayout->addLayout(hLayout);
this->keywords.append(mainKeyword);
}
SettingWidget *SettingWidget::checkbox(const QString &label,
BoolSetting &setting)
{
auto *widget = new SettingWidget(label);
auto *check = new QCheckBox(label);
widget->hLayout->addWidget(check);
// update when setting changes
setting.connect(
[check](const bool &value, auto) {
check->setChecked(value);
},
widget->managedConnections);
// update setting on toggle
QObject::connect(check, &QCheckBox::toggled, widget,
[&setting](bool state) {
setting = state;
});
widget->actionWidget = check;
widget->label = check;
return widget;
}
SettingWidget *SettingWidget::inverseCheckbox(const QString &label,
BoolSetting &setting)
{
auto *widget = new SettingWidget(label);
auto *check = new QCheckBox(label);
widget->hLayout->addWidget(check);
// update when setting changes
setting.connect(
[check](const bool &value, auto) {
check->setChecked(!value);
},
widget->managedConnections);
// update setting on toggle
QObject::connect(check, &QCheckBox::toggled, widget,
[&setting](bool state) {
setting = !state;
});
widget->actionWidget = check;
widget->label = check;
return widget;
}
SettingWidget *SettingWidget::setTooltip(QString tooltip)
{
assert(!tooltip.isEmpty());
if (tooltip.length() > MAX_TOOLTIP_LINE_LENGTH)
{
// match MAX_TOOLTIP_LINE_LENGTH characters, any remaining
// non-space, and then capture the following space for
// replacement with newline
tooltip.replace(MAX_TOOLTIP_LINE_LENGTH_REGEX, "\n");
}
if (this->label != nullptr)
{
this->label->setToolTip(tooltip);
}
if (this->actionWidget != nullptr)
{
this->actionWidget->setToolTip(tooltip);
}
this->keywords.append(tooltip);
return this;
}
SettingWidget *SettingWidget::setDescription(const QString &text)
{
auto *lbl = new QLabel(text);
lbl->setTextInteractionFlags(Qt::TextBrowserInteraction |
Qt::LinksAccessibleByKeyboard);
lbl->setOpenExternalLinks(true);
lbl->setWordWrap(true);
lbl->setObjectName("description");
this->vLayout->insertWidget(0, lbl);
this->keywords.append(text);
return this;
}
SettingWidget *SettingWidget::addKeywords(const QStringList &newKeywords)
{
this->keywords.append(newKeywords);
return this;
}
void SettingWidget::addTo(GeneralPageView &view)
{
view.addWidget(this, this->keywords);
}
} // namespace chatterino

View file

@ -0,0 +1,106 @@
#pragma once
#include "common/ChatterinoSetting.hpp"
#include "util/QMagicEnum.hpp"
#include "widgets/settingspages/GeneralPageView.hpp"
#include <pajlada/signals/signalholder.hpp>
#include <QBoxLayout>
#include <QComboBox>
#include <QLabel>
#include <QObject>
#include <QString>
#include <QStringList>
#include <QtContainerFwd>
#include <QWidget>
namespace chatterino {
class GeneralPageView;
class SettingWidget : QWidget
{
Q_OBJECT
explicit SettingWidget(const QString &mainKeyword);
public:
~SettingWidget() override = default;
SettingWidget &operator=(const SettingWidget &) = delete;
SettingWidget &operator=(SettingWidget &&) = delete;
SettingWidget(const SettingWidget &other) = delete;
SettingWidget(SettingWidget &&other) = delete;
static SettingWidget *checkbox(const QString &label, BoolSetting &setting);
static SettingWidget *inverseCheckbox(const QString &label,
BoolSetting &setting);
template <typename T>
static SettingWidget *dropdown(const QString &label,
EnumStringSetting<T> &setting)
{
auto *widget = new SettingWidget(label);
auto *lbl = new QLabel(label % ":");
auto *combo = new ComboBox;
combo->setFocusPolicy(Qt::StrongFocus);
for (const auto &item : qmagicenum::enumNames<T>())
{
combo->addItem(item.toString());
}
// TODO: this can probably use some other size hint/size strategy
combo->setMinimumWidth(combo->minimumSizeHint().width());
widget->actionWidget = combo;
widget->label = lbl;
widget->hLayout->addWidget(lbl);
widget->hLayout->addStretch(1);
widget->hLayout->addWidget(combo);
setting.connect(
[&setting, combo](const QString &value) {
auto enumValue =
qmagicenum::enumCast<T>(value, qmagicenum::CASE_INSENSITIVE)
.value_or(setting.defaultValue);
auto i = magic_enum::enum_integer(enumValue);
combo->setCurrentIndex(i);
},
widget->managedConnections);
QObject::connect(
combo, &QComboBox::currentTextChanged,
[&setting](const auto &newText) {
// The setter for EnumStringSetting does not check that this value is valid
// Instead, it's up to the getters to make sure that the setting is legic - see the enum_cast above
// You could also use the settings `getEnum` function
setting = newText;
});
return widget;
}
SettingWidget *setTooltip(QString tooltip);
SettingWidget *setDescription(const QString &text);
/// Add extra keywords to the widget
///
/// All text from the tooltip, description, and label are already keywords
SettingWidget *addKeywords(const QStringList &newKeywords);
void addTo(GeneralPageView &view);
private:
QWidget *label = nullptr;
QWidget *actionWidget = nullptr;
QVBoxLayout *vLayout;
QHBoxLayout *hLayout;
pajlada::Signals::SignalHolder managedConnections;
QStringList keywords;
};
} // namespace chatterino

View file

@ -38,8 +38,9 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "System", "color": "Text",
"flags": "Text", "fallbackColor": "System",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -47,7 +48,9 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "MentionElement",
"userColor": "#ffff4500",
"userLoginName": "whoopiix",
"words": [ "words": [
"whoopiix" "whoopiix"
] ]

View file

@ -38,8 +38,9 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "System", "color": "Text",
"flags": "Text", "fallbackColor": "System",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -47,7 +48,9 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "MentionElement",
"userColor": "#ff00ff7f",
"userLoginName": "hyperbolicxd",
"words": [ "words": [
"hyperbolicxd" "hyperbolicxd"
] ]
@ -142,6 +145,24 @@
"to" "to"
] ]
}, },
{
"color": "Text",
"fallbackColor": "System",
"flags": "Text|Mention",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": false,
"type": "MentionElement",
"userColor": "System",
"userLoginName": "quote_if_nam",
"words": [
"quote_if_nam"
]
},
{ {
"color": "System", "color": "System",
"flags": "Text", "flags": "Text",
@ -154,7 +175,7 @@
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "TextElement",
"words": [ "words": [
"quote_if_nam!" "!"
] ]
}, },
{ {

View file

@ -38,8 +38,9 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "System", "color": "Text",
"flags": "Text", "fallbackColor": "System",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -47,7 +48,9 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "MentionElement",
"userColor": "#ff0000ff",
"userLoginName": "byebyeheart",
"words": [ "words": [
"byebyeheart" "byebyeheart"
] ]

View file

@ -38,8 +38,9 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "System", "color": "Text",
"flags": "Text", "fallbackColor": "System",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -47,7 +48,9 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "MentionElement",
"userColor": "#ff0000ff",
"userLoginName": "tww2",
"words": [ "words": [
"TWW2" "TWW2"
] ]
@ -142,6 +145,24 @@
"to" "to"
] ]
}, },
{
"color": "Text",
"fallbackColor": "System",
"flags": "Text|Mention",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": false,
"type": "MentionElement",
"userColor": "System",
"userLoginName": "mr_woodchuck",
"words": [
"Mr_Woodchuck"
]
},
{ {
"color": "System", "color": "System",
"flags": "Text", "flags": "Text",
@ -154,7 +175,7 @@
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "TextElement",
"words": [ "words": [
"Mr_Woodchuck!" "!"
] ]
} }
], ],

View file

@ -290,8 +290,9 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "System", "color": "Text",
"flags": "Text", "fallbackColor": "System",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -299,7 +300,9 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "MentionElement",
"userColor": "#ff008000",
"userLoginName": "ronni",
"words": [ "words": [
"ronni" "ronni"
] ]

View file

@ -217,6 +217,24 @@
"to" "to"
] ]
}, },
{
"color": "Text",
"fallbackColor": "System",
"flags": "Text|Mention",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": false,
"type": "MentionElement",
"userColor": "System",
"userLoginName": "mohammadrezadh",
"words": [
"MohammadrezaDH"
]
},
{ {
"color": "System", "color": "System",
"flags": "Text", "flags": "Text",
@ -229,7 +247,7 @@
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "TextElement",
"words": [ "words": [
"MohammadrezaDH!" "!"
] ]
} }
], ],

View file

@ -38,8 +38,9 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "System", "color": "Text",
"flags": "Text", "fallbackColor": "System",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -47,7 +48,9 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "MentionElement",
"userColor": "#ffff8ea3",
"userLoginName": "inatsufn",
"words": [ "words": [
"iNatsuFN" "iNatsuFN"
] ]
@ -187,6 +190,24 @@
"to" "to"
] ]
}, },
{
"color": "Text",
"fallbackColor": "System",
"flags": "Text|Mention",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": false,
"type": "MentionElement",
"userColor": "System",
"userLoginName": "kimmi_tm",
"words": [
"kimmi_tm"
]
},
{ {
"color": "System", "color": "System",
"flags": "Text", "flags": "Text",
@ -199,7 +220,7 @@
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "TextElement",
"words": [ "words": [
"kimmi_tm!" "!"
] ]
}, },
{ {

View file

@ -38,8 +38,9 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "System", "color": "Text",
"flags": "Text", "fallbackColor": "System",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -47,7 +48,9 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "MentionElement",
"userColor": "#ffeb078d",
"userLoginName": "lucidfoxx",
"words": [ "words": [
"Lucidfoxx" "Lucidfoxx"
] ]
@ -187,6 +190,24 @@
"to" "to"
] ]
}, },
{
"color": "Text",
"fallbackColor": "System",
"flags": "Text|Mention",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": false,
"type": "MentionElement",
"userColor": "System",
"userLoginName": "ogprodigy",
"words": [
"OGprodigy"
]
},
{ {
"color": "System", "color": "System",
"flags": "Text", "flags": "Text",
@ -199,7 +220,7 @@
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "TextElement",
"words": [ "words": [
"OGprodigy!" "!"
] ]
} }
], ],

View file

@ -38,8 +38,9 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "System", "color": "Text",
"flags": "Text", "fallbackColor": "System",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -47,7 +48,9 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "MentionElement",
"userColor": "#ff0000ff",
"userLoginName": "calm__like_a_tom",
"words": [ "words": [
"calm__like_a_tom" "calm__like_a_tom"
] ]

View file

@ -38,8 +38,9 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "System", "color": "Text",
"flags": "Text", "fallbackColor": "System",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -47,7 +48,9 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "MentionElement",
"userColor": "System",
"userLoginName": "foly__",
"words": [ "words": [
"foly__" "foly__"
] ]

View file

@ -38,8 +38,9 @@
"type": "TimestampElement" "type": "TimestampElement"
}, },
{ {
"color": "System", "color": "Text",
"flags": "Text", "fallbackColor": "System",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -47,7 +48,9 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "MentionElement",
"userColor": "#ffcc00c2",
"userLoginName": "cspice",
"words": [ "words": [
"cspice" "cspice"
] ]
@ -158,8 +161,9 @@
] ]
}, },
{ {
"color": "System", "color": "Text",
"flags": "Text", "fallbackColor": "System",
"flags": "Text|Mention",
"link": { "link": {
"type": "None", "type": "None",
"value": "" "value": ""
@ -167,7 +171,9 @@
"style": "ChatMedium", "style": "ChatMedium",
"tooltip": "", "tooltip": "",
"trailingSpace": true, "trailingSpace": true,
"type": "TextElement", "type": "MentionElement",
"userColor": "#ffcc00c2",
"userLoginName": "cspice",
"words": [ "words": [
"cspice" "cspice"
] ]