Commit Graph

2545 Commits

Author SHA1 Message Date
miruka
b94570f853 Support drag and drop for files and text in chat 2021-03-03 17:12:09 -04:00
miruka
63fe083cad Fix Alt+(Shift+)U/M ignoring local unread rooms
The goTo{Previous,Next}{Unread,Mentioned}Room keybinds only took into
accounts rooms that had a server-sent unread/highlight count, and not
those that only had a client-side unread "!" badge (e.g. for rooms that
get new messages but that have push rules disabling notifications).
2021-03-03 17:12:09 -04:00
miruka
4c04c1158c Fix sign in button always showing spinner 2021-03-03 17:12:09 -04:00
miruka
ac111603da Fix err with no M_CODE falling back on wrong class
When we received server errors with no matrix M_CODE, the MatrixError
class would fall back to its first subclass that had a matching HTTP
status code. This notably caused any 401 error to be interpreted as
MatrixInvalidAccessToken, and disconnect the user.
2021-03-03 17:12:09 -04:00
koudja
52b0bb18cb Add room bookmarking: bookmarks are always on top
Introduce a bookmark system for rooms:
a room bookmarked will always appear on top of every other
(for a given account).

Bookmarking can be done through context menu on targeted room
(as well as un-bookmarking) or through settings.json
(key roomBookmarkIDs) for permanent bookmark.
roomBookmarkIds is a {account_user_id: [room_id]} dict.
2021-03-03 17:12:09 -04:00
miruka
38360b101a Fix JoinRoom cancel button not going to last page 2021-03-03 17:12:09 -04:00
miruka
d4be4cca69 Fix incorrectly espaced HTML for redaction reason
A redacted event with a reason containing problematic HTML characters,
e.g. "<test>" would render as literal escaped HTML, e.g. "&lt;test&gt;"
2021-03-03 17:12:09 -04:00
miruka
f682e0e261 Fix onLoopException calling showError incorrectly 2021-03-03 17:12:09 -04:00
hashashini
fd69046528 Require double click to open homepage (#140)
Require double click to open homepage (#140)

* Update TopBar.qml

To raise Mirage's window in a stacking wm, clicking on an area
without text, especially in the topbar, is probably what most users do.
In the case of the 2nd button in the topbar this currently accidentally
opens a browser window and thus becomes a privacy issue.

So for now require a double click to open mirage's homepage.
Alternatively the size of this button should at least be closely
restricted to the text "Mirage ${version number}".

In the long term it might be preferable to put this link into
some kind of "about" section instead of the "title" section.

* Make tooltip indicate that double click is required

Co-authored-by: miruka <miruka@disroot.org>
2021-03-03 17:12:09 -04:00
miruka
407f9383ff Remove duplicate icons256 target for make install 2021-03-03 17:12:09 -04:00
miruka
3bfaee4758 Fix invisible "Copy link address" event menu entry
menu.mediaType can be an enum value, which includes 0 to represent a
web page link, or null if no link was right clicked.
Check for null explicitely when evaluating whether the menu entry
should be displayed.
2021-03-03 17:12:08 -04:00
miruka
6e2f3440d7 Close reply bar when switching/recycling chat page 2021-03-03 17:12:08 -04:00
miruka
1feda8667f Cancel reply when pressing keybind on same event 2021-03-03 17:12:08 -04:00
miruka
12cfbd2a96 CppUtils.hsluv(): prevent out of bounds sat/luv 2021-03-03 17:12:08 -04:00
miruka
0e3821a592 Prefix event transaction_id keys with reverse DNS
Respect the Matrix spec by using
"io.github.mirukana.mirage.transaction_id" instead of
"mirage.transaction_id".
2021-03-03 17:12:08 -04:00
miruka
2313673993 Reduce themes fontSize.big from 22 to 20 2021-03-03 17:12:08 -04:00
miruka
6a36943dae Account settings: fix incorrect "User ID:" color 2021-03-03 17:12:08 -04:00
miruka
aa5d522902 Swap default shift & nomod image viewer keybinds
zoomOut/zoomIn, rotateRight/rotateLeft, previousSpeed/nextSpeed:
Make them shift+Z/Z, shift+R/R, shift+S/S by default
instead of Z/Shift+Z, R/shift+R, S/shift+S
2021-03-03 17:12:08 -04:00
miruka
8acc7299e9 Add workaround for delegate stuck transition bug
Sometimes and randomly, a HListView/HGridView delegate's
add/populate transition will stop before completion.

This especially happens on startup when loading a large room list,
one room might get stuck and left tiny or invisible, despite its
normal space still being taken.
2021-03-03 17:12:08 -04:00
miruka
35fa1fa16b Fix account page not being highlighted on startup
If the page loaded on app startup is account settings or add new chat,
ensure the room list properly highlights the corresponding account
delegate.
2021-03-03 17:12:08 -04:00
Rinigus
db9fb6fda8 Specify dbus-python version in requirements 2021-03-03 17:12:08 -04:00
Rinigus
3fff98dfbc [packaging] Update Flatpak manifest 2021-03-03 17:12:08 -04:00
miruka
2664bf1e93 HTile: prevent opening multiple context menus
If a context menu is already opened for that HTile when right clicking
or using a keybind like Alt+P (openPresenceMenu), close it instead of
just creating a duplicate one.
2021-03-03 17:12:08 -04:00
miruka
e6499d8fba Fix read counter display on EventImage
- Fix extra spacing on the right of the date when there's no read
  counter to show

- Fix read counter not being colored
2021-03-03 17:12:08 -04:00
miruka
ee1091b4dc Don't pass Python Future objects to QML
Returning a Future doesn't work on Windows for some reason
(https://github.com/thp/pyotherside/issues/116).

Instead of using these objects from QML to cancel running coroutines,
call a Python QMLBridge function that takes a coroutine UUID and will
take care of the cancelling.
2021-03-03 17:12:08 -04:00
miruka
53d2ab17af Fix display of right-to-left text in timeline
Set an explicit default left alignment for label components, to prevent
other people's right-to-left names or text from messing up the UI
in a left-to-right environment.
2021-03-03 17:12:08 -04:00
miruka
dbd78587fe DebugConsole: improve field placeholder & .help 2021-03-03 17:12:08 -04:00
miruka
e3fcb39556 DebugConsole: improve text & border coloring 2021-03-03 17:12:08 -04:00
miruka
d6062a8320 DebugConsole: add border "prompt" to delegates 2021-03-03 17:12:08 -04:00
miruka
192112ab4e DebugConsole output: add text selection & copying 2021-03-03 17:12:08 -04:00
miruka
4cc4229728 DebugConsole: restore non-history text on down key
When user starts typing something in the console, then navigates the
history with up but comes back to normal input by pressing down, restore
the text that was initially typed before navigating.
2021-03-03 17:12:08 -04:00
miruka
68d1ddfa61 Fix DebugConsole cursor at position 0 invisible 2021-03-03 17:12:08 -04:00
miruka
7d27acfcc8 Allow multi-line input in DebugConsole
Use ctrl/shift/alt+return to insert a newline, tab to insert 4 spaces
2021-03-03 17:12:08 -04:00
miruka
d9118ef24e Clear HList/GridView checked on model change
Clear the checked items and prevent potential segfaults
2021-03-03 17:12:08 -04:00
miruka
58613446f0 Fix event context menu targeting wrong message
If user right clicked on the most recent event in the timeline
(index 0), a new message was posted in the room (the new index 0),
and the user right clicked on it, the EventContextMenu's `event`
property relying on the index would not detect any change and
thus would still target the previous event.

This affected options depending on this property like "Reply".

The problem was reproducible with any same index repetition, not just 0.
2021-03-03 17:12:08 -04:00
miruka
c861c29b73 Add nonKineticScrollingSpeed multiplicator setting 2021-03-03 17:12:08 -04:00
miruka
1df7cb8014 Add copyright header to source code files
Copyright notice as per
https://reuse.software/spec/#format-of-copyright-notices

Fixes #134
2021-03-03 17:12:08 -04:00
miruka
90829125bd Strip non-free ICC profile out from midnight.jpg
Fixes #129
2021-03-03 17:12:08 -04:00
miruka
54234399f5 Fix "Mentions & keywords" notification level
Make it work in cases where multiple accounts are present in the room
and one of them is highlighted.
2021-03-03 17:12:08 -04:00
miruka
e8d8f7fe0b Add global notification control icon in top bar
The "Mentions & keywords only" option doesn't work yet in multi-account
cases: when notifications arrive for a room that multiple accounts are
part of, the first notification to arrive is let through, and the
duplicate later ones are ignored. The first notification to arrive may
not be from the account that gets highlighted, thus it is ignored under
the "Mentions & keywords" setting.
2021-03-03 17:12:08 -04:00
miruka
bfc3a60cad Update flatpak script generator
- Make the code cleaner and don't require bash
- Generate less uneeded intermediate files
- Add the flatpak-pip-generator script to make clean
- flatpak-pip-generator now requires requirements-parser from pip
2021-03-03 17:12:08 -04:00
miruka
03e4f9b85e Make settings icon open a more complete menu 2021-03-03 17:12:08 -04:00
miruka
22e7dc7e8d Notifications: format replies properly 2021-03-03 17:12:08 -04:00
miruka
4cd562e02f Notifications: process non-message events text 2021-03-03 17:12:08 -04:00
miruka
94a623f677 Print coro infos on get_client not found error 2021-03-03 17:12:08 -04:00
miruka
7ae2ae6cd7 Notifications: turn newline symbols into real <br> 2021-03-03 17:12:08 -04:00
miruka
4a6e2ea46a Prevent duplicate notifications for the same event 2021-03-03 17:12:08 -04:00
miruka
8691a8c85b Add sender avatar to desktop notifications 2021-03-03 17:12:08 -04:00
miruka
21ccf90d23 Notifications: properly italicize emote messages 2021-03-03 17:12:08 -04:00
miruka
dcc3473ecf Don't show notification if window is focused 2021-03-03 17:12:08 -04:00