Bruno Windels
5fcf8022a1
store the url on every change, as PWAs don't trigger beforeunload ...
...
... when (force) closed
2020-10-14 15:30:40 +02:00
Bruno Windels
3d8dfc9635
also show grid layout in mobile layout, just in case of restoring url
2020-10-14 15:29:51 +02:00
Bruno Windels
7c2fc516bb
restore last url if not providing a specific one on startup
2020-10-14 15:10:32 +02:00
Bruno Windels
19e774ce01
don't assume grid button is a button, just in case
2020-10-14 14:54:56 +02:00
Bruno Windels
4f46854362
add close session button
2020-10-14 14:54:46 +02:00
Bruno Windels
d96f8adcc7
fix back button in room header not working
2020-10-14 14:53:52 +02:00
Bruno Windels
cf99f55f3d
fix typo making the room list not shown on the mobile layout
2020-10-14 14:20:53 +02:00
Bruno Windels
fd1df595c8
remove leftover logging
2020-10-14 14:06:11 +02:00
Bruno Windels
8122d76e73
Merge branch 'master' into bwindels/url-routing
2020-10-14 12:45:49 +02:00
Bruno Windels
b00db1af3e
only keep 20 outbound olm sessions in memory at once to prevent OOM
2020-10-14 12:44:27 +02:00
Bruno Windels
07701117cd
reduce megolm sync cache size to 1 session
...
as this is kept around for every e2ee room, and we only have
limited olm memory
2020-10-14 12:43:35 +02:00
Bruno Windels
6ad7be8726
fix leaking left panel view model after closing session
2020-10-14 11:34:34 +02:00
Bruno Windels
de83d7740b
replace custom error view with staticview
2020-10-14 11:26:39 +02:00
Bruno Windels
fa8bec0b56
fix room view model being leaked when closing session
2020-10-14 11:26:10 +02:00
Bruno Windels
b29b776e9f
fix olm session cache being leaked when closing session
2020-10-14 11:25:49 +02:00
Bruno Windels
789a41c671
fix styling for session info entries
2020-10-14 10:34:25 +02:00
Bruno Windels
692fa808e4
make utility buttons also useable for links
2020-10-14 10:34:11 +02:00
Bruno Windels
7e477b3c8d
rename button.styled to .button-action so it can also be used for links
2020-10-14 10:33:48 +02:00
Bruno Windels
5fe479e8a9
fix styling for room list items
2020-10-14 10:20:20 +02:00
Bruno Windels
3d327b0875
also open the initial room in the room list
2020-10-14 10:20:00 +02:00
Bruno Windels
2333a959a2
actually apply the /session/<id> url after login!
2020-10-13 17:10:28 +02:00
Bruno Windels
ab354e9f38
update prop type
2020-10-13 15:19:54 +02:00
Bruno Windels
afbfb0c82c
anticipate non-found rooms
2020-10-13 15:18:13 +02:00
Bruno Windels
081820d8fb
also update view when going to an not-found room
2020-10-13 15:14:07 +02:00
Bruno Windels
a14795e3f8
unused
2020-10-13 15:05:11 +02:00
Bruno Windels
d1d675ed7a
make navigation observables already return new value before they emit
2020-10-13 14:54:57 +02:00
Bruno Windels
7f3e0f237b
also do redirect after initial navigation
2020-10-13 14:43:45 +02:00
Bruno Windels
1780f334ea
more tests
2020-10-13 13:13:47 +02:00
Bruno Windels
d9c8a6339e
support empty strings for rooms segment
2020-10-13 13:13:35 +02:00
Bruno Windels
7b13e45e19
fix creating the rooms segment
2020-10-13 13:13:15 +02:00
Bruno Windels
a360d0a2b9
also unset room vm if moving away from room
2020-10-13 13:12:49 +02:00
Bruno Windels
379d65edf1
also create new vm when coming for grid if transfering vm fails
2020-10-13 13:12:30 +02:00
Bruno Windels
77a58041eb
clean-up room grid initialization with vm transfering
...
also handle duplicate rooms, and add unit tests for grid vm
2020-10-13 13:11:19 +02:00
Bruno Windels
c8dd7b42e7
encountered this very unlikely race while testing, so prevent it
2020-10-13 13:10:35 +02:00
Bruno Windels
db5c98a706
support reassigning to null from untrack
2020-10-13 13:10:27 +02:00
Bruno Windels
4e8e9eae26
first round of fixes
2020-10-12 18:31:55 +02:00
Bruno Windels
14d2dcbc60
remove dead code
2020-10-12 17:49:41 +02:00
Bruno Windels
b2d6b7014b
first draft of url navigation for grid
2020-10-12 17:49:06 +02:00
Bruno Windels
6c2c29a7da
WIP
2020-10-09 19:43:11 +02:00
Bruno Windels
83ac3eccc5
apply url changes to view gallery
2020-10-09 17:04:25 +02:00
Bruno Windels
56e51fc2aa
idea comment
2020-10-09 17:04:17 +02:00
Bruno Windels
927e8134d3
use url navigation in root view model
...
also track all view models as it is
important everything is properly disposed now
2020-10-09 17:03:38 +02:00
Bruno Windels
33627edcb3
use url to go back in login view
2020-10-09 17:03:24 +02:00
Bruno Windels
35e85c55e0
use urls instead of callbacks to navigate in session picker
2020-10-09 17:03:13 +02:00
Bruno Windels
7b86b483ed
confirm before clearing
2020-10-09 17:02:19 +02:00
Bruno Windels
3ab68ef438
throw when something tracked is not disposable, fail early
2020-10-09 17:01:54 +02:00
Bruno Windels
1289f065d6
implement root view as template view
2020-10-09 17:01:39 +02:00
Bruno Windels
0f8f558889
dispose session container from view model
2020-10-09 17:01:22 +02:00
Bruno Windels
d48bbd122a
make applyUrl and history public
...
so we don't need to bother with silent flags in replaceUrl
2020-10-09 17:00:19 +02:00
Bruno Windels
35b83b7976
make SessionLoadViewModel transfer ownership of container with callback
...
also, deleting the session when navigating away is now done by
LoginViewModel
2020-10-09 16:59:34 +02:00
Bruno Windels
4ae622bdd3
make pushUrl silent again
2020-10-09 16:58:53 +02:00
Bruno Windels
41c1c9a6c3
rename Brawl -> Root
...
one of the last occurrences of brawl
2020-10-09 09:59:59 +02:00
Bruno Windels
c9bb18b87e
make loading screen a bit prettier
...
by wrapping it in a view with common pre-session chrome
this renames the existing SessionLoadView to SessionLoadStatusView
so we can call the wrapper the former.
2020-10-09 09:58:00 +02:00
Bruno Windels
696e7856f8
some cleanup
2020-10-09 09:56:01 +02:00
Bruno Windels
da9798979c
Merge branch 'master' into bwindels/url-routing
2020-10-09 09:30:38 +02:00
Bruno Windels
24690f8035
fix placeholder not being hidden in mobile layout
2020-10-09 09:30:06 +02:00
Bruno Windels
0d54f88670
early draft of showing load progress of a session loaded through url
2020-10-08 18:23:53 +02:00
Bruno Windels
00bd4364f0
early draft of loading session via url scheme
2020-10-08 18:23:37 +02:00
Bruno Windels
087aff4ef4
set to true if undefined passed in as well
2020-10-08 18:23:08 +02:00
Bruno Windels
4fe971775c
more url router work, differentiate between path and url
...
rename hashobservable to history
2020-10-08 18:22:36 +02:00
Bruno Windels
547241f577
Merge branch 'master' into bwindels/url-routing
2020-10-08 16:42:14 +02:00
Bruno Windels
ca0f8fd142
leave some space between room list tile and edge
2020-10-08 16:37:24 +02:00
Bruno Windels
5c2425796c
Merge branch 'master' into bwindels/url-routing
2020-10-08 16:33:19 +02:00
Bruno Windels
cb0ef1a1ae
this makes the caret huge on gnome web
2020-10-08 16:29:38 +02:00
Bruno Windels
35832e387a
Swap grid tile description based on focus
...
swap RoomPlaceholderView for generic StaticView
2020-10-08 16:14:59 +02:00
Bruno Windels
93e301e4fa
fix spinner margins
2020-10-08 15:53:12 +02:00
Bruno Windels
4783e03871
fix room header margin issue with hidden back button
2020-10-08 15:21:16 +02:00
Bruno Windels
868b1a1045
style composer
2020-10-08 15:20:52 +02:00
Bruno Windels
59802d1812
style room header
2020-10-08 15:00:20 +02:00
Bruno Windels
2cbe349a4d
don't read private parts
2020-10-08 14:21:34 +02:00
Bruno Windels
5c299c1db9
remove prefixes now we auto prefix
2020-10-08 14:18:48 +02:00
Bruno Windels
47a43869e6
fix grid layout in IE 11
...
this brings back index addressing rather than x y in the grid vm,
as we need to have a css class for every position for IE 11,
as we can't use css variables and autoprefixer can
translate grid-areas
2020-10-08 14:17:43 +02:00
Bruno Windels
c4cfb6f6d1
align left panel to 4px grid better, and simply margins
2020-10-08 10:29:30 +02:00
Bruno Windels
fd4b3d238f
increase click area of clear filter button, add search icon
2020-10-08 10:13:05 +02:00
Bruno Windels
c2eebb9af2
prevent filter field and composer breaking narrow layouts
2020-10-08 10:11:12 +02:00
Bruno Windels
e80f37603b
prevent breaking narrow layouts with inputs
2020-10-08 10:10:39 +02:00
Bruno Windels
26112fe3de
update grid icons
2020-10-08 10:10:03 +02:00
Bruno Windels
dafa995429
placeholder does not count as room shown
2020-10-07 18:00:07 +02:00
Bruno Windels
b79b41adcd
keep focused class
2020-10-07 17:59:58 +02:00
Bruno Windels
c80c369c42
prevent grid item from growing to max content height
2020-10-07 17:59:40 +02:00
Bruno Windels
bd959bc147
style grid button
2020-10-07 17:59:28 +02:00
Bruno Windels
ddda03d82c
style filter field and grid button
2020-10-07 17:59:14 +02:00
Bruno Windels
61b5369f2f
also show status view a bit lower for grid
2020-10-07 14:53:41 +02:00
Bruno Windels
f6d9ffa7bb
friends don't read each others private properties
2020-10-07 14:36:08 +02:00
Bruno Windels
46b24c3f24
fix room not changing when not in grid view
2020-10-07 14:32:57 +02:00
Bruno Windels
537972b97b
clarify comment
2020-10-07 14:25:32 +02:00
Bruno Windels
de14d6b54b
fix filter field taking up too much width
2020-10-07 14:22:14 +02:00
Bruno Windels
152a83f75f
css for the grid view
2020-10-07 14:22:00 +02:00
Bruno Windels
99ff387dec
index the room by x,y instead of index from the view
...
so it is easier to implement a focus-ring as a separate dom node
2020-10-07 14:18:35 +02:00
Bruno Windels
b9d2da736a
when opening room, focus in grid if already open
2020-10-07 13:18:19 +02:00
Bruno Windels
1ff6d36ec3
add grid toggle button to left panel
2020-10-07 12:31:52 +02:00
Bruno Windels
7955462dda
render grid view in session view
2020-10-07 12:31:24 +02:00
Bruno Windels
dc1357bb31
support clearing unread when focusing a room
2020-10-07 12:30:46 +02:00
Bruno Windels
614ec08238
integrate grid vm with session vm, allowing to switch
2020-10-07 12:25:40 +02:00
Bruno Windels
9cc7833d7a
implement room grid view
2020-10-07 12:24:44 +02:00
Bruno Windels
5a1d255d2a
implement room grid view model
2020-10-07 12:23:02 +02:00
Bruno Windels
01ff806b86
WIP
2020-10-07 09:40:51 +02:00
Bruno Windels
404de53c75
basic url router and navigation bootstrapping
2020-10-06 18:06:11 +02:00
Bruno Windels
b373a177ec
create room url in room tile
2020-10-06 18:05:52 +02:00
Bruno Windels
221b94adbf
room tile should be passed child options
2020-10-06 18:05:38 +02:00
Bruno Windels
5ab947e7de
pass urlRouter and navigation as view model options
2020-10-06 18:05:02 +02:00
Bruno Windels
514095da7a
move waitFor and get to BaseObservableValue
2020-10-06 18:04:34 +02:00
Bruno Windels
b8dcb249ff
implement url router
2020-10-06 18:03:12 +02:00
Bruno Windels
ef428809b5
implement navigation stack
2020-10-06 18:01:56 +02:00
Bruno Windels
1de645a990
give filter field a bit more space
2020-10-06 13:32:27 +02:00
Bruno Windels
e878b5786e
fix room view not showing anymore on narrow viewports
2020-10-06 13:31:23 +02:00
Bruno Windels
a7db44eabf
Merge pull request #138 from vector-im/bwindels/filter-room-list
...
Room list filtering
2020-10-06 11:08:39 +00:00
Bruno Windels
b1cb797919
fix refactor error in xhr, breaking it
2020-10-06 13:02:35 +02:00
Bruno Windels
0d6fe32f30
clear filter on esc
2020-10-06 12:43:31 +02:00
Bruno Windels
ddbe3305c8
fix filter field height
2020-10-06 12:34:13 +02:00
Bruno Windels
2fe6f4b769
clean up SessionView by making it a TemplateView
2020-10-06 12:23:17 +02:00
Bruno Windels
cac3daca72
add LeftPanelView(Model) with room filtering
2020-10-06 12:23:11 +02:00
Bruno Windels
c8125595a7
render hidden flag
2020-10-06 12:21:42 +02:00
Bruno Windels
c532cb5aea
add hidden flag to room tile vm
...
also move to leftpanel dir
2020-10-06 12:21:11 +02:00
Bruno Windels
e3fdd3a4fd
ApplyMap, your observable map collection for applying side-effects
2020-10-06 12:20:28 +02:00
Bruno Windels
9a3734e5ba
this is a NOP, but in the future might not be
2020-10-06 12:20:03 +02:00
Bruno Windels
7def542e21
fix test
2020-10-06 12:19:47 +02:00
Bruno Windels
84425fad5c
more work on FilteredMap (not done yet though)
...
I ended up not using this, but at some point we'll need it,
so commit this work
2020-10-06 12:19:08 +02:00
Bruno Windels
943467cf67
actually implemented filtered map
2020-10-05 18:18:44 +02:00
Bruno Windels
5ae1be9a9c
ignore invalid json on error pages
2020-10-05 17:18:05 +02:00
Bruno Windels
c8e4dbc1b3
this should be a map
2020-10-05 17:06:29 +02:00
Bruno Windels
b2e6310775
re-focus composer when clicking send button
2020-10-05 17:03:46 +02:00
Bruno Windels
a04a6a83be
fix composer not being visible on mobile
2020-10-05 17:03:32 +02:00
Bruno Windels
8f5d678698
cache small media repo thumbnails in service worker
2020-10-05 15:58:29 +02:00
Bruno Windels
6a8c0b52e0
indenting
2020-10-05 15:10:06 +02:00
Bruno Windels
8dc2816d6e
keep hashed files in cache as long as they don't change
2020-10-02 19:54:24 +02:00
Bruno Windels
e93b091566
dont use no-cache in fetch, as it doesn't play well with CORS on Safari
2020-10-02 14:02:59 +02:00
Bruno Windels
07eee8fac1
only create fragments when we will really write events to the timeline store
2020-10-01 17:01:33 +02:00
Bruno Windels
bebdaad7d4
log when we can't abort
2020-10-01 16:23:15 +02:00
Bruno Windels
c1df371a14
add some documentation for our idb investigations
2020-10-01 16:14:58 +02:00
Bruno Windels
9a4d47820d
change this back as well
2020-10-01 14:46:30 +02:00
Bruno Windels
cb7da2ba4a
dont need this anymore
2020-10-01 14:45:09 +02:00
Bruno Windels
f402e8c6c4
typo/thinko in docs
2020-10-01 14:39:23 +02:00
Bruno Windels
300529b7c5
write sync token first
...
in case we get a TransactionInactiveError,
we have at least written the sync token
and won't repeat the same sync request
2020-10-01 14:38:54 +02:00
Bruno Windels
1117c77d05
note for future optimisation
2020-10-01 14:36:00 +02:00
Bruno Windels
d5a6a4d350
todo comment
2020-10-01 14:35:46 +02:00
Bruno Windels
3c7125bb88
add (optional) logging for idb requests
2020-10-01 14:35:33 +02:00
Bruno Windels
93a7f9959e
Safari doesn't like the prepare txn still open when opening the sync txn
...
Waiting for it to close magically solves the TransactionInactiveError
we were seeing on some incremental sync request when
reading from roomMembers.
Still unsure what this is about, and if we should wait for all read txns
to close or not.
2020-10-01 14:31:38 +02:00
Bruno Windels
ddb14f48bf
we actually don't need to track write requests
...
as errors will bubble up to the txn
2020-10-01 14:31:08 +02:00
Bruno Windels
d5a52c32d6
these don't return a promise anymore
2020-09-29 11:51:14 +02:00
Bruno Windels
37690cffe3
track storage write requests internally, as we never await their promise
2020-09-29 11:50:37 +02:00
Bruno Windels
482b5f4d22
allow passing message to IDBRequestError
2020-09-29 11:50:10 +02:00
Bruno Windels
43d430fc98
remove unused storage modification functions
2020-09-29 11:47:49 +02:00
Bruno Windels
f993048a2b
Merge branch 'master' into bwindels/idb-promises-txn
2020-09-29 11:33:58 +02:00
Bruno Windels
e5b1cbbcd3
prevent endless loop when restoring messages that were already sent
2020-09-29 11:32:49 +02:00
Bruno Windels
7627a2bda2
add comment
2020-09-29 10:53:02 +02:00
Bruno Windels
163ca12854
ignore abort error
2020-09-29 10:52:52 +02:00
Bruno Windels
919357b474
more broken imports after refactor
2020-09-29 09:57:48 +02:00
Bruno Windels
c529df179b
also import this
2020-09-29 09:56:46 +02:00
Bruno Windels
c1ecaffbae
fix refactor typo
2020-09-29 09:54:51 +02:00
Bruno Windels
07fcf7e75b
also do this in try catch
2020-09-29 09:43:25 +02:00
Bruno Windels
4d23529b68
set promise polyfill before others
...
just in case
2020-09-29 09:42:43 +02:00
Bruno Windels
b1f9cfd972
cleanup storage errors a bit
2020-09-29 09:17:03 +02:00
Bruno Windels
ee4c132fb4
add todo
2020-09-28 16:06:41 +02:00
Bruno Windels
76381fbca1
open storage transactions synchronously
...
this (almost) makes it work in some browsers that otherwise
have throw a TransactionInactiveError on the first operation
you try to do on a store.
2020-09-28 16:06:41 +02:00
Bruno Windels
d759e1429f
set error before changing state to stopped
2020-09-28 16:06:19 +02:00
Bruno Windels
3440823981
Merge pull request #117 from vector-im/bwindels/idb-promises
...
Prevent transaction from closing on IE11/Win7
2020-09-28 13:37:34 +00:00
Bruno Windels
47dbc87e95
load promise first
2020-09-28 15:34:10 +02:00
Bruno Windels
bb58fa9b6c
dont need this anymore
2020-09-28 15:32:40 +02:00
Bruno Windels
18cc34c082
remove extra newlines
2020-09-28 15:31:04 +02:00
Bruno Windels
dd30f51ffe
add copyright
2020-09-28 15:28:51 +02:00
Bruno Windels
9cf24d910a
properly install polyfill and remove logging
2020-09-28 15:28:38 +02:00
Bruno Windels
6d003f9565
don't include corejs promise polyfill anymore
2020-09-28 15:28:22 +02:00
Bruno Windels
e3581c8260
use our fork of es6-promise with flush exposed as the promise polyfill
2020-09-28 15:27:38 +02:00
Bruno Windels
8366b44d8c
dont assume global is window
2020-09-28 14:52:12 +02:00
Bruno Windels
98a6d82820
detect when sync promise hack is needed
2020-09-28 14:51:41 +02:00
Bruno Windels
706ec97296
change method name
2020-09-28 13:25:44 +02:00
Bruno Windels
64290d5ae6
flush promises manually in idb event handler
2020-09-25 16:53:19 +02:00
Bruno Windels
becdf656a4
nicer error messages when decrypting with a worker
2020-09-25 16:52:26 +02:00
Bruno Windels
27a8ef4604
add comment how timeouts interact with the reconnector
2020-09-25 10:45:41 +02:00
Bruno Windels
e175e9ac8b
cleanup
2020-09-25 10:45:34 +02:00
Bruno Windels
134b04c782
make flushing room key shares reentrant
...
as it can be called from Room.start while still running.
2020-09-25 10:45:00 +02:00
Bruno Windels
bcca23bac9
retry sync on timeout, even for incremental sync
2020-09-25 10:44:36 +02:00
Bruno Windels
7f0d36cf79
remove double negation
2020-09-25 10:44:19 +02:00
Bruno Windels
86df4993e1
prevent room summary from being updated every time it is in /sync resp
2020-09-24 16:45:28 +02:00
Bruno Windels
46abafdccc
ensure cloned is always set to false for this._data
...
by making all assignments of this._data go through applyChanges
2020-09-24 16:40:51 +02:00
Bruno Windels
4a0173e90f
only run decryptPending if needed
2020-09-24 10:53:51 +02:00
Bruno Windels
4d616ce281
add todo for future optimisation
2020-09-24 10:35:09 +02:00
Bruno Windels
ece4840653
don't mark rooms as unread after retrying decryption for now
...
this will not mark e2ee rooms as unread if their room key is delayed
though. We should really only do this for back-filled events but that
is hard to do right now, as we don't know the original source here.
2020-09-23 19:11:11 +02:00
Bruno Windels
eb4237f6f4
tell caller if an update was done from summery.writeAndApplyData
...
so room actually emits an update
2020-09-23 19:10:25 +02:00
Bruno Windels
17f84ab314
fix "this" still being used in readRawTimelineEntries ...
2020-09-23 19:09:44 +02:00
Bruno Windels
086bdafe9a
no need for async
2020-09-23 18:28:21 +02:00
Bruno Windels
7cad3b2bdb
some tabs in here
2020-09-23 18:22:51 +02:00
Bruno Windels
64f657e5a2
fix test
2020-09-23 18:20:29 +02:00
Bruno Windels
6e77ebb160
undo obsolete changes
2020-09-23 18:06:16 +02:00
Bruno Windels
d53b5eefb3
fill in the blanks
2020-09-23 17:59:42 +02:00
Bruno Windels
9d41e122a0
draft of falling back to reading entries since last decrypted event key
...
this change notifyRoomKey(s) to only take one room key at a time
to simplify things
2020-09-23 17:34:25 +02:00
Bruno Windels
a8392dc684
also decrypt messages in the sync response that enabled encryption
...
like initial sync
2020-09-23 14:26:14 +02:00
Bruno Windels
241176d6fb
WIP
2020-09-22 18:22:37 +02:00
Bruno Windels
137f55b44d
manage request scheduler in session container
...
so we can start it before sync does its first request,
which otherwise gets aborted because the scheduler hasn't started yet
2020-09-22 16:39:41 +02:00
Bruno Windels
150f06b9bf
also move to Stopped for aborts
2020-09-22 16:39:04 +02:00
Bruno Windels
85b451ffa1
can't rename named params like this
2020-09-22 15:49:43 +02:00
Bruno Windels
5660e0f4f0
rename send scheduler to request scheduler
2020-09-22 15:49:35 +02:00
Bruno Windels
0a00d4c865
use hsApi wrapper that handles rate-limiting instead of send scheduler
2020-09-22 13:43:18 +02:00
Bruno Windels
d7c25e3106
move MediaRepository out of HomeServerApi
...
so HomeServerApi becomes easier to wrap, only having methods
that return a RequestResult.
2020-09-22 13:40:38 +02:00
Bruno Windels
6cd227b82d
only prompt after waiting 10s for sync UTD
2020-09-22 09:30:25 +02:00
Bruno Windels
0a83bf1176
more notes for legacy css marker
2020-09-22 09:30:13 +02:00
Bruno Windels
3359d49161
off both passphrase and security key options
2020-09-21 19:19:55 +02:00
Bruno Windels
e6a46874c4
wrap olm error for creating session in DecryptionError
...
so we can relate it back to the event that caused it
2020-09-21 17:58:13 +02:00
Bruno Windels
c9ee5a5db2
stay in catchup mode as long as there are device messages
...
this implements https://github.com/vector-im/element-web/issues/2782
it also implements 0 timeout for catchup, getting rid of the
catching up with your convo banner for 30s upon reconnection.
2020-09-21 17:57:01 +02:00