Bruno Windels
aac0e74b9d
also export LoadStatus
2021-10-01 12:49:30 +02:00
Bruno Windels
f89d169ef3
provide library entry point that provides convenient reexports of the public classes
2021-10-01 11:30:42 +02:00
Bruno Windels
1c06e36c1c
add override keyword
2021-10-01 10:07:17 +02:00
Bruno Windels
3de3481765
prefer optional syntax over '| null'
2021-10-01 10:05:56 +02:00
Bruno Windels
6b50a63e95
missing space
2021-10-01 10:02:32 +02:00
Bruno Windels
393e2f809e
make subscription handle return undefined, so we can reassign optional members in one statement
2021-10-01 10:01:52 +02:00
Bruno Windels
a0f443ccc3
Merge pull request #521 from DanilaFe/typescript-observable
...
Start migrating Observable code to TypeScript.
2021-10-01 09:54:29 +02:00
Bruno Windels
e42739ec81
scroll room list to top when entering query first
2021-09-30 17:19:42 +02:00
Bruno Windels
89add8b684
fix sssskey not being migrated properly
2021-09-30 10:18:03 +02:00
Bruno Windels
d10d27c1d6
clear relations for room when forgetting room
2021-09-30 09:49:45 +02:00
Bruno Windels
4cebe26186
Merge pull request #523 from vector-im/bwindels/clear-cache-after-515
...
clear history cache to purge potential timeline corruption from #515
2021-09-30 09:41:24 +02:00
Bruno Windels
f8f4bb4eac
Merge pull request #520 from vector-im/bwindels/fix-139
...
Keep backup of e2ee identity in localStorage when idb gets cleared
2021-09-30 09:28:56 +02:00
Bruno Windels
42f1603d81
use correct prefix to remove local storage value
2021-09-30 09:25:35 +02:00
Bruno Windels
ae68264db4
don't use switch where single if/else works
2021-09-30 08:42:00 +02:00
Bruno Windels
ccda93cc82
remove leftover logging
2021-09-30 08:40:49 +02:00
Bruno Windels
3556878a1e
clear history cache to purge potential timeline corruption from #515
2021-09-30 08:37:33 +02:00
Danila Fedorin
c80dfb10a2
Add type annotations to BaseMappedList
2021-09-29 18:41:30 -07:00
Danila Fedorin
99164eb0d8
Rename BaseMappedList to TypeScript
2021-09-29 18:17:38 -07:00
Danila Fedorin
bf53449f66
Add type annotations to common
2021-09-29 18:13:49 -07:00
Danila Fedorin
e53f3d23d5
Rename common to TypeScript
2021-09-29 18:10:09 -07:00
Danila Fedorin
64ba656043
Update ListView and TimelineListView
2021-09-29 18:08:13 -07:00
Danila Fedorin
414280ada9
Add type annotations to BaseObservableList
2021-09-29 18:05:30 -07:00
Danila Fedorin
3952c3b969
Rename BaseObservableList to TypeScript
2021-09-29 17:46:51 -07:00
Danila Fedorin
ab6ce62551
Add type annotations to ObservableValue
2021-09-29 17:43:17 -07:00
Danila Fedorin
a7360f409e
Rename ObservableValue to TypeScript
2021-09-29 17:42:57 -07:00
Danila Fedorin
319027e2e3
Add type annotations to BaseObservable
2021-09-29 17:42:57 -07:00
Danila Fedorin
d73dea797a
Rename BaseObservable to TypeScript
2021-09-29 17:18:22 -07:00
Bruno Windels
e0b9a3fa50
create e2ee identity also when storage got cleared without backup
2021-09-29 20:07:42 +02:00
Bruno Windels
a1c66738db
migration to initialize & restore e2ee identity backup
2021-09-29 19:39:26 +02:00
Bruno Windels
3a064d6796
a IDBRequest when opening the database does not have a source
2021-09-29 19:21:42 +02:00
Bruno Windels
2ef7251079
move ssssKey to e2ee prefix as well so it gets backed up too
2021-09-29 19:21:06 +02:00
Bruno Windels
77bd0d3f3c
store e2ee session values as well in localStorage
2021-09-29 11:49:58 +02:00
Bruno Windels
004aa5d3dc
Merge pull request #519 from vector-im/bwindels/rickfixes
...
Fix immediate errors for sdk usage
2021-09-29 11:12:17 +02:00
Bruno Windels
e31d3abc97
fix ts errors in TimelineEventStore unit tests
2021-09-28 14:20:54 +02:00
Bruno Windels
ec2f1b9833
add unit tests for findExistingKeys
2021-09-28 14:20:21 +02:00
Bruno Windels
edc3a1d33c
convert storage mock to TS and add utility for mock raw database
2021-09-28 14:19:59 +02:00
Bruno Windels
9036b21b5c
don't interpret hex as decimal when decoding the key
...
this fixes #515 as it was causing the gap not to be closed,
because the fragment id was never equal.
2021-09-28 11:34:55 +02:00
Bruno Windels
0846fcc05d
add more logging during gap filling
2021-09-27 16:34:12 +02:00
Bruno Windels
f55f450850
fix findExistingKeys too many (existing but not requested) keys
2021-09-27 16:27:52 +02:00
Bruno Windels
6982f55cd7
move over word-break lines
...
this didn't get moved over when converting the timeline tile css to css grid
2021-09-24 18:42:47 +02:00
Bruno Windels
71bd797dd4
automatically position popups using a simpler algorithm
2021-09-24 18:28:06 +02:00
Bruno Windels
b75e2fe0ce
decode straight to EventKey object
2021-09-24 15:40:33 +02:00
Bruno Windels
0d798178b0
log neighbor fragment id when closing gap
2021-09-23 18:50:40 +02:00
Bruno Windels
c6ed0abfd7
eventIds is missing
2021-09-23 18:49:23 +02:00
Bruno Windels
e6f7f213ec
don't (re)link fragments in fill, close gap if overlap w linked fragment
2021-09-23 18:02:05 +02:00
Bruno Windels
45917eae1d
Merge pull request #494 from vector-im/DanilaFe/backfill-changes
...
Unit tests for GapWriter, using a new timeline mock utility
2021-09-23 10:15:37 +02:00
Bruno Windels
4b7cb6da9e
make backfill limit explicit
2021-09-23 10:10:22 +02:00
Bruno Windels
dd71fdbe08
add comment
2021-09-23 10:04:58 +02:00
Bruno Windels
498c00fe3c
no need for try catch here as we already catch in getKeys
2021-09-22 10:38:29 +02:00
Bruno Windels
ac5a4c2bc6
pass log item everywhere to tryInsert
2021-09-22 10:33:40 +02:00
Bruno Windels
b58e10521f
don't log tryInsert failures anymore as everything is logged in Store
2021-09-22 10:23:28 +02:00
Bruno Windels
1963635dd7
also log index keys for a value when write fails in Store
2021-09-22 10:22:52 +02:00
Bruno Windels
a19d93dbef
don't swallow anything that isn't a request error
2021-09-22 09:36:26 +02:00
Bruno Windels
704d7b32da
add tests
2021-09-21 21:04:29 +02:00
Bruno Windels
6cded5319a
change timelineEventStore.insert to tryInsert
2021-09-21 21:04:10 +02:00
Bruno Windels
12add19c31
add Store.tryAdd, which prevent abort on ConstraintError
2021-09-21 21:03:29 +02:00
Bruno Windels
0d486a14f6
add the logger property to the null logger as well, forgot this before
2021-09-21 21:01:35 +02:00
Danila Fedorin
92dcc6c980
Remove duplicated lines
2021-09-21 09:39:09 -07:00
Bruno Windels
b8548afb71
export temporary vm typ def
2021-09-21 10:41:01 +02:00
Bruno Windels
07c6bf7055
Merge pull request #503 from vector-im/bwindels/fix-reactions-vm-null
...
use mapped value rather than reading parent vm again
2021-09-21 10:09:05 +02:00
Bruno Windels
a020febf8d
use mapped value rather than reading parent vm again
2021-09-21 10:02:17 +02:00
Danila Fedorin
a3a743881d
Make test adjustments requested in PR.
2021-09-20 19:37:39 -07:00
Danila Fedorin
50c8b995c3
Undo GapWriter algorithm changes
2021-09-20 18:41:01 -07:00
Danila Fedorin
9f6c48cf0c
Merge branch 'master' into DanilaFe/backfill-changes
2021-09-17 15:19:16 -07:00
Danila Fedorin
6d84cc0a81
Fix util import
2021-09-17 14:51:20 -07:00
Danila Fedorin
820b048272
Finish up the more difficult tests
2021-09-17 10:57:51 -07:00
Bruno Windels
53a0d29244
example how to get more context for the failure of a write operation
2021-09-17 18:25:28 +02:00
Bruno Windels
f5467a653c
fix stores returning the delete promise which isn't returned anymore
...
I checked these aren't awaited in any js file
2021-09-17 18:24:24 +02:00
Bruno Windels
ad45016b87
process write errors on complete or abort in transaction
2021-09-17 18:23:31 +02:00
Bruno Windels
533b0f40d3
pass write errors in a store to the transaction
2021-09-17 18:21:48 +02:00
Bruno Windels
aeedb948cc
pass logger to Storage and make it available in Transaction
2021-09-17 18:19:26 +02:00
Danila Fedorin
82c35355b6
Start translating GapWriter tests to using MockTimeline
2021-09-16 23:54:13 -07:00
Danila Fedorin
7d27b46873
Make the response of TimelineMock look like a room sync response
2021-09-16 23:53:38 -07:00
Danila Fedorin
bcfca9ad9a
Make event ID function public
2021-09-16 21:53:56 -07:00
Bruno Windels
41089e2806
remove leftover logging
2021-09-16 22:30:03 +02:00
Bruno Windels
c4477a81ea
don't create the avatar node when we won't need it
2021-09-16 22:29:48 +02:00
Bruno Windels
f02d52ce4c
with !interactive, an array of an array is not a valid Child value
...
why didn't this fail before?
2021-09-16 22:29:13 +02:00
Bruno Windels
bae8dc7dd7
changes should be true when replyVM is not set and we set an entry
2021-09-16 22:28:19 +02:00
Bruno Windels
e978202f36
add min-height: 0
2021-09-16 17:48:29 +02:00
Bruno Windels
9a9b206bf5
Merge pull request #486 from vector-im/bwindels/fix-scroll-jumps
...
Fix scroll jumps and loading of gaps not at top of the timeline
2021-09-16 17:14:17 +02:00
Bruno Windels
a62627f6db
fix lint warning
2021-09-16 16:39:17 +02:00
Bruno Windels
381a12db20
load 20 entries initially in timeline, otherwise it flickers a bit
2021-09-16 16:34:13 +02:00
Bruno Windels
898d32c6da
use quotes in css url path
2021-09-16 16:34:01 +02:00
Bruno Windels
6ec2712eec
remove debug logging
2021-09-16 16:33:09 +02:00
Bruno Windels
c9f79343ef
remove obsolete comment
2021-09-16 16:32:59 +02:00
Bruno Windels
b1994918fe
Merge pull request #488 from vector-im/bwindels/list-and-timeline-view-to-ts
...
Convert ListView and TimelineView to typescript
2021-09-16 16:08:34 +02:00
Bruno Windels
a6bcfac597
rename UIView to IView
2021-09-16 15:58:48 +02:00
Bruno Windels
b71a26b04a
avoid using ! in ListView
2021-09-16 15:56:57 +02:00
Bruno Windels
81ec8dca8c
improve typing in utils
2021-09-16 15:51:45 +02:00
Bruno Windels
d9ddeaf107
fix TS errors in TimelineView
2021-09-16 15:49:03 +02:00
Bruno Windels
00aa40ea7b
copy Daniel's conversion of TemplateView to TypeScript from microui
...
with some minor type adjustments
2021-09-16 15:46:02 +02:00
Bruno Windels
ea4d833a43
reuse ViewNode in Child type
2021-09-16 15:39:25 +02:00
Bruno Windels
040efa970c
make className binding always have a value (may be undefined through T)
2021-09-16 15:39:17 +02:00
Bruno Windels
68fb093c9e
don't require mount args in mountView, like in UIView interface
2021-09-16 15:23:48 +02:00
Bruno Windels
060f4aa297
change extension in preparation for TS conversion
2021-09-16 14:02:36 +02:00
Bruno Windels
65f69a121b
copy Daniel's conversion of BaseUpdateView to TypeScript from microui
2021-09-16 14:01:33 +02:00
Bruno Windels
69672dd99c
copy Daniel's conversion of html.js to TypeScript from microui
2021-09-16 10:45:06 +02:00
Bruno Windels
cce8207870
copy Daniel's conversion of EventEmitter to TypeScript from microui
2021-09-16 10:23:03 +02:00
Danila Fedorin
bbd174cd67
Add a class to mock timeline requests
2021-09-15 16:15:18 -07:00
Bruno Windels
2396a84c99
leave out svg editor markup from icon
2021-09-15 18:39:04 +02:00
Bruno Windels
e4101ece65
add "jump down" button in timeline
2021-09-15 18:30:08 +02:00
Bruno Windels
1df12b8c89
only allow pixel gaps of < 1px for stick to bottom to prevent eleweb bug
...
https://github.com/matrix-org/matrix-react-sdk/pull/6751
2021-09-15 17:23:53 +02:00
Bruno Windels
2c415e37e7
where ResizeObserver is support, restore anchored node on resize
2021-09-15 17:23:28 +02:00
Bruno Windels
04edff29cf
give more top padding to gaps that appear in the middle of the timeline
2021-09-15 15:57:31 +02:00
Danila Fedorin
d2b604e1dd
Stop using at
to fix tests.
2021-09-14 15:57:32 -07:00
Danila Fedorin
df273c5e2c
Store more events from backfill
2021-09-14 15:40:15 -07:00
Danila Fedorin
b2b5690739
Add more tests
2021-09-14 13:54:14 -07:00
Danila Fedorin
f8117b6f98
Lift transaction property to QueryTarget
2021-09-14 11:18:24 -07:00
Danila Fedorin
41e568f783
Add more tests and extract common test code
2021-09-14 11:15:13 -07:00
Danila Fedorin
31577cd496
Draft first two tests
2021-09-14 10:24:18 -07:00
Bruno Windels
247d6a2148
add comments
2021-09-14 17:01:30 +02:00
Danila Fedorin
b3df37b0bc
Add the beginning of a tests function for GapWriter
2021-09-13 17:01:32 -07:00
Danila Fedorin
713f675f3a
Mock IDBKeyRange, too
2021-09-13 17:00:49 -07:00
Danila Fedorin
71694787cd
Add an IDBFactory mock parameter
2021-09-13 16:55:55 -07:00
Bruno Windels
feb0cf7e39
fix viewport changing width when timeline starts filling the viewport
...
otherwise centered tiles like announcementview jump a bit vertically
2021-09-13 15:40:15 +02:00
Bruno Windels
906e5886e1
fix tiny jump when timeline starts filling viewport
2021-09-13 15:39:56 +02:00
Bruno Windels
ecccadb77e
avoid requestIdleCallback as it is not supported on Safari and IE11
2021-09-13 14:53:34 +02:00
Bruno Windels
8858cffc55
fallback from scrollBy() to setting scrollTop on IE11
2021-09-13 14:53:08 +02:00
Bruno Windels
02b8b37b4c
disable native scroll anchoring as it interferes with our impl
2021-09-13 13:11:25 +02:00
Bruno Windels
5c40b75eab
don't override newly requested ranges when retrying loadattop
2021-09-10 15:25:19 +02:00
Bruno Windels
9411e6f065
WIP
2021-09-10 14:47:05 +02:00
Bruno Windels
98cc1e2715
don't try to load more when end of timeline reached
2021-09-10 14:17:40 +02:00
Bruno Windels
fe4bb5db40
remove comment
2021-09-09 17:15:28 +02:00
Bruno Windels
d1242c4b67
make gaps taller
2021-09-09 17:15:06 +02:00
Bruno Windels
d0f122a2be
WIP-ish, batch visible range requests, allow setting empty ranges and...
...
don't try to notify when the tile becomes invisible again,
we don't need it currently
2021-09-09 17:14:16 +02:00
Bruno Windels
98678b991b
no need to store visible state on gap tile & don't fill if edge reached
2021-09-08 16:39:46 +02:00
Bruno Windels
ab67ac00b1
restore bottom of timeline initially after attach to DOM
...
this will also load more items if the viewport isn't filled
2021-09-08 12:06:17 +02:00
Bruno Windels
e89f60bac0
fill gap tiles when they become visible
2021-09-08 12:05:59 +02:00
Bruno Windels
7578bfa3d9
let tiles know when they become visible & load more tiles close to top
2021-09-08 12:05:19 +02:00
Bruno Windels
f4b4638ea8
actually, pass in just the tile instances for expressing the range
2021-09-07 19:10:53 +02:00
Bruno Windels
b3cd2a0e03
express the visible range with EventKeys rather than list indices
...
This is less ambiguous in case the DOM and the ObservableList would be
out of sync.
2021-09-07 17:48:49 +02:00
Bruno Windels
c78a83d398
restore most bottom tile in VP on any list change
...
and tell view model visible range so it can load more or fill gaps, ...
2021-09-07 15:17:27 +02:00
Bruno Windels
44ea65dd3e
Merge pull request #458 from MidhunSureshR/fix-457
...
Opening member-details panel should not open/close grid view
2021-09-07 12:16:24 +02:00
Bruno Windels
ad4ec5f04c
convert TimelineView to typescript
2021-09-06 17:51:32 +02:00
Bruno Windels
632d29795a
convert ListView to typescript
2021-09-06 17:12:14 +02:00
RMidhunSuresh
df74d0c814
Remove array from logic
...
Signed-off-by: RMidhunSuresh <hi@midhun.dev>
2021-09-06 17:41:36 +05:30
Bruno Windels
c6b020a9e7
Rename TimelineList to TimelineView for consistency
2021-09-06 13:31:43 +02:00
Bruno Windels
5953cdf0cc
turns out we do write these
2021-09-06 13:10:36 +02:00
Bruno Windels
35f8c40a0c
fix rebase mistake
2021-09-06 13:09:16 +02:00
Bruno Windels
7cb686ce8e
convert EventKey to ts
2021-09-06 13:07:41 +02:00
Bruno Windels
85c8415acd
convert Direction to ts
2021-09-06 13:06:20 +02:00
Bruno Windels
ed082c9869
Merge pull request #475 from vector-im/snowpack-ts-storage-4
...
Snowpack + Typescript conversion (Part 4)
2021-09-06 13:05:08 +02:00
Bruno Windels
36da02c14e
use generics here to say return type of method is same as callback
2021-09-06 13:01:32 +02:00
Bruno Windels
360b4db17a
Merge pull request #474 from vector-im/snowpack-ts-storage-3
...
Snowpack + Typescript conversion (Part 3)
2021-09-06 12:55:46 +02:00
Bruno Windels
ad28f1f9a3
split out Entry type for TimelineEventStore
2021-09-06 12:51:28 +02:00
Bruno Windels
cd98cac4e4
split out Entry type for OlmSessionStore
2021-09-06 12:46:44 +02:00
Bruno Windels
5d8e66a3f3
Merge pull request #473 from vector-im/snowpack-ts-storage-2
...
Snowpack + Typescript conversion (Part 2)
2021-09-06 11:06:46 +02:00
RMidhunSuresh
4f4bc8f805
Add test
...
Signed-off-by: RMidhunSuresh <hi@midhun.dev>
2021-09-06 14:20:33 +05:30
RMidhunSuresh
a54413625e
No need to pass in roomId
...
Signed-off-by: RMidhunSuresh <hi@midhun.dev>
2021-09-06 12:59:30 +05:30
RMidhunSuresh
f841efeef4
Make check more generic
...
Signed-off-by: RMidhunSuresh <hi@midhun.dev>
2021-09-06 12:41:17 +05:30
Bruno Windels
a0d66a71f7
Merge pull request #485 from vector-im/bwindels/make-ssss-key-settings-less-confusing
...
put switch button below input so it looks less like the big green lin…
2021-09-01 15:46:46 +02:00
Bruno Windels
6c3a64f020
put switch button below input so it looks less like the big green link is related to the first paragraph
2021-09-01 15:44:14 +02:00
Bruno Windels
27db00ab98
Merge pull request #484 from vector-im/bwindels/fix-483
...
Ignore redacting reactions on already redacted events
2021-09-01 14:23:13 +02:00
Bruno Windels
6cec583661
fix #483
2021-09-01 14:21:21 +02:00
Danila Fedorin
5b9fd5de94
Import BaseLogger instead of explicitly defining 'any' type
2021-08-31 16:01:13 -07:00
Danila Fedorin
78fb8fdadf
Make export types more precise
2021-08-31 15:59:50 -07:00
Danila Fedorin
2262e6be30
Use store name enum for saving stores
2021-08-31 15:44:03 -07:00
Danila Fedorin
de3807f690
Fix IDBKeyRange type
2021-08-31 15:35:01 -07:00
Danila Fedorin
4eabb7c074
Fix newly emerging type errors in schema
2021-08-31 15:32:33 -07:00
Danila Fedorin
7f8089eaff
Merge branch 'snowpack-ts-storage-3' into snowpack-ts-storage-4
2021-08-31 15:26:26 -07:00
Danila Fedorin
f34ee53a12
Avoid casting to any when a more specific type is possible
2021-08-31 15:14:21 -07:00
Danila Fedorin
bef02d238f
Split keys out of stored data types
2021-08-31 15:12:09 -07:00
Danila Fedorin
f5943ced97
Remove IDBValidKey references
2021-08-31 14:48:38 -07:00
Danila Fedorin
1fcc147da7
Add type to the IDBKeyRange field
2021-08-31 12:16:16 -07:00
Danila Fedorin
056c7d40eb
Rename RoomEvent to TimelineEvent
2021-08-31 12:10:36 -07:00
Danila Fedorin
16d3ed579b
Reduce IDBValidKey returns to the public API
2021-08-31 11:47:54 -07:00
Danila Fedorin
ce20d40ff7
Revert the return-promise change
2021-08-31 11:31:17 -07:00
Danila Fedorin
eb3f5f1ec2
Merge branch 'master' into snowpack-ts-storage-2
2021-08-31 11:13:10 -07:00
J. Ryan Stinnett
3e5cc07440
Move check to fingerprintKey
2021-08-31 17:14:14 +01:00
J. Ryan Stinnett
284ec8a74f
Check for null keys in settings view model
...
The keys to format in the settings view model might be null. This avoid crashing
the UI by testing for this case.
2021-08-31 16:11:33 +01:00
Bruno Windels
995ed23b3e
tell TS we're certain to have a txn
2021-08-31 08:43:39 +02:00
Bruno Windels
3d66d71c97
fix conflict
2021-08-31 08:39:12 +02:00
Bruno Windels
f466266a5f
bring back extra caution
2021-08-31 08:16:37 +02:00
Bruno Windels
3ded5b20d3
dedupe some code here
2021-08-31 08:16:27 +02:00
Bruno Windels
7fb5412176
keep comment where it was
2021-08-30 15:12:25 +02:00
Bruno Windels
0d6ae19d99
use same code to add room to identity in migration as in device tracker
2021-08-30 15:05:57 +02:00
Bruno Windels
a437332482
whitespace
2021-08-30 14:52:20 +02:00
Bruno Windels
0ca46bf2ac
don't log here as we log at a lower level, and don't fail on abort
2021-08-30 14:52:04 +02:00
Bruno Windels
ddb6753f8d
fix refactor error
2021-08-27 20:05:53 +02:00
Bruno Windels
6a6762f036
ensure memberwriter works with undefined for state/timeline events array
2021-08-27 20:05:34 +02:00
Bruno Windels
8e6bd6a7a1
add missing room ids to identities for tracked rooms & clear outbound session
2021-08-27 19:39:24 +02:00
Bruno Windels
fa555bedf0
log storage migration
2021-08-27 19:35:11 +02:00
Bruno Windels
0c05e97465
abort upgrade txn on error
2021-08-27 19:07:27 +02:00
Danila Fedorin
9252f3bede
Migrate StorageFactory to TypeScript
2021-08-27 09:30:16 -07:00
Danila Fedorin
5db9d1493a
Migrate export to TypeScript
2021-08-27 09:30:16 -07:00
Danila Fedorin
04e39ef9e2
Migrate quirks to TypeScript
2021-08-27 09:30:16 -07:00
Danila Fedorin
34b173a057
Migrate schema to TypeScript
2021-08-27 09:30:16 -07:00
Danila Fedorin
eae820f91b
Migrate Storage to TypeScript
2021-08-27 09:30:15 -07:00
Danila Fedorin
5f3c9cda97
Migrate Transaction to TypeScript
2021-08-27 09:30:15 -07:00
Danila Fedorin
100aee9dcc
Migrate InboundGroupSessionStore to TypeScript
2021-08-27 09:30:10 -07:00
Danila Fedorin
914abda7c9
Migrate OlmSessionStore to TypeScript
2021-08-27 09:30:10 -07:00
Danila Fedorin
3cd0d1f423
Migrate DeviceIdentityStore to TypeScript
2021-08-27 09:30:10 -07:00
Danila Fedorin
8d44df83c4
Migrate UserIdentityStore to TypeScript
2021-08-27 09:30:10 -07:00
Danila Fedorin
b46ae152d6
Migrate PendingEventStore.js to TypeScript
2021-08-27 09:30:10 -07:00
Danila Fedorin
fad6d63c14
Migrate TimelineFragmentStore.js to TypeScript
2021-08-27 09:30:10 -07:00
Danila Fedorin
742ab28099
Migrate AccountDataStore.js to TypeScript.
2021-08-27 09:30:10 -07:00
Danila Fedorin
77f75fd968
Migrate OperationStore to TypeScript
2021-08-27 09:30:10 -07:00
Danila Fedorin
8c966627bc
Migrate GroupSessionDecryptionStore to TypeScript
2021-08-27 09:30:10 -07:00
Danila Fedorin
33d94b9497
Migrate OutboundGroupSessionStore to TypeScript
2021-08-27 09:30:10 -07:00
Danila Fedorin
5d4454734a
Migrate RoomStateStore.js to TypeScript
2021-08-27 09:30:10 -07:00
Danila Fedorin
af70269169
Merge branch 'snowpack-ts-storage-1' into snowpack-ts-storage-2
2021-08-27 09:29:53 -07:00
Danila Fedorin
4c4687a05f
Avoid unsafe (and error-prone) cast
2021-08-27 09:29:02 -07:00
Bruno Windels
a61f052fe8
fix lint
2021-08-27 17:23:32 +02:00
Bruno Windels
826de7e9cb
Write all members of a sync in one go
...
so state member events written but not causing a memberChange.hasJoined
don't prevent timeline member events for the same user from doing so
2021-08-27 17:11:29 +02:00
Danila Fedorin
b081aa171c
Merge branch 'snowpack-ts-storage-1' into snowpack-ts-storage-2
2021-08-26 17:08:00 -07:00
Danila Fedorin
904a2cbe74
Merge branch 'master' into snowpack-ts-storage-1
2021-08-26 17:07:25 -07:00
Danila Fedorin
a95704528f
Merge branch 'snowpack-ts-storage-1' into snowpack-ts-storage-2
2021-08-26 17:01:23 -07:00
Danila Fedorin
b7d232d56d
Remove unnecessary cast and restrict constructor parameter type
2021-08-26 16:56:03 -07:00
Bruno Windels
d0c1ddb51b
add failing test
2021-08-26 15:18:31 +02:00
Danila Fedorin
6d6821319e
Merge branch 'snowpack-ts-storage-1' into snowpack-ts-storage-2
2021-08-24 11:19:36 -07:00
Danila Fedorin
1707df71df
Try to reduce repitition in CursorIterator
2021-08-24 11:11:30 -07:00
Bruno Windels
cb9606a87b
remove dead code for incomplete memory store
2021-08-24 15:33:41 +02:00
Bruno Windels
e105bc4237
fix lint warnings
2021-08-24 15:31:18 +02:00
Bruno Windels
54ac5a96ca
rename service-worker.js back to sw.js to unbreak updating
2021-08-23 20:23:38 +02:00
Bruno Windels
65bd892d8f
better naming
2021-08-23 20:09:45 +02:00
Bruno Windels
d31e442c16
better text
2021-08-23 20:06:52 +02:00
Bruno Windels
d1412e1f42
don't retry with www.{host}, as it's a minor security issue
...
if www.host gets hacked (e.g. a bad wordpress plugin), it could spread
to the matrix server running on a different host.
2021-08-23 20:05:42 +02:00
Bruno Windels
160ae0b767
adjust to AbortableOperation api change
2021-08-23 19:53:52 +02:00
Bruno Windels
59605a2a57
don't fail login on missing cors on well-known
2021-08-23 19:53:33 +02:00
Bruno Windels
c0d3c950b0
show the homeserver after lookup
2021-08-23 19:29:17 +02:00
Bruno Windels
3dbffdb417
don't requery the same homeserver we just did
2021-08-23 19:28:43 +02:00
Bruno Windels
e0d53e57ba
clear everything when typing in homeserver field
...
as it's not relevant anymore
2021-08-23 19:28:21 +02:00
Bruno Windels
e944dc5cac
decrease typing timeout to 1s
2021-08-23 19:27:24 +02:00
Bruno Windels
c7b47bb8d6
fix homeServer misspelling to homeserver across the project
2021-08-23 19:26:39 +02:00
Bruno Windels
3a5b7c1d0e
support well-known lookup
2021-08-23 18:47:36 +02:00
Bruno Windels
9760a4540e
remove debug log
2021-08-23 16:04:00 +02:00
Bruno Windels
993bc36096
dont query 2nd time after losing focus
2021-08-23 16:01:39 +02:00
Bruno Windels
d1301fa642
input is not needed in the name here
2021-08-23 15:57:16 +02:00
Bruno Windels
8eab9ab28b
add 2s timeout on input of homeserver to also query the homeserver, in addition to change event
2021-08-23 15:54:40 +02:00
Bruno Windels
577c3168e6
make queryLogin abortable
2021-08-23 15:54:06 +02:00
Bruno Windels
3b693c5b02
Merge pull request #453 from MidhunSureshR/sso-login
...
[SSO] - [PR 4] - SSO/Token login functionality
2021-08-23 11:38:48 +00:00
RMidhunSuresh
ef4db4abab
Make navigation simpler
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-23 17:00:41 +05:30
RMidhunSuresh
c9319c7c38
Catch any error from queryLogin
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-23 16:58:54 +05:30
RMidhunSuresh
fc169af10f
Rename toggle to set
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-23 16:09:40 +05:30
RMidhunSuresh
b0db7e0344
More simpler navigation
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-23 15:55:07 +05:30
RMidhunSuresh
e80667c935
Remove duplicate style
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-23 15:50:22 +05:30
RMidhunSuresh
69478b81b2
Fix toggleBusy
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-23 15:48:29 +05:30
RMidhunSuresh
ecfdc314d5
Do not set error message to empty string
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-23 15:28:44 +05:30
RMidhunSuresh
c9fbafb909
Also check LoadStatus.Error
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-23 15:12:40 +05:30
RMidhunSuresh
84fd286140
Split logintoken into two words
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-23 15:06:16 +05:30
Danila Fedorin
e610087a79
Merge branch 'snowpack-ts-storage-1' into snowpack-ts-storage-2
2021-08-20 12:51:23 -07:00
Danila Fedorin
a2ff02e6c0
Try using an enum for store names.
2021-08-20 12:33:06 -07:00
Danila Fedorin
69953e5277
Migrate TimelineRelationStore.js to TypeScript
2021-08-20 11:23:27 -07:00
Danila Fedorin
e3b1d034f0
Migrate TimelineEventStore.js to TypeScript
2021-08-20 11:23:21 -07:00
Danila Fedorin
7de704ef86
Migrate InviteStore.js to TypeScript.
2021-08-20 11:23:14 -07:00
Danila Fedorin
7c56ac7746
Migrate RoomMemberStore.js to TypeScript
2021-08-20 11:23:08 -07:00
Danila Fedorin
38a38e8287
Migrate common.ts
2021-08-20 11:23:01 -07:00
Danila Fedorin
e284224cc8
Migrate RoomSummaryStore.js to TypeScript.
2021-08-20 11:22:53 -07:00
Danila Fedorin
144e391c82
Migrate SessionStore.js to TypeScript.
2021-08-20 11:22:45 -07:00
Danila Fedorin
be4ad66b12
Merge branch 'snowpack-ts-storage-1' into snowpack-ts-storage-2-fix
2021-08-20 11:21:03 -07:00
RMidhunSuresh
04806a1425
Convert link to button
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 23:16:03 +05:30
Danila Fedorin
0b8acb51a4
Switch errors to using nulls
2021-08-20 10:41:15 -07:00
Danila Fedorin
50b7a8a3fd
Add a comment explaining CursorIterator
2021-08-20 10:34:06 -07:00
RMidhunSuresh
d47e126370
add missing emit
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 23:03:51 +05:30
RMidhunSuresh
0e6139d5e3
Use homeserver from login method
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 23:02:06 +05:30
RMidhunSuresh
94ba93acb5
Add explaining comment
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 22:57:13 +05:30
RMidhunSuresh
0630452571
No need to observe
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 22:53:15 +05:30
Danila Fedorin
94ff76711c
Use 'in' to be more idiomatic
2021-08-20 10:04:22 -07:00
RMidhunSuresh
a5985cba2a
Add spinner
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 22:18:24 +05:30
RMidhunSuresh
82067ca6f5
No need to pass showError
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 21:43:42 +05:30
RMidhunSuresh
55da58893b
Red + bold error
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 21:41:42 +05:30
RMidhunSuresh
a2677a6400
Separate errors for each vm
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 21:22:12 +05:30
RMidhunSuresh
355468b637
Internationalize + add back old message
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 20:36:33 +05:30
RMidhunSuresh
ff8417dfe2
Set busy state from login vm
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 20:31:22 +05:30
RMidhunSuresh
784b06d500
Fix emit for isBusy
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 20:12:25 +05:30
RMidhunSuresh
0e7a9e224c
Remove unwanted if
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 20:10:31 +05:30
RMidhunSuresh
5ca732341a
Rename defaultHomeserver to homeserver
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 20:09:12 +05:30
RMidhunSuresh
c650b35831
resetStatus from within startLogin
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 20:05:36 +05:30
RMidhunSuresh
9482998b15
Internationalize and remove dash
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 19:08:47 +05:30
RMidhunSuresh
2468bc3e9f
Remove homeserver prop
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 15:47:30 +05:30
RMidhunSuresh
dadeb7f3e5
Do not override childOptions
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 15:42:43 +05:30
RMidhunSuresh
bdc860eb79
Refactor to pull loadvm into login vm
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-20 15:19:42 +05:30
Danila Fedorin
19bababa68
Use method syntax in QueryTarget.
2021-08-19 17:40:10 -07:00
Danila Fedorin
704a8d99c7
Add missing return types to QueryTarget
2021-08-19 17:39:53 -07:00
RMidhunSuresh
80ea48e8a1
Move input into t.if
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-19 21:43:44 +05:30
RMidhunSuresh
5ab405fc30
Move back-button to login view
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-19 21:37:26 +05:30
RMidhunSuresh
3af2ae3bdd
make method private
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-19 20:50:00 +05:30
RMidhunSuresh
ed278e3e5a
Remove unwanted check
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-19 20:50:00 +05:30
RMidhunSuresh
2d842c7174
rename ssoEndpointLink to createSSORedirectURL
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-19 20:50:00 +05:30
RMidhunSuresh
daf7af17b1
Move logic to vm
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-19 20:50:00 +05:30
RMidhunSuresh
068fba3616
Inline method
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-19 20:50:00 +05:30
RMidhunSuresh
738603e890
Rename start to createViewModels
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-19 20:50:00 +05:30
RMidhunSuresh
17f1d6b16a
Remove defaultHomeServer prop
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-19 20:49:54 +05:30
RMidhunSuresh
10a6aca477
Move homeserver input into LoginView
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:05:25 +05:30
RMidhunSuresh
13cb8979ac
Check correct login method early
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:05:25 +05:30
RMidhunSuresh
83f4095d88
rename queryLogin to getLoginFlows
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:05:15 +05:30
RMidhunSuresh
d2c94b0d3e
Give argument better name
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
db3fd3d1ae
Fix test
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
7b9ec5516a
Move normalizeHomeserver into session container
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
c4e7dc3b5a
Split SSOLoginViewModel
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
4b72b64a2e
Implement SSOLoginHelper
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
f8b0ef052f
Give sso homeserver storage key a better name
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
98f8f04c74
Implement SSO
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
474a4bb19a
Remove Login vm
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
683d2c21eb
Use generic language in session load status
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
3fa955e594
Parse token/sso login in loginOptions
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
66f28b90fc
Implement token login
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
daeeaa2869
Set and get strings
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
e424293293
Save homeserver before redirecting
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
6c6c4c7dfd
Style CompleteSSOLoginView
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
93720f6025
Style sso button
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
b8f0361157
Split login view into password and sso components
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
cabffd5e3f
Move view to correct directory
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
c82af5a0a3
Replace link with button
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
ce5fdd465c
Remove unnecessary braces
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
0af27fc8dd
Move normalizeHomeserver to LoginViewModel
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
2c953e361d
Remove queryLoginFromInput()
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
2103adfc03
Add view
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
4b87887a4f
Show completion view on sso segment
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
75d71717d8
Show link for SSO login
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
b2613740b8
Add functionality to remove loginToken from URL
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
bed0185186
Support loginToken query in History
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
74f5e30487
Ignore sso segment in url
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
987a83b4cf
Add method to redirect to a specific URL
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
3efadcb72c
Add method that returns callback url
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
e2d2291d8d
Add test
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
19664e54be
Parse loginToken from query parameter
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:31 +05:30
RMidhunSuresh
18e1c305f5
Allow sso to be a root segment
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:04 +05:30
RMidhunSuresh
f3946fcdf3
Pass log as argument
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:04 +05:30
RMidhunSuresh
9651817c5b
Formatting fix
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:04 +05:30
RMidhunSuresh
730a6b2d0a
Move files to separate directory
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:04 +05:30
RMidhunSuresh
46b7d9a373
Add explaining comment
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:04 +05:30
RMidhunSuresh
72fb7f679b
Add license headers
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:04 +05:30
RMidhunSuresh
acfe3f30db
Make lint happy
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:04 +05:30
RMidhunSuresh
a53e29767f
Rewrite password login to use PasswordLoginMethod
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:04 +05:30
RMidhunSuresh
20765d9688
Create LoginMethod for password login
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:04 +05:30
RMidhunSuresh
e0fcec9102
Add method to query login types
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:02 +05:30
Bruno Windels
4b5f5ddffa
fix ts lint error by making methods abstract
2021-08-18 18:15:03 +02:00
Bruno Windels
02e422f3ac
Merge pull request #448 from vector-im/snowpack-mvp
...
Snowpack MVP
2021-08-18 13:09:02 +00:00
RMidhunSuresh
2ceaebbd1f
Don't find roomId in getter
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 18:17:37 +05:30
RMidhunSuresh
7e177f6953
Modify open-room action to fix bug
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 17:43:40 +05:30
Danila Fedorin
db66570d7a
Migrate Store.js to TypeScript
2021-08-17 16:33:07 -07:00
Danila Fedorin
c4e8ed8851
Migrate QueryTarget.js to TypeScript
2021-08-17 16:30:05 -07:00
Danila Fedorin
28ee87cd2f
Migrate error.js to TypeScript
2021-08-17 16:30:05 -07:00
Danila Fedorin
aa9839ee40
Seemingly fix a bug in utils.ts
2021-08-17 16:30:05 -07:00
Danila Fedorin
cd9fe360a4
Start migrating utils.js to TypeScript
2021-08-17 16:30:05 -07:00
Danila Fedorin
5579c018d1
Migrate common.js to TypeScript
...
Add initial stab at annotating common
Add missing return types and semicolons
2021-08-17 16:30:05 -07:00
Danila Fedorin
8ec8de67b8
Merge branch 'snowpack-mvp' into snowpack-ts-storage-1
2021-08-17 16:29:47 -07:00
Danila Fedorin
e8dff6d16b
Move web-specific files to platform/web
2021-08-17 14:13:27 -07:00
Bruno Windels
dbb9e5363c
guard against part types that have not been impl in the view
2021-08-07 09:00:41 +02:00
Danila Fedorin
f239199b1b
Add rendering for horizontal rules
2021-08-06 15:50:03 -07:00
Bruno Windels
2c8e259339
focus composer when replying
2021-08-06 23:43:10 +02:00
Bruno Windels
c3177b06bf
Merge pull request #418 from vector-im/replies
...
Sending replies
2021-08-06 21:28:42 +00:00
Bruno Windels
9f0c3b9cea
await sending a message before clearing composer (this was missing all along)
2021-08-06 23:06:58 +02:00
Danila Fedorin
3c5b186e31
Switch BaseEntry to TypeScript
2021-08-06 12:54:06 -07:00
Danila Fedorin
31c6aa647b
Switch to using snowpack-provided dompurify
2021-08-06 12:39:00 -07:00
Danila Fedorin
053c94b60e
Stop passing room to tiles in tests
2021-08-06 11:02:41 -07:00
Danila Fedorin
f8dae8e20c
Merge branch 'replies' of github.com:vector-im/hydrogen-web into replies
2021-08-06 10:54:33 -07:00
Danila Fedorin
a8fcf63cf9
Make the close button have a pointer cursor
2021-08-06 10:46:38 -07:00
Danila Fedorin
065b1789be
Remove interactive condition on continuation
2021-08-06 10:44:35 -07:00
Danila Fedorin
bf1f288a92
Make RoomViewModel's room public and stop feeding it to tileCreator
2021-08-06 10:40:25 -07:00
Danila Fedorin
4c1aeb342a
Add two new tests for replies
2021-08-06 10:35:45 -07:00
Danila Fedorin
8dc80e68a7
Remove out-of-date comment
2021-08-06 10:31:01 -07:00
Danila Fedorin
ac044cb5c2
Rename pending event fields
2021-08-06 10:27:17 -07:00
Danila Fedorin
1207203b00
Prefer relations from encrypted content
2021-08-06 10:22:43 -07:00
Danila Fedorin
5a0bc55e54
Rename reply function in reply.js
2021-08-06 10:16:20 -07:00
Bruno Windels
2a92363317
use disposeTracked
2021-08-06 17:56:02 +02:00
Bruno Windels
3feaf38252
use internalId to compare so we don't have to cache the entry id separately
2021-08-06 17:53:58 +02:00
Bruno Windels
5426908444
add copyright header
2021-08-06 17:49:39 +02:00
RMidhunSuresh
1ce111c317
Css fix
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 21:07:30 +05:30
RMidhunSuresh
b97b9da14a
Link to member-panel from avatar
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 20:51:39 +05:30
RMidhunSuresh
be57352f71
Move PowerLevels.js into /room
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 19:49:48 +05:30
RMidhunSuresh
1a062f69fd
Check state_key is zero-length string
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 19:02:50 +05:30
RMidhunSuresh
d85cf982cc
Check if state_key is present
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 17:34:21 +05:30
RMidhunSuresh
187cf5cd28
Use optional chaining
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 17:23:01 +05:30
RMidhunSuresh
2cae7c41d3
Check timeline before state
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 17:15:40 +05:30
RMidhunSuresh
4ddc7c0683
Update powerlevels in afterSync
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 17:15:40 +05:30
RMidhunSuresh
40128c7ff6
Set pl from room response
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 17:15:40 +05:30
RMidhunSuresh
b75760c437
Add event type string
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 17:15:40 +05:30
Bruno Windels
1862e31396
Merge pull request #417 from MidhunSureshR/member-details
...
Member Panel - PR 2 - UI
2021-08-06 11:18:52 +00:00
RMidhunSuresh
7e8d76a95e
Refactor map into switch-case
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 16:21:31 +05:30
RMidhunSuresh
bc8e6237d6
Merge suggestion from Github
2021-08-06 16:05:08 +05:30
R Midhun Suresh
3ff55204f3
No need for lambda here
...
Co-authored-by: Bruno Windels <bruno@windels.cloud>
2021-08-06 16:04:51 +05:30
RMidhunSuresh
dbd205701c
Remove unused prop
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 16:03:19 +05:30
RMidhunSuresh
86ddfc1e9e
Only need to emit
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 13:06:38 +05:30
R Midhun Suresh
974d9bf199
Don't cache powerlevel value
...
Co-authored-by: Bruno Windels <bruno@windels.cloud>
2021-08-06 13:02:58 +05:30
Danila Fedorin
21b067eaff
Create new tiles instead of keeping old ones
2021-08-05 10:05:50 -07:00
Danila Fedorin
434882069e
Lift tiles creator to RoomViewModel
2021-08-05 09:39:59 -07:00
Bruno Windels
73884cff0d
Merge pull request #412 from MidhunSureshR/member
...
Member panel - PR 1 - Add method to fetch member
2021-08-05 11:13:52 +00:00
RMidhunSuresh
49be4e64ca
Remove object
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
fea4143af9
Use texttransform
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
d3ea26a38a
Use i8n in role
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
862e8569a9
Describe what changed in emitChange()
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
a16c3aacab
Create getter
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
28a0a0830f
Copy over all segments after right-panel
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
0ff0850979
Remove dm user option
...
- I don't know why but I thought .../open-room/<user_id> would open an
invite view to a room with the specified user.
- Does not work like that, so removed.
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
d056a9f961
Keep memberlist until rightpanel is closed
...
- This should make switching between memberlist and
member-details panel smoother for large rooms
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
16887c3c33
Better formatting
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
448bf3cb3f
Style tile
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
4784bcc590
Make the tiles link to details
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
65b1a1958a
Add link to open member details
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
7dacbdb700
Show back button
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
7530b28130
Improve segment adding logic
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
ef17808fbd
Fallback to memberlist if member not available
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
f9b1068bae
Add links
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
fe6551ff3c
Use powerlevel
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
c9224c13a7
Improve code and css
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
c2b9c3f726
Add isEncrypted to vm
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
7ef7c419e3
Add basic UI and styling
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
acdba8fc02
Add license headers
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
e4bb20575b
Create navigation and add to right panel
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
fdd4caa0b7
Create vm and view
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh
7e481080b5
Return null
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:06 +05:30
Danila Fedorin
a9731f5a1d
Clean up code for inserting emotes
2021-08-04 16:02:37 -07:00
Danila Fedorin
b4a0c31e1c
Update test code with new function signature
2021-08-04 15:54:11 -07:00
Danila Fedorin
508214a46b
Insert emote text after quotes
2021-08-04 15:50:42 -07:00
Danila Fedorin
b5f16468ce
Add a flag to strip replies
2021-08-04 15:31:25 -07:00
Danila Fedorin
06961ff693
Add isReply flag to entries
2021-08-04 15:30:35 -07:00
Danila Fedorin
960e3ec469
Fix unsubscribing from observed events containing null
2021-08-04 11:08:35 -07:00
Danila Fedorin
2375bf061c
Strip relates_to from encrypted events' original contents.
2021-08-04 10:26:03 -07:00
Danila Fedorin
fa985f8f16
Blurb isn't really the right word.
2021-08-04 09:30:02 -07:00
Danila Fedorin
611c6e9717
Move replying code into reply.js and add license
2021-08-04 09:26:26 -07:00
Bruno Windels
0dc5041f47
WIP
2021-08-04 15:23:03 +02:00
Danila Fedorin
1a0e305212
Extract ComposerViewModel to its own file
2021-08-03 14:02:11 -07:00
Danila Fedorin
f0b6384ad7
Rename 'disabled' to 'interactive' in BaseMessageView
2021-08-03 13:27:33 -07:00
Danila Fedorin
8956f6ecf4
Fuse methods and properties related to replies
2021-08-03 13:10:36 -07:00
RMidhunSuresh
c9a4c393ed
Return null
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-02 23:51:19 +05:30
RMidhunSuresh
e363d32921
Return null on error
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-02 23:42:55 +05:30
RMidhunSuresh
bb68b4d367
Fetch member data from from state event if needed
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-02 23:01:44 +05:30
Bruno Windels
a9308f69b8
Merge pull request #420 from MidhunSureshR/add-license
...
Add missing license headers
2021-08-02 15:10:18 +00:00
Bruno Windels
89d9cd3782
Merge pull request #421 from MidhunSureshR/fix-avatar-lint
...
Fix lint warning
2021-08-02 15:09:31 +00:00
RMidhunSuresh
6cfb4cfbe0
Support state events
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-02 17:50:09 +05:30
Danila Fedorin
9bd7d1397c
Preserve the m.relates_to field for message.
2021-07-30 14:37:34 -07:00
Danila Fedorin
99a630fb84
Add a note on TilesCollection and diposing of tiles
2021-07-29 10:46:17 -07:00
Danila Fedorin
28248722a3
Fix incorrect conditions for showing avatar
2021-07-28 16:17:25 -07:00
Danila Fedorin
e2ad589aa3
Go through and clean up affected files.
2021-07-27 16:51:34 -07:00
Danila Fedorin
fb54ab68a3
Tweak reply style
2021-07-27 15:12:03 -07:00
Danila Fedorin
3d911f2a22
Add escaping to replies
2021-07-26 14:49:06 -07:00
Danila Fedorin
753bb8392b
Add mx-reply to dompurify's list so we can ignore it ourselves.
2021-07-26 12:21:20 -07:00
Danila Fedorin
305fab467e
Send a formatted body from quotes
2021-07-23 16:45:22 -07:00
Danila Fedorin
0db6870edb
Flesh out the fallback formatting a bit.
2021-07-23 16:37:23 -07:00
Danila Fedorin
c0d39a5983
Add very rudimentary fallback reply formatting code
2021-07-23 15:34:04 -07:00
Danila Fedorin
242a9c209b
Handle replies in EventEntry
2021-07-23 14:34:11 -07:00
RMidhunSuresh
34f1ecc0dc
Remove unused import
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-23 18:10:17 +05:30
RMidhunSuresh
281dc8bdb4
Add missing license headers
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-23 18:05:48 +05:30
Danila Fedorin
711732200e
Make the reply box more distinct
2021-07-22 14:44:57 -07:00
Danila Fedorin
b0c5b2f2ce
Use the proper tile view to display reply preview
2021-07-22 14:15:18 -07:00
Danila Fedorin
650389538d
Add some basic styling
2021-07-22 14:07:13 -07:00
Danila Fedorin
83f7391af3
Adjust CSS to match new class structure
2021-07-22 13:39:40 -07:00
Danila Fedorin
1dcfdfc1d8
Split composer into preview and input
2021-07-22 13:37:35 -07:00
Danila Fedorin
013f187dc2
Avoid inserting li tags outside a list
2021-07-22 12:51:24 -07:00
Danila Fedorin
66f686210f
Add a very basic, unstyled view of the message to the composer.
2021-07-22 12:28:24 -07:00
Danila Fedorin
94ae5faa3c
Add a disabled flag to message view.
2021-07-22 11:16:34 -07:00
Danila Fedorin
7adb0e5ddc
Get rid of intermediate view model
2021-07-22 10:56:30 -07:00
RMidhunSuresh
3aeb0c4d98
Indicate if no member found
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-21 18:34:55 +05:30
Danila Fedorin
d33d55376a
Put reply into its own view model.
...
Otherwise, we re-render the reply message on
every keystroke.
2021-07-20 16:51:36 -07:00
Danila Fedorin
f486bc0e04
Reset reply state after successfully sending a reply
2021-07-20 13:01:04 -07:00
Danila Fedorin
46215b3c51
Add the ability to reply
2021-07-20 12:53:31 -07:00
Danila Fedorin
800b4785d1
Accomodate in_reply_to relation shape
2021-07-20 12:17:44 -07:00
Danila Fedorin
fdcafaf6d3
Add _replyTo field to ComposerViewModel that can be set from a message
2021-07-19 16:10:35 -07:00
RMidhunSuresh
05f05bb577
Add method to get member from storage
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-19 19:36:09 +05:30
Danila Fedorin
c9e937c41c
Add redundancy to prevent stored nulls from causing errors.
2021-07-17 13:29:20 -07:00
Danila Fedorin
ad453555b9
Avoid storing null for invite avatars.
2021-07-17 13:23:13 -07:00
Bruno Windels
b036e48b66
too many ..
2021-07-16 23:54:19 +02:00
Bruno Windels
9044f4eebe
also for inline code
2021-07-16 23:32:38 +02:00
Bruno Windels
bc69e1cdae
make font on code snippets slightly smaller
2021-07-16 23:29:41 +02:00
Danila Fedorin
0c0633fdd4
Fix body.string in BaseMessageTile
2021-07-16 14:28:18 -07:00
Danila Fedorin
fb29913ef0
Add lint fixes
2021-07-16 14:21:39 -07:00
Danila Fedorin
c835dc324e
Merge branch 'master' of github.com:vector-im/hydrogen-web into formatted-messages
2021-07-16 14:05:43 -07:00
Danila Fedorin
3e4314e7f3
Update comment based on 'small object' version of code.
2021-07-16 13:53:14 -07:00
Danila Fedorin
c620e9c930
Move away from Object.assign for image rendering.
2021-07-16 13:51:34 -07:00
Danila Fedorin
da48ddec83
Fix == typo
2021-07-16 13:49:33 -07:00
Danila Fedorin
7cfdd4f663
Rename TextTileFormat to BodyFormat
2021-07-16 13:46:25 -07:00
Danila Fedorin
031ce42831
Properly cache message format.
2021-07-16 13:43:40 -07:00
Danila Fedorin
9e1f57a2b1
Switch tiles to using enums and checking format.
2021-07-16 13:36:26 -07:00
Danila Fedorin
1e2945ca54
Add license headers to new files.
2021-07-16 13:12:26 -07:00
Danila Fedorin
996d0cfea8
Remove unneded attribute objects
2021-07-16 13:08:21 -07:00
Danila Fedorin
900ebfe289
Properly pass children to list block
2021-07-16 13:05:47 -07:00
Danila Fedorin
cdf85edad9
Move pill parsing into deserialize and avoid intermediate objects.
2021-07-16 13:01:33 -07:00
Danila Fedorin
eacc033929
Make code blocks accept non-code tags.
2021-07-16 11:38:41 -07:00
Danila Fedorin
2197d68279
Add fix to prevent pre overflow.
2021-07-16 11:00:54 -07:00
Bruno Windels
9aedc1d526
don't put body parts in span
2021-07-16 19:30:02 +02:00
Bruno Windels
629d58b041
limit code block height
2021-07-16 19:16:15 +02:00
Bruno Windels
2ce6cea4ff
not used anymore
2021-07-16 19:16:06 +02:00
Bruno Windels
b5b19abb24
only allow links for the schemas mentioned in the spec
2021-07-16 18:32:40 +02:00
Bruno Windels
fe3bdda05a
all of these should be scoped to messageBody
2021-07-16 17:27:24 +02:00
Bruno Windels
1f82aef4ad
some header styling in messages
2021-07-16 16:53:33 +02:00
Bruno Windels
47c1737371
make <code> styling like element
2021-07-16 16:28:03 +02:00
Bruno Windels
2159b67ba4
make link styling like element, blue an no underline
2021-07-16 16:27:43 +02:00
Bruno Windels
f012c64fc5
fix pill styling a bit, and open in new tab/noopener
2021-07-16 16:27:22 +02:00
RMidhunSuresh
1a721fe7e8
Import from AvatarView.js
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:13:18 +05:30
RMidhunSuresh
7c9755d1a6
Fix width for smaller screens
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
86bb56ab6f
Fix layout of details panel in mobile
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
436e87578e
Initialize prop in constructor
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ec4a783759
Fix disambiguator
...
- Do not disambiguate name on room rejoin
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
66d5f4d1a3
Make code clearer
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
9fdfebf00d
Replace get with iterator and remove lambda
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
f366479c16
Fix move bug
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
0bd1d2b291
Improve code
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
829830c0fa
Fix lazylist
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
0e0976c7f5
Inline method
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
611524cdda
Log instead of throwing error
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ec8b6f9dd2
Inline method
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
c410aed672
Use flex instead of setting height
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
4946683b23
Use ifView instead of mapView
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
694b627309
Inline method
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
1f67aa34d3
Move LoadingView.js
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
da733f9f8a
Move files to members directory
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
0ac3d3727b
Remove TemplateView
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
9a3d7e416a
Remove top padding of room details view
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
4bac98d39a
More css fixes
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
c4c0e0206f
Clear margin on ul
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
fe18b61688
Css fixes
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
5c0c59044f
Move spinner before the text
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
60793798c7
Subscribe to powerLevels
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
960f2c283e
Remove comment
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
e406aa6e45
Add jsdoc for powerlevels
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
5873ab63ba
Release memberlist after panel is closed
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
5a54be2e2e
Style loading view
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
be46d870aa
Center names
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
c7e12c98b5
Make addPanelIfNeeded more generic
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
b126ba1370
Fix lazy list css
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
f98a8847e3
Implement UX
...
- Add chevron to member count in room details
- Make some rows in panel buttons
- Add user chrome to right panel
- Style UI
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
21f47f21aa
Add chevron to button
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
8e55967db3
Create UI to open memberlist from details panel
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
72f79e8bef
Reduce padding
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
8ee9cb10c2
Move css to layout.css
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
fe4f6d2308
Remove listHasChangedSize
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
c073d4c0d0
Unmount child views correctly
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
2502c4024a
Fix broken tests
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
8e39aed4b6
Ensure that power levels are loaded only once
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
14c00f50fc
Make loadPowerLevels private
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
22fab3761a
Remove timeline reader and only use roomState
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
8a976ef24b
Make powerLevels observable
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
d1f465e6cc
Replace slice with iterator
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
c539c38699
Account for padding in itemHeight
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
f506cf615b
div --> li
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ea0851eb94
Keep memberlist panel open on room/grid change
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
d3a8e95962
Find height of container from DOM
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
5338457ea0
Use normalized index in recreateItem
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
85924aba92
Fix update method
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
4cb9adc9ea
Remove misleading comment
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
9a00143623
Improve comment
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
96e2bb0b1a
Add explaining comment
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
f05574f579
Fix updates
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
452eee6767
Incorporate lazyrender code from element
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ee072343f5
Switch to lazy list
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
0b9f4a5e1d
Add LazyListView
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
1d5b16395f
Export function
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
35f6043d06
Support slice
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
db515d48c1
Inline flatten method
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
53fc6a7af9
Check prev name is string
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
11d411c9a9
Add failing test
...
For empty names not un-disambiguating
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
89e256e563
Return array to prevent fetching again
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ea06d4f88e
Eliminate double lookup
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
da1e981948
name changes
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ad6122a5b6
Add explaining comment
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
41806b5e82
Remove duplication
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ab0a48ab31
rename rightpanel to right-panel
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
3bb82e55bf
Disambiguator is not async
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
e935423814
Remove duplication in RightPanelViewModel
2021-07-16 17:08:18 +05:30
RMidhunSuresh
bcfd1bd135
Support loading view for all panels
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
d64d07aee5
Move loading view into separate file
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
3fb89a81bc
Add some initial styling
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
7139711314
Add avatar to tile
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
86c1550850
Switch to collator for perf reasons
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
3d4ba20150
Put up a temporary loading view
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ef40027502
Call disambiguate on update/map
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
bcb46fc54a
Make tile vm support disambiguation
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
b8542c6754
Implement name disambiguation
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
dea0cad252
Fix bug in FilteredMap
...
Caused multiple updates to be triggered.
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
404129f60e
Settle on MappedMap
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
f41c835e91
Support updater in MappedMap
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
0819dcb29e
Use MappedList instead of MappedMap
...
- MappedList supports an optional updater method
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
b62473ae79
Add update method
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
4fcaac3865
Add binding in view
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
11eb9c7783
Use set instead of add in memberlist
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
2e8c4563aa
Implement set method to support update from value
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
a1e3ff3ed8
Use name instead of displayName
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
a9ff6ab026
Sort memberlist using powerlevel
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
3e23392a0e
Consider powerlevels in comparator and add tests
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
cb5e598e95
Getter for powerlevel from room
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
f7a6fbd901
Make getUserLevel() public
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ddb7a16fb8
Make member private
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
7e72d57be7
Make list scrollable
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
abd2c19bf2
Remove unused param
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
a765d7fc7d
Create memberlist view from rightpanel
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
f3c7ab337d
Remove code from session view/vm
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
46a6cf6adf
Add memberlist to navigation
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
1418645e15
Modify CSS to reflect changes
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
dfe7385611
Accommodate "rightpanel" navigation segment
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
8b01ca502e
Create RightPanel from SessionViewModel
...
- Also remove old methods used in RoomDetails
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
7500bbeaad
Modify navigation to work with rightpanel segment
...
- Ensure that rightpanel does not show in the URL.
- Create an action of details to insert the rightpanel segment.
- Make sure rightpanel can be a child of room.
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
b74e4452dd
Move rightpanel to separate view and vm
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
7e6e4ecfab
Duplicate navigation from room details
...
- TODO: Remove duplication
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
69237fce85
Basic barebones of memberlist view
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
Danila Fedorin
c619eba8cf
Add some styling to the tables.
2021-07-15 13:19:54 -07:00
Danila Fedorin
d69b78469c
Add table viewing code.
2021-07-15 13:19:54 -07:00
Danila Fedorin
f6f29adacc
Add a comment about avatar.js
2021-07-15 13:16:42 -07:00
Danila Fedorin
c13daedcb0
Ignore non-absolute links.
2021-07-15 13:15:56 -07:00
Bruno Windels
fb3c090de2
confirm the leave room
2021-07-15 14:30:16 +02:00
Danila Fedorin
ba7e86ac8d
Add blocquote style.
2021-07-14 18:11:09 -07:00
Danila Fedorin
025ab16668
Fix /me body rendering.
2021-07-14 18:10:59 -07:00
Danila Fedorin
038b101ed7
Render matrix.to user links as pills
2021-07-14 17:57:53 -07:00
Danila Fedorin
78d7d556e4
Add blockquote and del elements.
2021-07-14 12:38:55 -07:00
Danila Fedorin
763e1cd5de
Add tentative version of linkification.
2021-07-13 16:56:46 -07:00
Danila Fedorin
0c05ff459c
Add another test.
2021-07-13 15:14:03 -07:00
Danila Fedorin
5e39eb8f6c
Do some additional validation, blocking block nodes inside inline nodes.
2021-07-13 14:47:10 -07:00
Danila Fedorin
4b92903ddd
Add a test for auto-closing tags.
2021-07-12 15:16:04 -07:00
Danila Fedorin
4022c6121b
Switch to DOMPurify in platform layer for sanitization.
2021-07-12 15:00:16 -07:00
Danila Fedorin
012ef2b215
Validate w/h and avoid use of properties object.
2021-07-12 13:42:39 -07:00
Danila Fedorin
1e9cdbafd4
Move test-specific code into the testing function.
2021-07-12 13:31:33 -07:00
Danila Fedorin
fd17ffecfb
Pass parameters to parseHTMLBody directly instead of via object.
2021-07-12 12:55:33 -07:00
Danila Fedorin
c261b9fb23
Avoid intermediate objects while parsing TextTiles' bodies.
2021-07-12 12:47:22 -07:00
Danila Fedorin
9304ca330e
Rewrite deserialize as a class to avoid passing options
around.
2021-07-12 12:19:51 -07:00
Danila Fedorin
abd62373e5
Remove copy of MediaRepository mxcUrl parsing.
2021-07-09 13:09:19 -07:00
Danila Fedorin
1435c2c9a2
Add HTML sanitization to domain layer.
2021-07-09 13:06:24 -07:00
Danila Fedorin
695bdec9fe
Match the thumbnail width and height in in-message images.
2021-07-08 14:41:05 -07:00
Danila Fedorin
b3dabc2054
Limit image size
2021-07-08 00:20:35 -07:00
Danila Fedorin
d38c52d311
Display images in messages
2021-07-08 00:16:58 -07:00
Danila Fedorin
c582b723bd
Start working on images.
2021-07-07 23:40:16 -07:00
Danila Fedorin
1a14719483
Wrap DOM iterables in array.
2021-07-07 14:12:24 -07:00
Danila Fedorin
92e82a76c7
Add basic styling to code block
2021-07-07 13:05:24 -07:00
Danila Fedorin
e02163b0ff
Properly display ul in message bodies.
2021-07-07 13:05:10 -07:00
Danila Fedorin
eca5308742
Move deserialization into domain and fix tests.
2021-07-07 12:21:10 -07:00
Danila Fedorin
41d82c4cdd
Add some deserialization tests.
2021-07-06 19:11:05 -07:00
Danila Fedorin
49df21e465
Display lists.
2021-07-06 16:48:31 -07:00
Danila Fedorin
1da35be148
Better handle list start attribute.
2021-07-06 16:14:35 -07:00
Danila Fedorin
e56b15237e
Parse formatted message bodies in addition to plain ones.
2021-07-06 16:14:04 -07:00
Bruno Windels
f515407491
Merge pull request #404 from MidhunSureshR/fix-402
...
Handle avatar image error
2021-07-05 07:48:48 +00:00
Danila Fedorin
cfa686867c
Make parse
a function that returns a MessageBody
2021-07-02 18:20:07 -07:00
Danila Fedorin
6ba2deffef
Make small tweaks to formatted representation.
2021-07-02 18:19:40 -07:00
Danila Fedorin
005580f385
Move HTML parsing into platform.
2021-07-02 15:05:50 -07:00
Danila Fedorin
8f44cc21db
Correct two uses of ==
.
2021-07-02 00:41:28 -07:00
Danila Fedorin
824e66a62f
Add some comments.
2021-07-02 00:23:59 -07:00
Danila Fedorin
94f6c99ea6
Begin a parser implementation from HTML into an internal representation.
2021-07-02 00:18:37 -07:00
Danila Fedorin
db202b23ae
Add some prototype rendering implementations.
2021-07-01 13:55:01 -07:00
Danila Fedorin
cc506756a1
Add code tag to HTML
2021-07-01 13:55:01 -07:00
Danila Fedorin
4ee15005f5
Inline code blocks don't contain other elements
2021-07-01 13:55:01 -07:00
Danila Fedorin
fd12baae3b
Add some other message parts as demo.
2021-07-01 13:55:01 -07:00
Danila Fedorin
ad868818c7
Add some initial thoughts on the implementation.
2021-07-01 13:55:01 -07:00
RMidhunSuresh
191613adbe
Make changes
...
- use textContent where possible
- make sure we have an image before adding title
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 19:21:54 +05:30
RMidhunSuresh
b8c01272f4
remove listener on dispose
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 15:42:07 +05:30
RMidhunSuresh
93e77a3fcd
Only add attribute if we have avatar
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 15:41:40 +05:30
RMidhunSuresh
03a913629f
Pass color as data attribute
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 15:25:28 +05:30
Danila Fedorin
f7d6569154
Add a small comment to Invite.avatarColorId, too.
2021-06-30 15:21:11 -07:00
Danila Fedorin
b40f946b85
Add JSDoc to new Hero method
2021-06-30 15:15:08 -07:00
Danila Fedorin
ee1f1500e9
Roll back to using heroes for computing DM color
2021-06-30 15:07:40 -07:00
RMidhunSuresh
9ed6cd57f3
use textContent
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 00:01:38 +05:30
RMidhunSuresh
168b1d6247
Move AvatarView to separate file
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-30 23:51:14 +05:30
RMidhunSuresh
b469c4299f
implement new approach
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-30 23:30:44 +05:30
RMidhunSuresh
bcaf84e545
Revert commits
...
This reverts commit 5f1346568d
.
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-30 23:28:13 +05:30
Danila Fedorin
d0f70cbdf9
Move avatar color ID computation into SummaryData
2021-06-29 18:01:08 -07:00
Danila Fedorin
dec0683145
Correctly color archived and invited rooms
2021-06-29 16:50:42 -07:00
RMidhunSuresh
b42f7e1a36
remove both handlers
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-29 19:50:37 +05:30
RMidhunSuresh
8b6ff533e8
Add and remove opposing event listeners
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-29 15:51:11 +05:30
Danila Fedorin
6527a0c677
Make the room color match up on the left panel, too.
2021-06-28 11:54:49 -07:00
Danila Fedorin
97854423c4
Ensure DM rooms have the same color in timeline and left panel.
2021-06-28 11:44:27 -07:00
RMidhunSuresh
5f1346568d
Handle avatar error
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-28 23:18:07 +05:30
Bruno Windels
09aba78803
Merge branch 'master' into room-info
2021-06-24 15:06:37 +00:00
Bruno Windels
dbaef5117a
Merge pull request #384 from vector-im/bwindels/reactions
...
Reactions
2021-06-24 15:01:44 +00:00
Bruno Windels
eee1be1ceb
safari doesn't like empty string key paths 🙄
2021-06-24 16:16:15 +02:00
Bruno Windels
bb6417dab9
fix lint
2021-06-24 15:24:53 +02:00
Bruno Windels
5984e8dd6d
don't show reactions for redacted messages
2021-06-24 14:49:43 +02:00
Bruno Windels
787308375c
prevent toggling in vm while already busy
...
otherwise the check in SendQueue to prevent duplicates might fail
2021-06-24 14:33:16 +02:00
Bruno Windels
575f3fa966
fix tests
2021-06-24 14:28:10 +02:00
Bruno Windels
299294daff
prevent re(d)action in left/kicked room
2021-06-24 14:24:22 +02:00
Bruno Windels
3fa0f234bb
not used
2021-06-24 14:12:55 +02:00
Bruno Windels
20ae21ead5
add some more emoji fonts that might be install by default
2021-06-24 14:12:41 +02:00
Bruno Windels
366d3761b8
remove waiting for update event (it might not come in case of dupe)
...
also remove duplicate logging impl for re(d)action at cost of
double haveAnnotation call
2021-06-24 13:35:59 +02:00
Bruno Windels
b148368d5b
test different keys do work still
2021-06-24 13:29:13 +02:00
Bruno Windels
7557e2f437
not used
2021-06-24 13:26:14 +02:00
Bruno Windels
668c0aff36
drop duplicate reactions in send queue, as last measure of defence
2021-06-24 13:25:58 +02:00
Bruno Windels
38b465cb9d
rename vm.toggleReaction to vm.toggle
2021-06-24 13:15:20 +02:00
Bruno Windels
c46c330efb
prevent duplicate redactions from distorting reaction local echo
2021-06-24 13:14:54 +02:00
Bruno Windels
061f44f475
extract methods here
2021-06-24 12:56:23 +02:00
Bruno Windels
a4a7c23148
use pending re(d)action timestamp to have stable reaction sorting order
...
also move more logic into the matrix layer, from Reaction(s)ViewModel
to PendingAnnotation
2021-06-24 12:26:38 +02:00
RMidhunSuresh
eb35f46214
Make sure room does exist before creating vm
...
- This will stop the code from throwing when opening /details on
UnknownRoomView.
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-24 14:58:02 +05:30
RMidhunSuresh
a273b25bac
Remove css assumption
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-24 14:52:48 +05:30
RMidhunSuresh
e2fd90bdc2
Remove Segment import
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-24 13:48:53 +05:30
Bruno Windels
52957beb82
don't encrypt reactions
2021-06-23 17:49:27 +02:00
Bruno Windels
3c7ccc90b2
fix css for reaction view and do some renaming
...
also add some user-select:none
2021-06-23 17:48:21 +02:00
Bruno Windels
c585d76ce5
also clear pending reaction promise when an error is thrown
2021-06-23 17:47:47 +02:00
Bruno Windels
1a5a64864a
don't double log redactReaction
2021-06-23 17:47:18 +02:00
Bruno Windels
e125599a47
prevent decryption result getting lost after reaction updates entry
2021-06-23 17:38:52 +02:00
Bruno Windels
48588687a5
share logic whether have reacted already between basemsgtile & reactvm
2021-06-23 15:38:12 +02:00
Bruno Windels
a1d24894eb
this will block if we have a pending redaction & reaction
...
so the reaction won't be aborted
2021-06-23 11:45:24 +02:00
Bruno Windels
442d4cce03
make the react/redactReaction promise only return after update happened
2021-06-23 11:44:53 +02:00
Bruno Windels
18562d30d8
integration tests for local echo of toggling reactions
2021-06-23 11:43:14 +02:00
Bruno Windels
4d19f8d21d
this should return any promise returned, otherwise breaks tests
2021-06-23 11:42:32 +02:00
Bruno Windels
8991632105
add redaction mock utility fn
2021-06-23 11:42:16 +02:00
Bruno Windels
b153613200
determine toggle state correctly with both pending redaction & reaction
2021-06-23 11:41:28 +02:00
Bruno Windels
616d701ebb
add test that redaction for non-sending event aborts it
2021-06-21 19:02:42 +02:00
Bruno Windels
0e750db9ae
write unit tests for (re)aggregating annotations in RelationWriter
2021-06-21 18:16:21 +02:00
Bruno Windels
d1345d0f83
write test for redaction in RelationWriter
2021-06-21 17:52:02 +02:00
Bruno Windels
81f06f565e
write tests for AsyncMappedList
2021-06-21 17:26:08 +02:00
RMidhunSuresh
12305be06a
Fix issue #397
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-19 16:01:02 +05:30
Bruno Windels
1fc1d2c79b
fix lint
2021-06-18 15:09:34 +02:00
Bruno Windels
11fba12083
add tests for remote reaction target being added after pending event
2021-06-18 15:09:14 +02:00
Bruno Windels
0703cf8915
cleanup
2021-06-18 15:06:49 +02:00
Bruno Windels
5bea8130f2
more timeline annotation tests
2021-06-18 14:39:54 +02:00
Bruno Windels
9f99cf4b1e
fix lint in tests
2021-06-18 11:52:09 +02:00
Bruno Windels
8092713faa
add tests for local echo of adding and removing reaction
2021-06-18 11:51:02 +02:00
Bruno Windels
f000e98619
no point in reacting to redacted messages
2021-06-17 16:48:58 +02:00
Bruno Windels
64f1abdfed
show quick reactions in message menu
2021-06-17 16:46:06 +02:00
Bruno Windels
4312610e7d
support menu options with custom DOM
2021-06-17 16:45:53 +02:00
Bruno Windels
70d64f38eb
spelling
2021-06-17 16:07:32 +02:00
Bruno Windels
cad884aa41
fix local redaction echo while already sending target
2021-06-17 16:07:09 +02:00
Bruno Windels
a77ef02677
cleanup
2021-06-17 10:12:45 +02:00
Bruno Windels
cbee498d41
a bit more brief
2021-06-17 10:03:32 +02:00
Bruno Windels
bf84b59e39
more accurate test name and also test >=
2021-06-17 09:59:24 +02:00
Bruno Windels
099f99a96b
check power levels to see if we can react
2021-06-17 09:41:25 +02:00
Bruno Windels
fd54539e1c
clarify comment
2021-06-17 09:41:10 +02:00
Bruno Windels
150f58a6b3
don't aggregate relations on redacted events
2021-06-16 18:00:50 +02:00
Bruno Windels
ce5409dc26
aggregate relations when seeing event target during back-pagination
2021-06-16 17:40:29 +02:00
Bruno Windels
9099a76f45
fix spelling in comment
2021-06-16 17:30:48 +02:00
Bruno Windels
bbcf0d2572
more local echo fixes for redacting a reaction + cleanup
2021-06-16 12:46:44 +02:00
Bruno Windels
94635a18e0
actually, 0 or -1 mean you have a local redaction
2021-06-16 12:41:42 +02:00
Bruno Windels
4f10174e48
clarify comment
2021-06-16 10:28:17 +02:00
Bruno Windels
3b629622d9
need to keep pending count around if 0 or less for redaction local echo
...
also need to be able to tell the difference between no pending reactions
and redactions and the sum being 0 (having both a redaction and
reaction) so we keep isPending to true
2021-06-16 10:23:22 +02:00
Bruno Windels
e5c1094153
WIP
2021-06-15 19:06:41 +02:00
RMidhunSuresh
e161f61319
Remove selector list
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-15 15:11:32 +05:30
RMidhunSuresh
5e4db2f5dc
Change font size
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-15 14:52:07 +05:30
RMidhunSuresh
1772fc04f9
Remove text(..)
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-15 14:45:46 +05:30
RMidhunSuresh
4f05d9a5b7
Make navigation changes in one go
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-15 14:34:26 +05:30
RMidhunSuresh
97e484b8e6
Rename toggle --> open
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-15 14:30:27 +05:30
RMidhunSuresh
88a1e34987
Unsubscribe on dispose
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-14 21:04:44 +05:30
RMidhunSuresh
7b811aa927
Remove space after brace in two places
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-14 20:33:32 +05:30
RMidhunSuresh
e10b455b27
Rename method
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-14 20:32:05 +05:30
Bruno Windels
75ee509361
fix lint
2021-06-11 11:30:11 +02:00
Bruno Windels
6bdbbee83e
undo forced offline mode
2021-06-11 11:05:34 +02:00
Bruno Windels
81a721f880
make equality stable in comparator for reaction
2021-06-11 11:04:48 +02:00
Bruno Windels
1d9709d4e3
also compare by key if the timestamps are the same
2021-06-11 11:02:31 +02:00
Bruno Windels
757e08c62c
WIP 4
2021-06-10 18:29:10 +02:00
Bruno Windels
cb051ad161
WIP3
2021-06-09 16:52:30 +02:00
RMidhunSuresh
e2443a8b09
Undo spillover from earlier formatting havoc
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
b2f2d51594
Make formatting consistent with the codebase
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
dd9a19b7f0
Make formatting consistent
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
4005d70bb9
Increase height to make element more centered
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
fa67c5e248
Refactor function
...
- Move related parameters closer together.
- Remove unused parameter.
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
95512b5144
Remove margin from top
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
6086d157e2
Make value multiple of 4
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
2c0176f3f2
Remove unwanted width
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
f3f1436bb0
Rename room info to room details everywhere
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
f917730a21
Stick to naming convention for css/html classes
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
efd37d811f
Update on changes to vm
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
008f3601ca
Remove link support from Menu
...
- Not needed anymore since every link item has been rewritten as a
button.
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
332fbdda84
Move variable to scope of conditional
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
7fbcf89539
Remove unncessary empty line
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
eb870cfc23
Use url instead of link
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
fcc2afba08
Do not compute link in getter
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
04065847dc
Remove unused getter
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
c6f3b1fbbe
Do not use private props from room summary
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
4700009c68
Add new test for parseUrlPath
...
Make sure that the details panel stays open during room change.
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
4c962943b2
Modify setters in MenuOption to support chaining
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
0d63ce9a3a
Change SideBarActive --> right-shown
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
5b74038912
Check value of details everywhere
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
b2448e1207
Calculate path when button is clicked
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
37e052c061
details do not need to be child of rooms
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
a4bcb21a85
Move details handling to separate function
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
7f922afe79
Reduce duplication in code
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
04933acbfb
Add missing checks
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
a3587a80c6
Use internationalization for user facing strings
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
986f04aac0
Move Room details menu entry to top
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
9074caf443
Change Room Details --> Room details
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
65bd74442f
Make menu-items uniform
...
- Same font ,font-size and height.
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
98ef6f4321
Use optionWithButton
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
a3271fb916
Fix Menu: Use t instead of tag to get events
...
- Also move constructor up
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
8d254c91e3
Undo formatting/stylistic changes
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
3273682155
Do not show room id instead of canonical alias
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
d3d65d89ba
Put sidebar rows into container
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
f1fe17fe65
Make font-size equal to that of room-header
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
040c744b6a
Style links and buttons similarly in menu
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
00dbd3db06
Add menu entry to launch RoomInfoView
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
1e96b58f85
Add link support to menu
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
426d0779ee
Keep RoomInfoView open across room/grid changes
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
02d79b52a4
Prefer canonical alias over room_id if available
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
2dcec6343d
Info icon should open/close view alternatively
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
d782c9e0bb
Justify content to flex-end instead
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
eab6ca3baf
Make side-bar responsive
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
9ac415fa4f
Show panel when first visit contains /details
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
b5480b018b
Style open button
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
4edc58ebcf
Add button in Room header to open details
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
ecd5505af9
Bring in info icon
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
37367cde65
Make close button close the view
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
20a250dfc0
Style close button
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
c65e26ec4c
Position the close button to right end
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
91f083a245
Add close button to RoomInfoView
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
b0535b5d7d
Add styling for RoomInfoView
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
c96abc8892
Add css to place items appropriately
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
f42553f8cb
Add avatar size for design
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
ee29d7f799
Bring in icon assets
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
653fcbbb1f
Add method to create avatar section
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
0a4f8aff79
Create method to add sidebar element
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
a23e2c361a
Better styling
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
d502a7f911
Make display name bold
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
aece82dff6
Make room avatar larger in RoomInfoView
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
6f1b77b6fa
Add room avatar to RoomInfoView
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
0ea2843454
Add background for sidebar
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
191eb09a76
Fallback to canonical alias if no names found
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
0d11f85ab3
Add CSS to display sidebar to the right
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
9a605cc6c6
Remove unnecessary check
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
c3333f5fe8
Extract method
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
ddaa9b46c0
Dispose vm preemptively
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
7e38c3ea88
Remove right panel on grid update if needed
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
98d8d44695
Allow details to be child of rooms
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
439910f6ca
Handle case when path.get() may be null
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
96959a3c4c
Put name of property in emitChange
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
e39572b98b
Create RoomInformationView on toggle
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
986271d02a
Add code to toggle RoomInformation panel
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
c7fd0fac07
Allow details to be child of room
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
c7ba472042
Add view and vm for RoomInformation
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
Bruno Windels
206d18f498
WIP2
2021-06-08 16:56:17 +02:00
Bruno Windels
2ebadb36c3
WIP
2021-06-08 13:20:55 +02:00
Bruno Windels
280de98858
fix lint
2021-06-04 16:41:37 +02:00
Bruno Windels
3e47877645
Merge branch 'master' into bwindels/reactions
2021-06-04 16:33:10 +02:00
Bruno Windels
47e74bd598
add glow animation for pending reactions
2021-06-04 16:32:35 +02:00
Bruno Windels
33655ee37e
forgot to export class
2021-06-04 16:32:03 +02:00
Bruno Windels
7691b28503
prevent another race between sync and openTimeline
2021-06-04 16:28:08 +02:00
Bruno Windels
bb6905bdcd
don't assume localEntries exists, as load races with sync.afterSync
2021-06-04 16:05:28 +02:00
Bruno Windels
919542f8fc
Don't assume container node exists when loading bundle
...
Only look for the container node when needed
2021-06-04 15:36:01 +02:00
Bruno Windels
b7402ce43c
support local echo for adding a reaction
2021-06-04 15:34:44 +02:00
Bruno Windels
8bf160dfc0
handle sending relations to events that haven't been sent yet
2021-06-04 10:48:59 +02:00
Bruno Windels
2878208e94
keep the DOM small, avoid a node for reactions on every message
2021-06-04 10:08:07 +02:00
Bruno Windels
4ef5afc011
this is actually not used, so remove it
2021-06-04 10:07:52 +02:00
Bruno Windels
dde26da5a6
add mountView utility to handle error handling on mount
...
and use it where errorToDOM is used currently for catching mount errors
2021-06-04 10:07:12 +02:00
Bruno Windels
ff370d03db
catch errors thrown by childview mount method on add in ListView
2021-06-04 09:37:36 +02:00
Bruno Windels
05cc1f6757
make reactions look like element
2021-06-03 21:01:59 +02:00
Bruno Windels
d91282a767
render reactions in div instead of ul
2021-06-03 21:01:47 +02:00
Bruno Windels
3e2b7ba5fa
obsolete, already provided in parent class
2021-06-03 21:01:26 +02:00
Bruno Windels
1385a22e60
don't recreate the reactions after clearing it with the last one removed
2021-06-03 21:00:57 +02:00
Bruno Windels
cc444fa207
we actually don't need any of the view model infrastructure
...
all the updates go over the observable list
2021-06-03 21:00:25 +02:00
Bruno Windels
8d4d9c6e8d
WIP
2021-06-03 19:57:48 +02:00
Bruno Windels
2eb2e4e9b3
more stable sorting order for reactions
2021-06-03 19:57:29 +02:00
Bruno Windels
bb8acbefa3
support undoing a reaction
2021-06-03 19:57:16 +02:00
Bruno Windels
20abb01ee8
very basic way of sending a reaction
2021-06-03 19:16:53 +02:00
Bruno Windels
b722691e85
show reactions as ListView of buttons if present
2021-06-03 19:16:19 +02:00
Bruno Windels
2152d5e833
expose reactions on base message tile as vm with observable list
2021-06-03 19:15:49 +02:00
Bruno Windels
b94ab42c90
delete annotations object when no more annotations left
2021-06-03 19:10:29 +02:00
Bruno Windels
b05345ee27
only show redacted messages
2021-06-03 16:50:37 +02:00
Bruno Windels
a78e9af8fc
Support (de)aggregating annotation relations in relation writer
...
When deaggregating on redacting an annotation relation, we remove the
relation and aggregate the other relations for that key again, so we can
reliably detect the first timestamp (and count and me as well to lesser
extent).
as a consequence, more than one event can get updated when redacting a
relation (the relation is updated, as well as the relation target), so
account for that by returning an array of entries that have updated.
2021-06-03 16:50:37 +02:00
Bruno Windels
41fb30c68b
add relations store
2021-06-03 16:50:37 +02:00
Bruno Windels
36a35d92f0
pass ownUserId to RelationWriter
...
We'll need to to aggregate whether we have reacted to a message
Create writers at room level and pass subwriter is dependency, rather
than creating them in sync and gap writer.
2021-06-03 16:50:37 +02:00
Bruno Windels
46bfab3eb7
fix some lint and comment
2021-06-03 16:50:11 +02:00
Bruno Windels
b83613924c
don't assume there is at least 1 tile before loading at top
...
it can happen that all tiles are not renderable, and we should just
keep calling loadAtTop
2021-06-03 09:25:56 +02:00
Bruno Windels
d965d57be7
don't leak timeline when an error is thrown while opening it
...
or you are just stuck with "not dealing with race" errors until refresh
2021-06-02 18:44:03 +02:00
Bruno Windels
0c4c018ceb
add note that powerlevels won't update when the state event is changed
2021-06-02 18:43:47 +02:00
Bruno Windels
d2f5b412ac
don't try to hook up local relations for events that are not relations
...
and do unnecessary work
2021-06-02 18:43:16 +02:00
Bruno Windels
365bd5cad0
fix the race
2021-06-02 18:42:46 +02:00
Bruno Windels
84ecaa2ee1
don't trip over missing create events when loading power levels
...
as the test from previous commit fails because of that, and powerlevels
works fine without
2021-06-02 18:41:52 +02:00
Bruno Windels
4a8a6168cd
add failing test for race between sync & subscribing after openTimeline
2021-06-02 18:41:03 +02:00
Bruno Windels
d8acf63e1d
change mock event api a bit to be easier to read
2021-06-02 18:38:16 +02:00
Bruno Windels
09bf0f3b4e
fix status styling for text messages being broken
...
as binding was put at argument level rather than className level
2021-06-02 15:25:20 +02:00
Bruno Windels
31075d601f
load power levels before decryption closes the txn
2021-06-02 15:06:30 +02:00
Bruno Windels
cef94fea45
fix lint
2021-06-02 12:38:41 +02:00
Bruno Windels
bf951bd322
fix logging wrong value
2021-06-02 12:34:14 +02:00
Bruno Windels
c3754fdbd4
fix the race, make test succeed
2021-06-02 12:34:02 +02:00
Bruno Windels
87ebdbb0b4
add failing test for unhandled race between sync and send
...
see comments in code
2021-06-02 12:33:15 +02:00
Bruno Windels
8369dcef5f
utility to wait until a value becomes truthy in a test
2021-06-02 12:32:50 +02:00
Bruno Windels
ffb6cb372a
utility to create events in tests
2021-06-02 12:32:34 +02:00
Bruno Windels
cf6e14ed8b
utility for homeserver api mocking
2021-06-02 12:32:19 +02:00
Bruno Windels
6a5679a338
create mock storage using fake-indexeddb
2021-06-02 12:32:03 +02:00
Bruno Windels
edbac25613
prepare storage to work with alternative idb impl
2021-06-02 12:31:13 +02:00
Bruno Windels
8dfed73524
Merge pull request #361 from vector-im/bwindels/redactions
...
Redactions
2021-06-02 10:22:33 +00:00
Bruno Windels
7a96f84cab
also show redaction reason for redaction local echo
2021-06-02 12:17:09 +02:00
Bruno Windels
15f6ab8b7e
only show cancel option if not already sending
2021-06-02 11:56:15 +02:00
Bruno Windels
addddf1f26
remove need for transferLocalEchoState, just add local relations again
2021-05-31 16:33:05 +02:00
Bruno Windels
13a4a0169c
remove obsolete comments
2021-05-31 16:23:59 +02:00
Bruno Windels
25ce06c9d5
clarify
2021-05-31 15:55:31 +02:00
Bruno Windels
dc2e21495b
explain why this is needed
2021-05-31 15:46:57 +02:00
Bruno Windels
8196a02f9d
don't even need isOwn member anymore
2021-05-31 15:25:01 +02:00
Bruno Windels
00231443d3
timeline has the own member, so can just use timeline, not ownUserId
2021-05-31 15:18:44 +02:00
Bruno Windels
2bd7c23076
fix lint
2021-05-31 15:08:49 +02:00
Bruno Windels
d68d14358f
use lower return
2021-05-31 14:08:45 +02:00
Bruno Windels
492a8fe359
remove extra whiteline
2021-05-31 14:05:37 +02:00
Bruno Windels
5d35caf85f
no need to emit, timeline finds out by themselves with remote echo
2021-05-31 14:03:22 +02:00
Bruno Windels
606d40c9d4
simplify canRedact logic in view by overriding in RedactedTile
2021-05-31 13:55:08 +02:00
Bruno Windels
23459aad52
check if you are allowed to redact a message
2021-05-31 13:52:03 +02:00
Bruno Windels
128f9812a6
set destructive flag here too
2021-05-31 13:08:06 +02:00
Bruno Windels
57288f75b0
add avatar & sender as first element in message so they don't occlude
2021-05-31 13:03:41 +02:00
Bruno Windels
d4373eb309
make options button look the same in all browsers
2021-05-31 13:03:23 +02:00
Bruno Windels
d66cdc97cd
fix message options button placement in IE11
2021-05-31 13:02:42 +02:00
Bruno Windels
2e34668b91
show errors while mounting list view children
2021-05-31 12:28:42 +02:00
Bruno Windels
762ed96a3b
Not needed as both evententry and pendingevententry return timestamp
2021-05-31 11:58:01 +02:00
Bruno Windels
447b98ce6c
don't use subviews for showing/hiding avatar & sender on continuation
2021-05-31 11:57:17 +02:00
Bruno Windels
0596ca06b1
emit remove before linking up sibling tiles
...
otherwise emitting the update from updatePreviousSibling has
the wrong idx
2021-05-31 11:56:41 +02:00
Bruno Windels
63b371b6ef
support findAndUpdate with same predicate semantics in SortedArray too
2021-05-31 10:47:32 +02:00
Bruno Windels
fa37e8fedb
findAndUpdate uses predicate, just add callback to update method
2021-05-31 10:46:16 +02:00
RMidhunSuresh
849a02cec2
Add aria-label
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-05-28 20:37:36 +05:30
Bruno Windels
6a5d856093
add destructive flag to delete menu option
2021-05-28 16:25:23 +02:00
Bruno Windels
5b0675b711
fix lint
2021-05-28 16:25:06 +02:00
Bruno Windels
95a680eb83
fix whitespace
2021-05-28 16:24:47 +02:00
Bruno Windels
57d9916746
buttons in ff were not in Inter
2021-05-28 15:30:03 +02:00
Bruno Windels
7f41993648
prevent buttons with negative margin to displace message menu
2021-05-28 15:28:04 +02:00
Bruno Windels
b3749f2d92
prevent long links from creating horizontal scroll
2021-05-28 15:27:44 +02:00
Bruno Windels
5afcfc3e9b
fix unsent/unverified message style
2021-05-28 15:27:25 +02:00
Bruno Windels
43c082475b
unify cancel option for various tiles in menu option
2021-05-28 15:27:02 +02:00
Bruno Windels
2b0fa22c8a
open menu when clicking ... button on message with delete/cancel option
2021-05-28 13:14:55 +02:00
Bruno Windels
63e948fc80
change renderMessage fn to base class
...
as preparation to create menu items in subclasses
2021-05-28 12:32:19 +02:00
Bruno Windels
100e056d55
style the button
2021-05-28 12:22:47 +02:00
Bruno Windels
f82e873da8
adjust message status styling to css grid changes
2021-05-28 12:17:59 +02:00
RMidhunSuresh
fc898f8c7e
Set new svg icon as background-image of button
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-05-28 15:47:50 +05:30
RMidhunSuresh
ba11cdd83f
Remove ellipsis character
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-05-28 15:47:06 +05:30
RMidhunSuresh
3f99b7247c
Bring in vertical ellipsis icon
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-05-28 15:46:10 +05:30
Bruno Windels
bbf9832d6a
switch timeline messages to css grid, and add menu button
2021-05-28 12:09:21 +02:00
Bruno Windels
13ac41b264
delete obsolete code
2021-05-28 12:02:35 +02:00
Bruno Windels
2da7ef4280
can only look in remote entries here as PEEs never return an event id
2021-05-27 10:28:02 +02:00
Bruno Windels
5e9ce365bf
also apply local relations when loading at top
2021-05-27 10:27:44 +02:00
Bruno Windels
c6e2607f1f
guard against updates emitted while populating during first subscription
...
This came up now because Timeline uses a MappedList to map PendingEvents
to PendingEventEntries. In the map function, we setup links between
entries to support local echo for relations. When opening a timeline
that has unsent relations, the initial populating of the MappedList
will try to emit an update for the target entry in remoteEntries.
This all happens while the ListView of the timeline is calling subscribe
and all collections in the chain are populating themselves based on
their sources.
This usually entails calling subscribe on the source,
and now you are subscribed, iterate over the source (as you're not
allowed to query an unsubscribed observable collection, as it might not
be populated yet, and even if it did, it wouldn't be guaranteed to be
up to date as events aren't flowing yet).
So in this concrete example, TilesCollection hadn't populated its tiles
yet and when the update to the target of the unsent relation reached
TilesCollection, the tiles array was still null and it crashed.
I thought what would be the best way to fix this and have a solid model
for observable collections to ensure they are always compatible with
each other. I considered splitting up the subscription process in two
steps where you'd first populate the source and then explicitly start
events flowing.
I didn't go with this way because it's really only updates that
make sense to be emitted during setup.
A missed update wouldn't usually bring the collections out of sync
like a missed add or remove would. It would just mean the UI isn't
updated (or any subsequent filtered collections are not updated),
but this should be fine to ignore during setup, as you can rely
on the subscribing collections down the chain picking up the update
while populating. If we ever want to support add or remove events
during setup, we would have to explicitly support them, but for now
they are correct to throw.
So for now, just ignore update events that happen during setup
where needed.
2021-05-27 10:02:05 +02:00
Bruno Windels
a8e43d4850
remove leftover logging
2021-05-27 09:18:22 +02:00
Bruno Windels
a93b1af047
ensure these don't fail on a gap entry
2021-05-27 09:16:25 +02:00
Bruno Windels
afc3db2f33
unrelated todo note for later
2021-05-27 09:11:57 +02:00
Bruno Windels
2b5dcff836
consistent naming
2021-05-27 09:11:13 +02:00
Bruno Windels
56495c9d13
fix gap failing to fill 2nd time + unit regression test
2021-05-27 09:10:10 +02:00
Bruno Windels
15048bd9c3
very basic redact button on all text messages
2021-05-26 13:11:20 +02:00
Bruno Windels
da02b5fe2d
transfer local echo state when replacing event entry
...
e.g. after decryption or remote echo of other relation comes in
2021-05-26 13:10:19 +02:00
Bruno Windels
ca4d09e923
add logging and return promise from Tile.redact
2021-05-26 13:08:54 +02:00
Bruno Windels
a5d5c55835
MappedList.findAndUpdate
2021-05-26 13:08:33 +02:00
Bruno Windels
ce7147e463
put redactions in their own view, and allow aborting while still queued
2021-05-26 13:07:56 +02:00
Bruno Windels
cb622be653
rerender tile when becoming or stopped being redacted
2021-05-25 12:58:20 +02:00
Bruno Windels
af45810582
add support for redactions (and relations) local echo
2021-05-21 16:59:29 +02:00
Bruno Windels
b55efb7f11
ensure updateEntries is always set in the result of GapWriter
2021-05-21 16:58:04 +02:00
Bruno Windels
c934049523
also resolve related event ids when removing remote echo during sync
...
as /sync races with /send, and remote echo may happen first.
It's important for local echo that the pending redaction/relation
will also get attached to the remote echo before /send returns,
otherwise the remote echo would be "unannotated" until /send returns
2021-05-21 10:52:46 +02:00
Bruno Windels
c3fb35848b
emit update when receiving event id for related event ahead in the queue
2021-05-20 15:02:45 +02:00
Bruno Windels
619cf9bcbb
this should be filter rather than find, we iterate it
2021-05-20 15:02:24 +02:00
Bruno Windels
f271517446
log redaction during sync
2021-05-20 15:02:14 +02:00
Bruno Windels
8a8c5569dc
provide redact method on tile and room
...
also add some logging
2021-05-20 14:53:17 +02:00
Bruno Windels
9721432a8c
remove pending events that failed because of permanent error
...
so they don't get stuck
2021-05-20 14:52:30 +02:00
Bruno Windels
4ce66fc8a1
allow concurrent removals when iterating pending events
...
so we can remove failed events in the next commit
2021-05-20 14:51:04 +02:00
Bruno Windels
618a32e6c0
revert last tried pending event status to waiting when offline
...
so we don't fail the check if we can immediately remove when redacting
2021-05-20 14:49:54 +02:00
Bruno Windels
df9e886f32
fix lint
2021-05-20 13:22:54 +02:00
Bruno Windels
b655c34bbb
also show reason for redaction
2021-05-20 13:20:12 +02:00
Bruno Windels
780ad44032
render redacted messages
2021-05-20 13:15:35 +02:00
Bruno Windels
94b0bc82ef
writing relations is async
2021-05-20 12:50:16 +02:00
Bruno Windels
814e92ad92
fix missing import
2021-05-20 12:50:16 +02:00
Bruno Windels
39bed4b0fc
fix lint here
2021-05-20 12:50:16 +02:00
Bruno Windels
9b923d337d
write redactions during sync
2021-05-20 12:50:16 +02:00
Bruno Windels
edaac9f436
draft redaction support, no local echo yet
2021-05-20 12:50:16 +02:00
Bruno Windels
1f17edc248
fix undefined variable, this probably breaks restoring the last url
2021-05-20 11:11:07 +02:00
Bruno Windels
df8686099f
Merge pull request #356 from MidhunSureshR/linkify-doc
...
Add jsdoc comments for clickable link code + Minor Changes
2021-05-18 13:30:23 +00:00
Bruno Windels
c3ef801566
offer back button when session loading fails
2021-05-18 15:27:31 +02:00
Bruno Windels
d567664d8b
ensure there is a session id in last-session action
2021-05-18 14:47:45 +02:00
Bruno Windels
2c7ea44afd
don't expose last url to root VM so it isn't confused by empty path
...
instead, check the length of the path in a dedicated method in
the router
2021-05-18 14:27:09 +02:00
Bruno Windels
dd880529ac
make redirects in initial url be reflected in url bar
2021-05-18 13:52:31 +02:00
Bruno Windels
1bec1033d1
translate last-session to a real session id
2021-05-18 13:52:13 +02:00
Bruno Windels
4c5be997fe
fix menu alignment with extra option
...
we'll need to have a closer look how these alignment options make sense
but for now this will do
2021-05-18 11:58:06 +02:00
Bruno Windels
754e7e7bb2
clarify with comments
2021-05-18 11:54:18 +02:00
Bruno Windels
f92b1df4fc
update copyright comments
2021-05-18 11:54:10 +02:00
Bruno Windels
54798d3079
unreachable now
2021-05-18 11:50:02 +02:00
Bruno Windels
32e47bc660
remove unused imports
2021-05-18 11:49:25 +02:00
Bruno Windels
3724fc6765
log join network call
2021-05-18 11:49:16 +02:00
Bruno Windels
2cf100efaa
refine unknown room view
2021-05-18 11:46:55 +02:00
Bruno Windels
c04a8140a3
offer to rejoin archived room from menu
2021-05-18 11:07:46 +02:00
Bruno Windels
03be63572d
ask to join when room id is unknown
2021-05-18 11:07:19 +02:00
Bruno Windels
3acb3bb48c
fix memory leak when switching room ids
2021-05-18 11:06:48 +02:00
Bruno Windels
9679058081
allow to join room by id or alias
2021-05-18 11:05:31 +02:00
RMidhunSuresh
72f58b6001
Change lines[i] to line
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-05-18 14:26:56 +05:30
RMidhunSuresh
1d63799c9b
Added js-doc for formatFunction
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-05-17 20:56:12 +05:30
RMidhunSuresh
11d551f8a3
Add js-doc for parsePlainBody
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-05-17 20:39:23 +05:30
RMidhunSuresh
d671bcec31
Add js-docs for linkify function
...
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-05-17 20:32:35 +05:30