Commit Graph

70 Commits

Author SHA1 Message Date
miruka
8eca875499 Use new HCircleProgressBar for HBusyIndicator 2019-11-06 14:30:31 -04:00
miruka
487446046f Fix upload avatar overlay shown after picking one 2019-11-06 08:52:23 -04:00
miruka
2f19ff493b Rewrite media caching (old image provider)
- Doesn't use pyotherside's image provider feature, for more flexibility
  and simplicity
- Suitable for supporting matrix media events and more later
- Avoid a lot of duplicate files that the old cache created due to
  server not returning what we expect, mistakes in Python/QML code, etc
- Changed file structure
  (e.g. thumbnails/32x32/<mxc id> instead of
   thumbnails/<mxc id>.32.32.crop)

- Backend.wait_until_account_exist: start issuing warnings if the
  function runs for more than 10s, which means in most case a bad user
  ID was passed

- New HMxcImage QML component, used in H(User/Room)Avatar
2019-11-03 13:48:12 -04:00
miruka
6eb3a378bc Proper upload exceptions, handle in QML set avatar 2019-10-28 08:06:22 -04:00
miruka
5192fe8b55 Click to play/pause animated image 2019-09-12 16:25:05 -04:00
miruka
125d1e24aa Support GIFs 2019-09-12 16:16:35 -04:00
miruka
7211dd8fda Fix account settings name field getting reset 2019-09-10 21:58:28 -04:00
miruka
7c0bed79a9 ImportKeys/ExportKeys separate dialog componants 2019-09-09 14:42:58 -04:00
miruka
15add6d91c Confirm account logout and propose exporting keys
Key export button callback not implemented yet.
2019-09-09 12:58:13 -04:00
miruka
2f7fbd2621 Profile: fix eliding, increase wide width needed 2019-09-09 11:35:46 -04:00
miruka
c38cc9d3df Move popups to their own folder 2019-09-09 08:57:38 -04:00
miruka
3ef32b4c04 Use verb when possible instead of "OK" for buttons 2019-09-09 08:20:24 -04:00
miruka
6f7695ad22 HBoxPopup: split text into summary and details 2019-09-09 06:32:29 -04:00
miruka
df753b5262 Say "change profile picture" if avatar already set 2019-09-08 11:53:01 -04:00
miruka
a87f98fae0 Add key exporting to account settings 2019-09-07 19:17:32 -04:00
miruka
5eaa877554 Avoid import harmless error messages at the end 2019-09-05 17:51:38 -04:00
miruka
1806ac6ac0 Color "upload profile picture" icon
Also fix hover zone to span the entire avatar rectangle
2019-08-28 18:47:04 -04:00
miruka
6cda69ad67 Restore icon colors 2019-08-28 18:21:13 -04:00
miruka
18120f5216 Add HProgressBar component 2019-08-28 14:28:20 -04:00
miruka
21b44bcf66 Add animated icon to ImportingKeys box 2019-08-28 13:50:29 -04:00
miruka
b9f593fb27 Fix opening import key file picker and button 2019-08-28 13:16:06 -04:00
miruka
b1e1ea30d2 Rename HInterfaceBox component to HBox 2019-08-28 11:56:05 -04:00
miruka
7c3ed5ca14 Use HInterfaceBox for ImportExportKeys 2019-08-28 11:54:25 -04:00
miruka
ce3404a516 Show import keys error in the UI 2019-08-28 11:42:52 -04:00
miruka
7d2cbae26f Show key import progression 2019-08-28 03:54:53 -04:00
miruka
f65c0176ba Better error handling and fixes for key import 2019-08-27 23:51:38 -04:00
miruka
560981a97e Remove uneeded HRectangle component 2019-08-27 22:46:31 -04:00
miruka
ebfebbeae1 Improve import keys password popup 2019-08-27 22:43:57 -04:00
miruka
0a0e11e1f4 Rework the LoadingScreen and HBusyIndicator 2019-08-27 19:47:58 -04:00
miruka
410a42bc59 Show EditAccount page loading until profile ready 2019-08-27 15:07:08 -04:00
miruka
3749d1e135 Allow pressing escape to cancel in edit profile 2019-08-22 10:22:21 -04:00
miruka
b8d43ecfec Add account logout feature via context menu 2019-08-21 17:45:05 -04:00
miruka
ed96409645 Split HButton components, add HMenu/HMenuItem 2019-08-21 15:45:13 -04:00
miruka
ce128d5ab5 Refactor HButton 2019-08-20 17:41:24 -04:00
miruka
109082c8d8 Use a Loader instead of StackView for pageStack 2019-08-19 15:38:45 -04:00
miruka
c76ebe4fe2 Improve some texts 2019-08-16 09:47:44 -04:00
miruka
5f72397afe HLoader component, use Loader.asynchronous prop 2019-08-11 23:25:22 -04:00
miruka
3c35616eaa Remove copyright headers in code 2019-08-11 08:34:36 -04:00
miruka
67dde68126 Big performance refactoring & various improvements
Instead of passing all sorts of events for the JS to handle and manually
add to different data models, we now handle everything we can in Python.

