Commit Graph

301 Commits

Author SHA1 Message Date
miruka
717680bf0c No leading 0 for RoomDelegate last event time
To save some pixels
2019-08-17 14:22:32 -04:00
miruka
72b5954ce3 Simplify startup and improve its animation
- Remove Python.loadingAccounts/willLoadAccounts
- Fix HPage SwipeView bug that caused its inner SidePane to steal focus

- Use overshoot for animation
- Get rid of sidepane flickering
- Set default HNumberAnimation easing.type to OutQuad, specify InOutQuad
  for HCheckBox
2019-08-17 14:14:18 -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
3e48d63cf3 Show date instead of "Yesterday" for RoomDelegate
"Yesterday" takes too much space
2019-08-17 13:00:32 -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
e920299db4 Update JSON config file if it lacks keys 2019-08-16 15:12:14 -04:00
miruka
be18a5db41 Make alert show for time set in cfg (default 4s) 2019-08-16 15:07:30 -04:00
miruka
0c493f88d8 Don't set alert if window already focused 2019-08-16 14:44:45 -04:00
miruka
1061498160 Alert (set urgency hint) on new messages 2019-08-16 14:27:25 -04:00
miruka
da4bb55f43 RoomDelegate last event time year 2019-08-16 13:44:44 -04:00
miruka
656dbbdf4a Make room filter field consider room's last event 2019-08-16 13:31:53 -04:00
miruka
186d42a45e Change accentText hue 2019-08-16 13:24:48 -04:00
miruka
2d031a3fd2 After remember dialog, show edit account page 2019-08-16 13:20:12 -04:00
miruka
f9ef75714d Increase padding between RoomDelegates 2019-08-16 13:10:40 -04:00
miruka
7d4da8952f Reduce RoomDelegate opacity for left rooms 2019-08-16 13:04:54 -04:00
miruka
e8b173163d Add icon to RoomDelegate for invited rooms 2019-08-16 12:55:54 -04:00
miruka
cf8ae13eae Set local echoes as room last events 2019-08-16 12:23:34 -04:00
miruka
9ca66b6044 Sort rooms by last event date again 2019-08-16 12:19:43 -04:00
miruka
2bb3952225 Show last event time in RoomDelegate
Also respect locale for message times
2019-08-16 12:07:22 -04:00
miruka
c76ebe4fe2 Improve some texts 2019-08-16 09:47:44 -04:00
miruka
564ad4fa8f Fix invited/left rooms sorting 2019-08-16 03:01:40 -04:00
miruka
653934be71 Fix declining invitation being ignored 2019-08-16 02:12:37 -04:00
miruka
8baf336cf9 Room subtitle: show member but not profile events
Instead of not showing any kind of RoomMemberEvent.
2019-08-16 01:51:42 -04:00
miruka
729235fe6a When a room is left, set UI state to default page 2019-08-16 01:31:46 -04:00
miruka
69a3f4377d Show Default.qml from forget room button callback 2019-08-16 01:26:32 -04:00
miruka
6a7376d498 Update LeftBanner, fix forget button crash 2019-08-15 13:00:15 -04:00
miruka
3270c6dd19 Have inviter display name and avatar for rooms 2019-08-15 12:13:41 -04:00
miruka
2ac484b8f5 Remove now broken "don't read user theme if debug" 2019-08-15 12:08:43 -04:00
miruka
ea4ba38056 Give pane toolbar a stronger background 2019-08-15 12:06:51 -04:00
miruka
947c706638 Improve "nothing events to show yet" message 2019-08-15 11:56:28 -04:00
miruka
34edf923d0 Fix past events loading error for invited room 2019-08-15 11:46:40 -04:00
miruka
626f464c53 Save/load the sidepane filter text in ui state 2019-08-15 11:31:24 -04:00
miruka
710a5c0914 Keep filter bars from different sidePanes in sync 2019-08-15 11:30:22 -04:00
miruka
24ea8fa673 Register invited rooms 2019-08-15 10:51:37 -04:00
miruka
e027c56047 Add/improve ModelStore and Model __str__ 2019-08-15 09:57:58 -04:00
miruka
5f72397afe HLoader component, use Loader.asynchronous prop 2019-08-11 23:25:22 -04:00
miruka
fbd7c45fe4 Fix MemberDelegate v padding when collapsed 2019-08-11 23:01:14 -04:00
miruka
9924b0565a Fix RoomDelegates v padding when collapsed 2019-08-11 22:57:36 -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
7e9106ee9c Utils.hsla(): use py.callSync 2019-07-25 19:19:24 -04:00
miruka
858c9f337d Add decryption keys import in account settings 2019-07-25 02:43:52 -04:00
miruka
93a6867735 Set own messages color 2019-07-25 00:10:07 -04:00
miruka
f5aa2c194a "ui-settings.json", "ui-state.json": no ui- prefix 2019-07-24 20:02:31 -04:00
miruka
99c3cc7d9f Put nio encryption files in an encryption subdir 2019-07-24 20:00:01 -04:00
miruka
504644e641 Fix JSONConfigFile read() when no file exists 2019-07-24 19:56:23 -04:00
miruka
a2469bd994 Don't use user theme in debug mode 2019-07-24 18:46:13 -04:00
miruka
b6290ad3c9 Fix SignIn circle buttons colors 2019-07-24 18:41:40 -04:00
miruka
607d1d8f5a Remove license header from theme file 2019-07-24 18:27:26 -04:00
miruka
6638a66578 Finish replacing light-thin icons 2019-07-24 18:25:12 -04:00
miruka
de11b53c4e Copy default theme to user data dir if not exist 2019-07-24 18:14:43 -04:00
miruka
5dc6c071d6 Add animation when reloading config file 2019-07-24 17:40:06 -04:00
miruka
eb97f08d6a Add keybind to reload config file (default Alt+R) 2019-07-24 17:26:40 -04:00
miruka
cf5d76dd10 Recursively merge default and user config 2019-07-24 17:20:21 -04:00
miruka
efa4ad0ae0 Add keybinds to config file 2019-07-24 17:05:27 -04:00
miruka
2be23128b1 Fix button hover overlay colors 2019-07-24 16:44:35 -04:00
miruka
cb25c30cb9 Fix EditAccount currentSpacing 2019-07-24 16:41:32 -04:00
miruka
47d30352fa EditAccount header: match Display name field 2019-07-24 16:37:14 -04:00
miruka
c3746fa106 Set display name saturation to match base colors 2019-07-24 16:28:56 -04:00
miruka
9c7a7e256d Fix green text color 2019-07-24 16:24:46 -04:00
miruka
72eff47012 Adjust/fix header, fields and buttons colors 2019-07-24 16:21:34 -04:00
miruka
29107ca7f2 Hide tooltips when they're not hovered anymore
Fix hovered avatar staying visible when cursor goes outside of window
(in most cases)
2019-07-24 15:59:34 -04:00
miruka
3439a74dab Add color animation to HBusyIndicator 2019-07-24 15:34:29 -04:00
miruka
8ad62eff58 Remove old default background image 2019-07-24 15:03:17 -04:00
miruka
921a0586cf Add background image variable to theme 2019-07-24 14:58:16 -04:00
miruka
ec27ecf498 Initial themes implementation, new default theme 2019-07-24 02:14:34 -04:00
miruka
345b17b21f Catch ErrorResponse json.dumps error 2019-07-23 14:48:37 -04:00
miruka
9397687122 Parse theme from a custom simpler format 2019-07-23 03:14:02 -04:00
miruka
cb1b95766c Remove indents in sendbox with backspace 2019-07-22 18:06:34 -04:00
miruka
4c7815554c Auto-indent new line in sendbox 2019-07-21 19:12:32 -04:00
miruka
67e06aa739 Remove debug print 2019-07-21 18:26:53 -04:00
miruka
5a1d974702 SendBox: insert 4 space on tab instead of huge \t 2019-07-21 18:23:45 -04:00
miruka
ab2a73dbfc Set html style for code 2019-07-21 18:17:51 -04:00
miruka
95c05356da Set style for html titles 2019-07-21 17:58:48 -04:00
miruka
2bd8514e9b Label link colors 2019-07-21 17:50:01 -04:00
miruka
843d40ca26 Fix > parsing and local echo 2019-07-21 17:41:43 -04:00
miruka
459880903d Message stylesheet; turn "> ..." into greentext 2019-07-21 16:53:34 -04:00
miruka
6e65376612 markdown: don't parse "> ..." as blockquote 2019-07-21 16:08:40 -04:00
miruka
238f38c9f0 Save/load which room categories are collapsed 2019-07-21 09:35:52 -04:00
miruka
f7d286cdc2 Save/load which accounts are collapsed 2019-07-21 09:26:47 -04:00
miruka
3287888a5c JSON configs read(): Merge default and user data 2019-07-21 09:24:11 -04:00
miruka
daa2c36af1 Save/load sidePane manually-set width 2019-07-21 09:08:22 -04:00
miruka
c0b51b574c ui-settings: Rename write_aliases to writeAliases 2019-07-21 08:57:17 -04:00
miruka
df920da2a6 Save & restore previous page when relaunching app 2019-07-21 08:55:25 -04:00
miruka
246058e647 Make Chat show spinner until ready
Like EditAccount, instead of crashing if the room isn't loaded yet.
2019-07-21 08:38:49 -04:00
miruka
5b421f02d8 Avoid some more avatar errors when forgetting room 2019-07-21 07:48:56 -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
71f78feec6 Define UIState config file 2019-07-21 06:05:01 -04:00
miruka
414082d258 Make EditAccount keyboard-flickable, fix function 2019-07-20 18:28:00 -04:00
miruka
41eea44fff Add keyboard shortcuts to flick the events list 2019-07-20 18:08:58 -04:00
miruka
d033ea84e8 Add scrollbars to flickable and listviews 2019-07-20 15:07:31 -04:00
miruka
1ffca37021 Fix sendbox modifier+enter for newline not working 2019-07-20 14:37:21 -04:00
miruka
cf54c0a29f Never show our own users in typing bar 2019-07-20 02:33:02 -04:00
miruka
7a959115ef Have bottom padding again for DayBreak 2019-07-20 02:27:17 -04:00
miruka
3e1e924147 Fix messed up delegate positions on new message 2019-07-20 02:21:12 -04:00
miruka
0488a7dde8 Fix nameLabel binding loop 2019-07-20 01:35:25 -04:00
miruka
cea586120e Rework how messages and events are handled
- No more translatable, content_type, show_name_line attrs for
  TimelineEventReceived.
  Since they are UI concerns, they are handled directly in QML.

- Refactor the EventDelegate and get rid of errors when new items
  are added to the timeline

- Messages, events and emotes all combine correctly.

- No more 28px wide avatars for events, to make them uniform with
  messages.
2019-07-20 01:30:58 -04:00
miruka
ecc2c099f1 Add /me command 2019-07-19 20:55:52 -04:00
miruka
58079a4ac2 Support RoomMessageEmote events 2019-07-19 19:19:43 -04:00