Adds custom channel filters complete with their own mini-language. Filters can be created in settings, and applied by clicking the three dots to open the Split menu and selecting "Set filters".
There's now a new (yet another, sigh) section in Settings -> General, which lets you set streamer mode to 'enable/disable/detect obs' and there are also separate settings for each of the things that streamer mode covers. I just have to add ping sounds and PR is ready to be merged :)
* Show "Streamer Mode" image as link thumbnails if applicable
* Moved hideViewerCountAndDuration to streamerMode settings
Set it to false by default (just how it used to be under /misc settings, also reworked live tooltip to be a bit prettier and say "<Streamer Mode>" in gray instead of "Live with <hidden> for <hidden> viewers"
* feat: improve "Login expired!" message
Since this message occurs when the OAuth token becomes invalid, users
have to re-add their account in order to continue using the application.
The previous message did not make this clear enough, often leading to
confusion and questions by users.
This commit changes the system message to more clear about what the user
has to do, and adds a link that opens the "Accounts" page in the
preferences.
* Update changelog
* Update ChannelView.cpp
Co-authored-by: fourtf <tf.four@gmail.com>
* Add move up, down buttons to list settings
Channel notifications, moderation buttons etc. have a move up and move
down button now for reordering.
* Selection follows moved rows, refactor
Also fixed rows past the 2nd one not moving
* Update selection property with more than 1 column
* Fix crash when moving without a row selected
* Move rows with drag and drop
Right now it's a little iffy registering the row to be moved, but I
wanna go to bed :)
* Remove EditableTableView, move to SignalVectorModel
Replace my ghetto drag and drop solution in EditableTableView with small
patches to the stuff already written in SignalVectorModel::dropMimeData
This makes it so that we consistently start with the same values after
having cleared a ChannelView.
Example place where this happens: UserInfoPopup when user messages are
loaded and refreshed
This ensures that the layout will survive for the lifetime of the menu,
so any of the menu actions can with confidence do things with the
layout, not having to worry whether it's dead or not.
This means that the user, while having the message menu open, could have
one extra MessageLayout alive. I have ensured that when the menu dies
the reference to the shared pointer dies with it.
There's a Refresh button added to the popup to refresh the users messages in the popup. Not automatic now while we figure out how fast/slow it would be.
Co-authored-by: dnsge <sagedanielr@gmail.com>
This feature is off by default and can be enabled in the settings with the "Show link thumbnail" setting. This feature also requires the "Show link info when hovering" setting to be enabled.
thumbnails support is only there for direct image links, twitch clips, and youtube links. can be expanded in the future in the /api repo
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit adds support for uploading images to i.nuuls.com from clipboard or by dragging an image into a split.
Documentation for how to self-host the image uploader is available in ENV.md
By default, you will be asked before an image upload takes place. There's an option in the dialog to not be asked again, if that option is chosen you can revert that choice in the settings dialog.
* ChannelView: Rename mouse event related members
This is more in line with the naming of the other members as well as
future members.
* ChannelView: Add ability to scroll with middle mouse button
* Add scrolling resources
* Use custom icons for scroll cursor
* Slightly refactor scrolling logic
* Respect screen scaling when calculating scroll offset
* Nicer scrolling UX
This change allows scrolling to be feel smoother when close to the
starting point.
* Add scrolling with keeping middle mouse pressed
This mimics the behavior of browsers as well.
* Refactor ChannelView::enableScrolling
* Disable drag-scrolling on left or right click
Since #1320, subscription messages are treated as highlights in order to
allow customization. This caused subscription messages to highlight the
split(s) the message was received in. This is not intended behavior.
This commit fixes the issue by additionally checking if the
`Subscription` flag is set on a highlighted message.
* Support for user-defined sounds and colors
* Make color & sound columns selectable
* Add custom row for subscription highlights
* Add subscriptions to custom highlights and centrally manage highlight colors
* Dynamically update message highlight colors
* Introduce crossPlatformCopy()
It sets the text of the clipboard and also syncs it with the selection
clipboard if it is supported. Such behaviour is pretty common for X11
application on Unix-like Operating Systems.
* Fix clang-format remarks
* Fix weird clang-format config discrepancy between my machine and CI
* Remove clipboard argument from crossPlatformCopy
* Fix clang-format remarks
Things changed:
- make getImageFileFormat case insensitive
- use QTextEdit::dragEnterEvent instead of QAbstractScrollArea::dragEnterEvent,
- Make dragEnterEvent() and dropEvent() overrides.
This includes:
- NuulsUploader.cpp
- changing upload delay to a #define
- moving png conversion code to `boost::optional<QByteArray> convertToPng(QImage image)`
- in uploadImageToNuuls: moving content type definition to a variable, move things around a bit to eliminate an if
- in upload: adding a comment about `source->hasUrls()` and `source->urls()`, change `uploadQueue.size()` to `!uploadQueue.empty()`
- ResizingTextEdit.cpp
- changing #include order
While tab-completing user names already respected the setting for
mentions with commas, right-clicking user names did not.
This commit adds the missing check in ChannelView::handleMouseClick.
* Ran clang-format
* Implement user-specific search in message history
This functionality was originally requested in #1236.
This commit changes the SearchPopup::performSearch method so that only
messages from specific users can be shown.
In order to filter for a specific user, enter their username with a
leading '@' in the search popup. You can also add an additional search
phrase which will also be considered in the search.
* Naive implementation for "from:" tags
Rebase later?
* Cleverer (?) version using Predicates
Commit adds two POC predicates: one for the author of messages, and one
for substring search in messages.
Problems/TODOs:
* Best way to register new predicates?
* Clean up tags (e.g. "from:") or not?
* Test combinations of different predicates
* Add a predicate to check for links in messages
* Remove a dumb TODO
* Rewrite SearchPopup::performSearch to be cleaner
* Ran clang-format on all files
* Remove TODO I missed earlier
* Forgot to run clang-format
peepoSadDank
* Re-use {}-initialization
Was accidentally removed when fixing earlier merge conflict.
* Does this fix line endings?
No diffs are shown locally, hopefully Git doesn't lie to me.
* Rename "predicates" directory to "search"
Resolving one conversation in the review of #1237.
* Use LinkParser in LinkPredicate
Resolving a conversation in the review of #1237.
* Predicates: Use unique_ptr instead of shared_ptr
Resolves a conversation in the review of #1237.
* Refactor of SearchPopup and AuthorPredicate
Resolving some points from the review in #1237.
* Moved parsing of comma-seperated values into AuthorPredicate
constructor.
* Rewrite SearchPopup::parsePredicates as suggested.
* Deleted now redundant methods in SearchPopup.
* MessagePredicate::appliesTo now takes a Message&
... instead of a MessagePtr.
This resolves a conversation in the review of #1237.
* Run clang-format on two files I missed
* AuthorPredicate: Check for displayName & loginName
Resolving conversation on #1237.
This commit implements a simpler fix for the problem described in #1209.
The setting's signal is connected to a reset of `completionInProgress_`
so that the completion model is updated on the next word already.
This commit also removes the older approach tackling this issue.
This commit fixes a bug that would occur when changing the completion
mode from prefix-only to substring while mid-completion.
In that case, the suggestion list was not updated until the next
completion attempt.
This is fixed by forcing a suggestion list refresh whenever the
setting's checkbox is updated.
* Make emote tab completion search for substrings
Previously, tab completion only searched for emotes that start
with the current prefix under the cursor. This commit makes tab
completion look for the current prefix as a substring in any position,
not just the start.
Examples:
* In forsen's channel, tabbing on "pls" will cycle through "DonaldPls", "forsenPls",
"GachiPls", "nyanPls" and "SourPls".
* As a forsen subscriber, tabbing on "sen1" will complete to "forsen1".
* As a pajlada subscriber, tabbing on "shrug" will cycle through
"pajaShrugL" and "pajaShrugR". (Unless you are in a channel with
more "shrug" emotes, of course.)
* Add a setting for prefix and substring completion
This commit adds a setting under the "Miscellaneous" section to allow
user to choose whether they want prefix-only or substring emote
completion.
The QCompleter filter mode and `addString` function are now chosen
according to the user's setting.
* Improve description of emote completion setting
Also reintroduce a blank line that went missing.
fixes Chatterino#635
prepares for future implementation of Chatterino#79
Was a little bit hard to find the right combination for now. Pasting images from clipboard surpasses the check for dragging images in canInsertFromMimeData OMGScoots
The window layout is only saved if something has been changed.
When something relevant to the window layout is changed, a save is
queued to run after 10 seconds.
If within those 10 seconds, another thing is changed, that timer is
reset and will run after 10 seconds again.
Events that cause the save to be queued up:
- Tab created
- Tab removed
- Tab moved
- Tab name changed
- Split created
- Split removed
- Split moved
- Split channel changed
- Split resized
- Window moved
- Window resized
What currently does not trigger the save to be queued up:
- Active tab changed