For any change, the python models send a sync event with their
contents (no more than 4 times per second) to JS, and the QSyncable
library's JsonListModel takes care of converting it to a QML ListModel
and sending the appropriate signals.

The SortFilterProxyModel library is not used anymore, the only case
where we need to filter/sort something now is when the user interacts
with the "Filter rooms" or "Filter members" fields. These cases are
handled by a simple JS function.

We now keep separated room and timeline models for different accounts,
the previous approach of sharing all the data we could between accounts
created a lot of complications (local echoes, decrypted messages
replacing others, etc).

The users's own account profile changes are now hidden in the timeline.
On startup, if all events for a room were only own profile changes, more
events will be loaded.

Any kind of image format supported by Qt is now handled by the
pyotherside image provider, instead of just PNG/JPG.
SVGs which previously caused errors are supported as well.

The typing members bar paddings/margins are fixed.

The behavior of the avatar/"upload a profile picture" overlay is fixed.

Config files read from disk are now cached (TODO: make them reloadable
again).

Pylint is not used anymore because of all its annoying false warnings
and lack of understanding for dataclasses, it is replaced by flake8 with
a custom config and various plugins.

Debug mode is now considered on if the program was compiled with
the right option, instead of taking an argument from CLI.
When on, C++ will set a flag in the Window QML component.

The loading screen is now unloaded after the UI is ready, where
previously it just stayed in the background invisible and wasted CPU.

The overall refactoring and improvements make us now able to handle
rooms with thousand of members and no lazy-loading, where previously
everything would freeze and simply scrolling up to load past events
in any room would block the UI for a few seconds.
2019-08-11 08:27:53 -04:00
miruka
858c9f337d Add decryption keys import in account settings 2019-07-25 02:43:52 -04:00
miruka
47d30352fa EditAccount header: match Display name field 2019-07-24 16:37:14 -04:00
miruka
ec27ecf498 Initial themes implementation, new default theme 2019-07-24 02:14:34 -04:00
miruka
c0b51b574c ui-settings: Rename write_aliases to writeAliases 2019-07-21 08:57:17 -04:00
miruka
853bb350b4 Make EditAccount show a spinner until ready
Instead of crashing if userInfo is not yet available.

statusMessage is removed for now from UserUpdated events,
and the users model items will have a "loading" property.
2019-07-21 07:14:16 -04:00
miruka
414082d258 Make EditAccount keyboard-flickable, fix function 2019-07-20 18:28:00 -04:00
miruka
a3e2233391 Fix window/content sizes for EditAccount page 2019-07-18 23:59:05 -04:00
miruka
28b6114218 Make profile edit avatar 256px instead of 240 2019-07-18 23:52:51 -04:00
miruka
93bc2ff5a9 Add multiaccount write-as alias account setting 2019-07-18 21:58:21 -04:00
miruka
ff7c2413df Change "Save" button to "Apply" in EditAccount 2019-07-18 20:58:38 -04:00
miruka
50930aec36 Fix profile cancel button not restoring avatar 2019-07-18 18:48:32 -04:00