Commit Graph

144 Commits

Author SHA1 Message Date
miruka
d6fd518334 Add HTabButton component 2019-11-08 10:17:23 -04:00
miruka
7bed1eca30 AddChat page 2019-11-08 10:17:23 -04:00
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
b7b309ad4c SignIn: increase box width again
To avoid the Login button loading icon from making the button grid
switch to column mode.
2019-09-09 14:50:45 -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
81f54641ba SignIn: increase box width to avoid eliding 2019-09-09 11:24:42 -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
e5893c5569 HBox: Add arrow keys navigation
Also rename enterButtonTarget to clickButtonOnEnter
2019-09-09 07:41:48 -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
11486ab51d Add homeserver URL field to login screen 2019-09-07 17:24:58 -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
f5e52aed4e Fix qrc resources not working 2019-08-25 15:39:00 -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
bdf7a63e6f Increase sign in login method icons size 2019-08-21 04:43:37 -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
1ab79347e9 Refactor HInterfaceBox and SignIn page
- Cleaned up code
- Sizes are standardized
- New HCheckBox component
- Replace RememberAccount page by a checkbox on the SignIn page
- The page can now be flicked if it's not tall enough to display
  everything

- HNumberAnimation now has an overshoot property that will set the right
  easing type, overshoot and adapt the animation factor/duration.
- HImage can now be colorized
2019-08-17 13:04:43 -04:00
miruka
28b5fbd267 Disable login button until ID & password entered 2019-08-16 16:44:28 -04:00
miruka
c7adb5b02f Show error messages on login screen 2019-08-16 16:30:18 -04:00
miruka
2d031a3fd2 After remember dialog, show edit account page 2019-08-16 13:20:12 -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
b6290ad3c9 Fix SignIn circle buttons colors 2019-07-24 18:41:40 -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
519d3610ef Change HTextField borders, SignIn disable buttons
By default now, fields have a transparent border if not focused and
accent-color border if focused.
Set `bordered: false` for no border at all.

The register and forgot buttons on the SignIn screen are now disabled,
since their functions aren't implemented yet.
2019-07-18 20:39:13 -04:00
miruka
d597e1dda8 Refactor Backend and config file operations 2019-07-18 20:30:41 -04:00
miruka
50930aec36 Fix profile cancel button not restoring avatar 2019-07-18 18:48:32 -04:00
miruka
1fa8b70359 ES5 → 7: Use for in/of and let 2019-07-18 05:18:13 -04:00
miruka
8a38274280 Make all JS functions and variables camelCase
According to conventions.
2019-07-18 04:48:34 -04:00
miruka
ea02ce2316 ES5 → 7: Use enhanced object properties
http://es6-features.org/#PropertyShorthand

Instead of doing {"foo": foo, "bar": bar, ...}, we can just do
{foo, bar} now.

The function parameters of EventHandlers have all been renamed to
camelCase to make use of this, as the JS style conventions intend.
Other functions will follow in a later commit.
2019-07-18 04:17:35 -04:00
miruka
8f53d2e018 Qt 5.12 ES5 → 7: Use "() =>" and array.includes 2019-07-18 03:13:34 -04:00
miruka
271b3e3829 Change all colors to use the new hsl(a) functions 2019-07-18 01:31:51 -04:00
miruka
fa61e8f0e3 Standard way of knowing if window "is wide" 2019-07-18 01:18:06 -04:00
miruka
902ac250b0 Fix file names to respect conventions
Important markdown/text files: UPPERCASE.ext
QML module dirs, qml files: PascalCase
Python module dirs, py files, js files: snake_case
Everything else (including icons): hyphen-case
2019-07-17 13:40:28 -04:00
miruka
96745902f3 Move header definition from EditAccount to HPage 2019-07-16 12:53:52 -04:00
miruka
a813b1c715 HPage with SwipeView to show reduced side pane 2019-07-16 12:37:11 -04:00
miruka
29e21bc7c2 Fix avatar upload overlay overflow at small size 2019-07-16 11:48:57 -04:00
miruka
d2dfafb4e7 Standardize spacings 2019-07-16 05:29:47 -04:00
miruka
d302a5cf5f Rename bottomElementsHeight to baseElementsHeight 2019-07-16 05:13:19 -04:00
miruka
d5dd1292ff wrap/elide: use Layout.fillWidth when possible 2019-07-16 05:08:27 -04:00
miruka
4b2cbffc83 Auto-set maximumLineCount for elide in HLabel 2019-07-16 04:47:56 -04:00
miruka
6ae37dc31f Always center button text (for now) 2019-07-16 04:41:26 -04:00
miruka
aef777d853 Fix image selection and overlay bugs 2019-07-16 04:37:39 -04:00
miruka
73ecbaad10 Add upload avatar hover overlay
Also fix name colors and always use fit-crop mode for avatars.
2019-07-15 20:10:43 -04:00
miruka
83cc148cdc Prevent flicking page when it 100% fits in window 2019-07-15 18:54:21 -04:00
miruka
18c9ff30cb Hide edit account header when page too small 2019-07-15 18:10:11 -04:00
miruka
503252f1c7 Make edit account UI more scalable
Put content in flickable, reduce avatar height as needed.
The minimum supported resolution of the app should now be 240x120.
2019-07-15 17:43:53 -04:00
miruka
62056b6124 Avatar change working 2019-07-15 16:14:08 -04:00
miruka
751a27157c Add account settings page
Display name change working
2019-07-13 20:15:20 -04:00
miruka
eeea0af4cd Change every QtQuick import versions to 2.12 2019-07-13 05:39:01 -04:00
miruka
6916039546 Add "Edit Account" interface skeleton 2019-07-13 05:34:58 -04:00
miruka
a2136dfe3c Rename HButton to HUIButton 2019-07-10 15:03:05 -04:00
miruka
0f6474532b Add LGPL license headers 2019-07-07 23:53:08 -04:00
miruka
8dccfffc8b Drop kwargs support for callCoro/callClientCoro 2019-07-07 23:38:37 -04:00
miruka
06c823aa67 Build system, messages support and more 2019-07-02 13:59:52 -04:00
miruka
3344debbbf Start rewriting backend with pyotherside+asyncio 2019-06-27 02:31:03 -04:00