Commit Graph

2385 Commits

Author SHA1 Message Date
miruka
5f6b751664 Add make test command to mirage.pro 2021-03-03 17:14:55 -04:00
miruka
0fe8138faf Remove nio fork from requirements-dev.txt 2021-03-03 17:14:55 -04:00
miruka
1e002eb4a5 Fix flake8/mypy/isort code errors from new setup 2021-03-03 17:14:55 -04:00
miruka
b170997cdb Add flake8, mypy and isort setup 2021-03-03 17:14:55 -04:00
miruka
eed2cc4818 Remove double blank lines from QML files 2021-03-03 17:14:55 -04:00
miruka
58257c0930 Add note about unofficial packages in INSTALL.md 2021-03-03 17:14:55 -04:00
miruka
f7ee6ba175 Fix links for AUR packages in INSTALL.md 2021-03-03 17:14:41 -04:00
miruka
8125b89178 Add OpenMandriva Lx package to INSTALL.md 2021-03-03 17:13:51 -04:00
miruka
93eba7ce92 Fix incorrect account switching keybind order
The keybinds to switch to the first room in account number X did not
behave properly when the accounts weren't ordered lexically.
2021-03-03 17:13:51 -04:00
miruka
3564e7a571 Turn bookmarks/aliases/at_index into Sections 2021-03-03 17:13:51 -04:00
miruka
fbd3f6f4a2 PCN: allow adding new properties at run-time 2021-03-03 17:13:51 -04:00
miruka
9348df32f7 PCN: support quoted strings as property names 2021-03-03 17:13:51 -04:00
miruka
999953bc77 Add redbaron to requirements.txt (for PCN parser) 2021-03-03 17:13:51 -04:00
miruka
cd2ea17614 Add NixOS package to INSTALL.md 2021-03-03 17:13:51 -04:00
miruka
506b35a385 Add Debian package section to INSTALL.md 2021-03-03 17:13:51 -04:00
miruka
df2b913573 Add CONTRIBUTING.md 2021-03-03 17:13:51 -04:00
miruka
2efaeeb887 Move CHANGELOG.md, INSTALL.md and TODO.md to docs/ 2021-03-03 17:13:51 -04:00
miruka
bffd6bab4b Move README screenshots to a new "docs" folder 2021-03-03 17:12:09 -04:00
miruka
96e7c6c367 Move .desktop & icon files to packaging dir 2021-03-03 17:12:09 -04:00
miruka
db12036372 Use new PCN format for settings config file 2021-03-03 17:12:09 -04:00
miruka
6ce3059322 Raise error if loading a JSON fails
Don't use the default config if there's an error in a JSON config file,
a single typo could lead to an entire user settings file getting
overwritten by default data.
2021-03-03 17:12:09 -04:00
miruka
75fbf23b21 Refactor user_files module & add live reloading
- Cleaner design for the backend user_files classes and simplified
  interaction with QML
- Config and theme files will now automatically reload when changed on
  disk
- Removed manual reload keybind and button
2021-03-03 17:12:09 -04:00
miruka
00c468384a Delay increasing timeline cache buffer, reduce lag
When switching rooms, first load only the delegates in the user's view
and wait a second before expanding the cacheBuffer and loading more
delegates outside the view. This reduces the amount of delegates to load
all at once by 3x.
2021-03-03 17:12:09 -04:00
miruka
ce3ed86bef Fix timeline occasionally breaking on room switch
When a chat page is recycled, set the eventList model to
null, wait for any animations to finish, then explicitely reassign it.
This prevents from model from randomly mixing up old and news delegates.
2021-03-03 17:12:09 -04:00
miruka
9ef13c9d50 idleMilliseconds: return -1 if WAYLAND_DISPLAY set
CppUtils.idleMilliseconds(): If the WAYLAND_DISPLAY environment
variable is set, assume we're running under a Wayland environment
and return early before trying to connect to an X11 display.
2021-03-03 17:12:09 -04:00
miruka
acce5d60ae Prevent error spam when XScreenSaver not supported
If XScreenSaver is available but not supported
(e.g. when running in XWayland), return -1 for
Utils.idleMilliseconds(), instead of letting the code fail and print an
error every time this function gets called to check for the machine's
idle time.
2021-03-03 17:12:09 -04:00
miruka
ed74592769 Add HToolTip.instantToggle(), use for some buttons
Used for buttons that trigger a tooltip instantly: if the tooltip is
currently visible, hide it.
2021-03-03 17:12:09 -04:00
miruka
0eb57c5986 Move composer alias "?" icon to be inside field
Be more consistent with the user ID field and its copy button.
2021-03-03 17:12:09 -04:00
miruka
28b25a53ea Make account user ID an easily copiable RO field 2021-03-03 17:12:09 -04:00
miruka
6af4cca315 Add FieldCopyButton.qml, split from SignInSso.qml 2021-03-03 17:12:09 -04:00
miruka
32484c3ae5 Prevent focusing readOnly field/areas on click 2021-03-03 17:12:09 -04:00
miruka
74ffbdb0a8 Account settings: make user ID label copiable 2021-03-03 17:12:09 -04:00
miruka
3d8914cb39 HTextContextMenu: less entries for readOnly fields
If the context menu is for a readOnly field or area, hide pointless
options like undo/redo and cut/paste.
2021-03-03 17:12:09 -04:00
miruka
dba41c30c2 Put HAvatar's tooltip image inside a Loader
Make sure to not load tooltip images unless the user is
currently trying to see one by hovering on an avatar.
This also seems to reduce idle CPU usage.
2021-03-03 17:12:09 -04:00
miruka
8ca8f490fa JSONify ModelItemDeleted.ids for QML if needed
If a model has tuple keys, these already get turned into JSON strings
for the ModelItemSet pyotherside event (for QML and JS reasons).
Do the same for ModelItemDeleted's ids field, else the QML event handler
will be unable to find the items by IDs.
2021-03-03 17:12:09 -04:00
miruka
b38fbc6d9b Fix filtered_members models updates 2021-03-03 17:12:09 -04:00
travankor
055b68126a Add Sorted Containers to replace blist 2021-03-03 17:12:09 -04:00
travankor
1dcd6daaba Improve Python 3.9 compatibility
Blist has been unmaintained for 5+ years and is now broken on Python 3.9.
2021-03-03 17:12:09 -04:00
miruka
7564b40c3e Fix copying multi-line selected rich text
For rich text (rendered HTML) fields and areas, the selectedText
property for some reason contains "\u2028" or "\u2029"
characters that look like newlines in Qt programs but are just
invisible anywhere else. Translate them to normal "\n".
2021-03-03 17:12:09 -04:00
miruka
da75568428 Fix segfault on coroutine cancelling from QML
Since 87fcb0a773f4855cdae7212fa9448a05de57be56, it was possible to call
a Python coroutine, but cancel it (due to parent component destruction)
before Python even has time to start it.
The registred QML callbacks for this coro would then be called,
potentially causing a segfault if that callback tried to access the
parent component or its properties.
2021-03-03 17:12:09 -04:00
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