Commit Graph

155 Commits

Author SHA1 Message Date
miruka
1adbddc063 Enable member lazy-loading for /sync and /messages 2020-05-15 20:56:23 -04:00
miruka
2cc3f27247 Add Ban to member context menu
Also don't try to load past messages in rooms we've left/been
kicked/banned from.
2020-05-15 20:56:23 -04:00
miruka
2d231b7af1 Properly check power levels before allowing kick 2020-05-15 20:56:23 -04:00
miruka
2a0a3765fc Add kick to room member context menu 2020-05-15 20:56:23 -04:00
miruka
4f8dc98d13 Sort mentioned/unread rooms by last event date 2020-05-15 20:56:23 -04:00
miruka
0ba8c6eecf Make all events able to increment unread/mentions 2020-05-15 20:56:23 -04:00
miruka
f3aa9f0c5f Sort rooms with mentions, then unreads first 2020-05-15 20:56:23 -04:00
miruka
0a1834b763 Mark rooms as read on all our accounts 2020-05-15 20:56:23 -04:00
miruka
568d4fddce Don't increment room unreads for our own events 2020-05-15 20:56:23 -04:00
miruka
e98a539433 Don't increment room unreads for past events 2020-05-15 20:56:23 -04:00
Emi Simpson
6ee20a2717 Added limited local read/unread tracking 2020-05-15 20:56:23 -04:00
miruka
b2cfc27ce2 accounts.json: support new "enabled" key
Specifying false will cause Mirage to ignore an account and not
log it in on startup.
Defaults to true when adding new accounts or if not present.
2020-05-15 20:56:23 -04:00
miruka
80ac8896d8 Pass a filesize to AsyncClient.upload()
Fixes #37
2020-05-15 20:47:33 -04:00
Mikko Rasa
9a6c4b5b30 Fix asyncio event loop init in qml_bridge.py
Depending on Python version the file may be imported in a thread and
asyncio only implicitly creates an event loop in the main thread of the
process.  Backend does things which need asyncio so we must ensure an
event loop exists before it is imported.

Fixes #15
2020-05-15 15:10:05 +03:00
miruka
4bae3cf90e Fix AttributeError with matrix-nio 0.11+ 2020-05-14 13:58:34 -04:00
miruka
8b8829af86 Use asyncio.Task.current_task for python 3.6 2020-04-26 13:49:44 -04:00
miruka
4961042bde Fix error on <a> tags without a href attribute 2020-04-07 09:57:32 -04:00
miruka
e0e33649a2 Stricter user/room/message ID mention parsing
Fixes issues like this entire string being linkified:
"! foo:example.org"
2020-04-06 08:30:47 -04:00
miruka
aa4cd5bd2c Bump version to v0.4.3 2020-04-03 07:56:42 -04:00
miruka
b48e663007 Cancel sending events when removing local echoes 2020-04-03 07:53:36 -04:00
miruka
0e04eafebd Redaction local echo for our other accounts 2020-04-03 07:53:36 -04:00
miruka
8af63a304f Redact local echo: same text as redaction event 2020-04-03 07:53:36 -04:00
vSLG
af861ac13a Add redact echo before we receive RedactionEvent 2020-04-03 07:53:36 -04:00
miruka
f8fe5d812b Imrpove redacted events text 2020-04-03 07:53:36 -04:00
miruka
6d270029ad Remove message keybind: don't bind ctrl+del
Ctrl+Del has a special function for deleting words in text, don't
override that
2020-04-03 07:53:36 -04:00
miruka
5ea339ea33 Add keybinds for message removal 2020-04-03 07:53:36 -04:00
miruka
05319af858 Redaction code adjustments + theme addition 2020-04-03 07:53:36 -04:00
vSLG
e60a7f6dac Make "Remove" option conditional in context menu
Refactor code in the backend so things can work
better
2020-04-03 07:53:36 -04:00
vSLG
fc878e7537 Fix event redaction and remove junk code 2020-04-03 07:53:36 -04:00
vSLG
db1afc980e Add RedactionEvent support on backend 2020-04-03 07:53:36 -04:00
vSLG
b3f1075507 Add redacting event via context menu 2020-04-03 07:53:36 -04:00
miruka
f838bdf96d focusRoomAtIndex binds: default to cmd+num on OSX 2020-04-03 07:53:36 -04:00
miruka
6e63569ad7 Add leaveRoom and forgetRoom keybinds 2020-04-03 07:53:36 -04:00
miruka
2a648d7f59 Add invite to room keybind 2020-04-03 07:53:36 -04:00
miruka
22be0bf5f0 MIRAGE_CONFIG_DIR and MIRAGE_DATA_DIR env vars
Allow overriding the default path where config files and user data are
found
2020-04-03 07:53:36 -04:00
miruka
eafd65d490 Fix compact mode being enabled by default 2020-03-28 11:04:43 -04:00
miruka
4185a30a6e theme_parser: translate hard tabs to spaces 2020-03-28 07:48:27 -04:00
miruka
311a53f8f4 "Unselect" → "Deselect" 2020-03-27 07:06:38 -04:00
miruka
4c76ffd88b Bump version to v0.4.2 2020-03-27 05:40:23 -04:00
miruka
936c49127d Add keyboard controls for message focus/selection 2020-03-27 04:49:01 -04:00
miruka
6ca10e1f2b Customizable unselectAllMessage keybind 2020-03-27 03:53:25 -04:00
miruka
684ddd364c Don't ignore case when linkifying display names 2020-03-24 04:12:09 -04:00
miruka
3dc81700c1 Correct mailto: linkifying in some special cases
adresses where the host ends with a digit or where the host is only one
character
2020-03-24 04:08:00 -04:00
miruka
0e191f11d0 Member ev. processing: don't assume any key exists 2020-03-24 03:56:31 -04:00
miruka
be43f68059 Support $id:server message ID mentions 2020-03-23 17:17:15 -04:00
miruka
bed0dbf998 Add setting to ignore unknown events 2020-03-23 16:58:31 -04:00
miruka
bd53993b90 Ignore mention links with no text 2020-03-23 16:34:51 -04:00
miruka
2e6488e6f9 Bump version to v0.4.1
Changelogs:

Added:

- `hideMembershipEvents` setting in config file, controls whether
  events such as "x joined the room" are shown in the timeline

- `hideProfileChangeEvents` setting in config file, controls whether
  display name and avatar change events are shown in the timeline

- Compact mode to make accounts, rooms, messages and room members
  take only one line as well as reducing vertical spacing between them.
  Set by the new `compactMode` setting in config file, and can also
  be toggled with the `keys.toggleCompactMode` keybind which defaults
  to Alt+Ctrl+C

- `keys.focusRoomAtIndex` in config file, a
  `{"<index>": "<keybind>"}` mapping which by default binds
  Alt+1-9 and Alt-0 to focus room 1 to 10 in the current account

- User ID, display names, room ID and room aliases are now
  automatically transformed to matrix.to links and will be rendered
  as mentions by clients.
  In Mirage, this results in user ID/names being colored with the
  same color seen when they send messages

- Track the number of times your user was mentioned in rooms.
  The visual counter is not yet displayed, since there currently is
  no way to mark messages as read and make the counter go down

Fixed:

- Python exceptions occuring in the asyncio loop not being printed
  in the terminal

- Extra newline shown after code blocks in messages

- Constant CPU usage due to button loading animations still being
  rendered while uneeded and invisible

Theme changes:

- Added `controls.avatar.compactSize` property
- Added `.mention` class styling to `chat.message.styleSheet`
2020-03-23 15:06:57 -04:00
miruka
38e57d2ff9 Color user mentions in local echoes too 2020-03-23 14:23:32 -04:00
miruka
4fdf531631 Fix mention-related KeyError in message callback 2020-03-23 13:43:30 -04:00