Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
306 commits
Select commit Hold shift + click to select a range
79b4303
Add call status to bottom of home nav
GigiaJ Apr 21, 2025
40a25aa
Move out bottom nav into own file
GigiaJ Apr 21, 2025
0fb5ffc
add creation handling for calls by setting creation content type
GigiaJ Apr 22, 2025
39e7de3
Add room type option
GigiaJ Apr 22, 2025
5ae8064
Remove text chat for now
GigiaJ Apr 22, 2025
02cb7ea
Add a check for space to hide option in space creation
GigiaJ Apr 22, 2025
7beb841
Revert casing to fix bottom nav status buttons (should swap back when…
GigiaJ Apr 22, 2025
5677042
Place holder buttons
GigiaJ Apr 22, 2025
6d4b37f
add call status bar call room link
GigiaJ Apr 22, 2025
1573353
re-enable header buttons globally for now
GigiaJ Apr 22, 2025
2f980a7
The reuse is substantial enough to justify including the license
GigiaJ Apr 23, 2025
c7ea3f7
The code reuse is substantial enough to justify including the license
GigiaJ Apr 23, 2025
a4af96b
Fix DM header since it *can* be a call room
GigiaJ Apr 23, 2025
f7fb4bc
Remove chat open icon from DMs
GigiaJ Apr 23, 2025
c8790a5
Fix syntaxical mistake causing chat open state to never update
GigiaJ Apr 23, 2025
6691467
Enable chat toggle for call rooms (still needs cleaner UI, but works …
GigiaJ Apr 23, 2025
39d4eed
Disable DM calling button for now (not implemented properly yet)
GigiaJ Apr 23, 2025
d6ffac7
Set mic default state to be generally accurate (need to set state fro…
GigiaJ Apr 23, 2025
b5ca54d
Prevents undefined object from being checked for values and filtered …
GigiaJ Apr 27, 2025
1e8a69f
update references to transport to clientwidgetapi (as transport is a …
GigiaJ Apr 29, 2025
e766640
Update transport refs to allow us to properly bind listeners for medi…
GigiaJ Apr 29, 2025
8700fe8
Add some parameters to be settable (need to create an param object ty…
GigiaJ Apr 29, 2025
4779b09
Always embed to give a proper call room lobby experience
GigiaJ May 1, 2025
b4d9828
Add tooltips and properly implement the navlink
GigiaJ May 1, 2025
ec74142
add join, screen_state, and hang up handling as well as logging state…
GigiaJ May 1, 2025
a555190
Activate when active call state is false
GigiaJ May 1, 2025
7ce3b40
Add call room icon (needs variations based on join rules)
GigiaJ May 1, 2025
8c6a626
add call as a param to pass
GigiaJ May 1, 2025
96be8e1
add chat button handling for call rooms and impl call room icon
GigiaJ May 1, 2025
8038c2a
add isCallActive to memo
GigiaJ May 2, 2025
7c6c1f5
prep visibility for multi-iframes
GigiaJ May 2, 2025
93fbbec
update to support two iframes - still needs to leverage balancing the…
GigiaJ May 2, 2025
de1a629
prepare for juggling iframes and handling hang up appropriately
GigiaJ May 2, 2025
a2a83fc
update to enable chat icon to be able to open call room WITHOUT joini…
GigiaJ May 2, 2025
7f8aeb3
remove logger statement and swap hash to search
GigiaJ May 2, 2025
c64dbb0
add a state store for which iFrame is active
GigiaJ May 3, 2025
7808adb
add (really badly) state logic for the active iframe
GigiaJ May 3, 2025
79647c5
Add users on the nav to showcase call activity and who is in the call
GigiaJ May 4, 2025
3dcfde4
add check to prevent DCing from the call you're currently in...
GigiaJ May 4, 2025
2e0218c
Add avatar and username for the space (needs to be moved into RoomNav…
GigiaJ May 4, 2025
2841386
Add background variant to buttons
GigiaJ May 4, 2025
b40ddf0
Update hook to keep method signature (accepting an array of Rooms ins…
GigiaJ May 4, 2025
9cb7051
Add state listener so the call activity is real time updated on joins…
GigiaJ May 4, 2025
5ee3897
Add RoomNavUser for displaying the user avatar + name in the nav for …
GigiaJ May 4, 2025
4083bbb
rename CallNavBottom to CallNavStatus
GigiaJ May 4, 2025
d11bdb2
Rename callnavbottom and fix linking implementation to actually be co…
GigiaJ May 4, 2025
a5a8f28
temp fix to allow the status to be cleared in some way
GigiaJ May 4, 2025
824be5b
re-add background to active call link button
GigiaJ May 4, 2025
9e919ea
prepare to feed this to child elements for visibility handling
GigiaJ May 8, 2025
3fcf2fe
loosely provide nav handling for testing refactoring
GigiaJ May 8, 2025
abe79ce
Add CallView
GigiaJ May 8, 2025
c05421e
Update to funnel Outlet context through for Call handling (might not …
GigiaJ May 8, 2025
1bd593b
update client layout to funnel outlet the iframes for the call container
GigiaJ May 8, 2025
8b50ac1
funnel through just iframe for now for testing sake
GigiaJ May 8, 2025
43ce6f0
Update room to use CallView
GigiaJ May 8, 2025
8b2fa10
Pass forward the backupIframeRef now
GigiaJ May 8, 2025
0be5fb9
remove unused params
GigiaJ May 9, 2025
a690dbd
Add backupIframeRef so we can re-add the lobby screen for non-joined …
GigiaJ May 9, 2025
6714300
Remove unused imports and restructure to support being parent to clie…
GigiaJ May 9, 2025
eea8ffe
Re-add layout as we're no longer oddly passing outlet context
GigiaJ May 9, 2025
807c90e
swap to using ref provider context from to connect to persistentcallc…
GigiaJ May 9, 2025
4293538
Revert to original code as we've moved calling to be more inline with…
GigiaJ May 9, 2025
00ac8f6
Revert to original code as we've moved the outlet context passing out…
GigiaJ May 9, 2025
ae9cc7a
Fix unexpected visibility in non-room areas
GigiaJ May 9, 2025
1cdc068
correctly provide visibility
GigiaJ May 9, 2025
9ae7c31
re-add mobile chat handling
GigiaJ May 10, 2025
cd23305
Improve call room view stability
GigiaJ May 10, 2025
a1c0b79
split into two refs
GigiaJ May 11, 2025
da3d20d
add ViewedRoom usage
GigiaJ May 11, 2025
cde0d5f
Disable
GigiaJ May 11, 2025
1b89831
add roomViewId and related
GigiaJ May 11, 2025
6601c47
(broken) juggle the iframe states proper... still needs fixing
GigiaJ May 11, 2025
f28a3a1
Conditionals to manage the active iframe state better
GigiaJ May 11, 2025
d488c24
add navigateRoom to be in both conditions for the nav button
GigiaJ May 11, 2025
5ab0b39
Fix the view to correctly display the active iframe based on which is…
GigiaJ May 11, 2025
f3612e2
Testing the iframe juggling. Seems to work for the first and second j…
GigiaJ May 11, 2025
4486ef1
add url as a param for widget url
GigiaJ May 11, 2025
59a936b
fix backup iframe visibility
GigiaJ May 11, 2025
74c883d
Much closer to the call state handling we want w/ hangups and joins
GigiaJ May 12, 2025
7043376
Fix the position of the member drawer to its correct location
GigiaJ May 12, 2025
af455a5
Ensure drawer doesn't appear in call room
GigiaJ May 12, 2025
3e3d686
Better handling of the isCallActive in the join handler
GigiaJ May 12, 2025
1e44557
Add ideal call room join behavior where text rooms to call room simpl…
GigiaJ May 20, 2025
e688c19
Fix mobile call room default behavior from auto-join to displaying lobby
GigiaJ May 22, 2025
dabe7f7
swap call status to be bound to call state and not active call id
GigiaJ May 22, 2025
d9c0c85
Remove clean room ID and add default handler for if no active call ha…
GigiaJ May 22, 2025
6e33c8e
Applies the correct changes to the call state and removes listeners o…
GigiaJ May 22, 2025
7ef3340
Remove superfluous comments and Date.now() that was causing loading..…
GigiaJ May 22, 2025
0b70ce7
Remove Date.now() that was causing widgetId desync
GigiaJ May 22, 2025
7dcd43c
add listener clearing, camel case es lint rule exception, remove unne…
GigiaJ May 22, 2025
e5505cd
Remove unused
GigiaJ May 22, 2025
3bd7588
Add widgetId as a getWidgetUrl param
GigiaJ May 22, 2025
5481595
Remove no longer needed files
GigiaJ May 23, 2025
c6ceb3f
revert ternary expression change and add to dependency array
GigiaJ May 23, 2025
19f1df7
add widgetId to correct pos in getWidgetUrl usage
GigiaJ May 23, 2025
07a980a
Remove CallActivation
GigiaJ May 23, 2025
67fbf94
Move and rename RoomCallNavStatus
GigiaJ May 23, 2025
a81492c
update imports and dependency array
GigiaJ May 23, 2025
023a23d
Rename and clean up
GigiaJ May 23, 2025
0db52c2
Moved CallProvider
GigiaJ May 23, 2025
cd0d4c9
Resolved merge conflict
GigiaJ May 23, 2025
395a24f
Fix spelling mistake
GigiaJ May 23, 2025
f262f54
Fix to use shorthand prop
GigiaJ May 23, 2025
e4ce4da
Remove unneeded logger.errors
GigiaJ May 23, 2025
ff02c46
Fixes element-call embedded support (but it seems to run poorly)
GigiaJ May 23, 2025
4c8ab4e
null the default url so that we fallback to the embedded version (wou…
GigiaJ May 23, 2025
d3ec9fa
Fix vite build to place element-call correctly for embedded npm packa…
GigiaJ May 23, 2025
c108295
add vite preview as an npm script
GigiaJ May 23, 2025
d54bc2c
Move files to more correct location
GigiaJ May 23, 2025
9b3c6e7
Add package-lock changes
GigiaJ May 23, 2025
27196cb
Set dep version to exact
GigiaJ May 23, 2025
1871f70
Fix path issue from moving file locations
GigiaJ May 23, 2025
9302003
Sets initial states so the iframes don't cause the other to fail with…
GigiaJ May 23, 2025
b18f636
Revert navitem change
GigiaJ May 23, 2025
65ff5e3
Just check for state on both which should only occur at initial
GigiaJ May 23, 2025
b6afe3b
Fixes call initializing by default on mobile
GigiaJ May 23, 2025
03cbecc
Provides correct behavior when call isn't active and no activeClientW…
GigiaJ May 23, 2025
e220387
Corrects the state for the situations where both iframes are "active"…
GigiaJ May 23, 2025
872e9a2
Reduce code reuse in handleJoin
GigiaJ May 23, 2025
0b6009a
Seems to sort out the hangup status button bug the occurred after joi…
GigiaJ May 23, 2025
8b22573
Re-add the default view current active room behavior
GigiaJ May 23, 2025
3818671
Remove repetitive check
GigiaJ May 25, 2025
f2f98a6
Add storing widget for comparing with (since we already store room id…
GigiaJ May 25, 2025
0ef9c56
Update rendering logic to clear up remaining rendering bug (straight …
GigiaJ May 25, 2025
f842356
Merge branch 'dev' into dev
GigiaJ May 25, 2025
9499289
Prevent null rooms from ever rendering
GigiaJ May 25, 2025
7d26601
This seems to manage the hangup state with the status bar button well…
GigiaJ May 25, 2025
99576a2
Remove viewed room setting here and pass the room to hang up (seems s…
GigiaJ May 25, 2025
f3c0aeb
Remove unused
GigiaJ May 25, 2025
22903c9
Properly declare new hangup method sig
GigiaJ May 25, 2025
108eb60
Seems to avoid almost all invalid states (hang up while viewing anoth…
GigiaJ May 26, 2025
1a82196
Fix for cases where you're viewing a lobby and hang up your existing …
GigiaJ May 26, 2025
bf131f7
Re-add intended switching behavior
GigiaJ May 26, 2025
df84eb1
More correct filter (viewedRoom can return false on that compare in s…
GigiaJ May 26, 2025
335df8d
Seems to shore up the remaining state issues with the status bar hangup
GigiaJ May 26, 2025
18ea2d2
Fix formatting
GigiaJ May 26, 2025
9b98083
In widget hang up button should be handled correct now
GigiaJ May 26, 2025
0bd42a3
Solves the CHCH sequence issue, CLJH remains
GigiaJ May 26, 2025
923982e
Fixes CLJH, found CCH
GigiaJ May 26, 2025
0e332d6
Solves CCH. Looks like CLCH left
GigiaJ May 26, 2025
c99112b
A bit of an abomination, but adds a state counter to iteratively hand…
GigiaJ May 27, 2025
3e6d55f
Fix dependency array
GigiaJ May 27, 2025
78dcdfd
Merge branch 'dev' into dev
GigiaJ May 27, 2025
39b20c7
Technically corrects the hangup button in the widget, should be more …
GigiaJ May 27, 2025
4225282
Bind the on messaging iframe for easier access in hangup/join handling
GigiaJ May 28, 2025
e3f1697
Far cleaner and more sensible handling of the call window... I just r…
GigiaJ May 28, 2025
6edee72
Fixes a bug where if you left a call then went to a lobby and joined …
GigiaJ May 28, 2025
153d7d1
Merge branch 'dev' into dev
GigiaJ May 28, 2025
73c17d3
Fixes complaints of null contentDocument in iframe
GigiaJ May 28, 2025
e42a617
Merge branch 'dev' into dev
GigiaJ Jun 11, 2025
e78d1da
Update to use new icons (thank you)
GigiaJ Jun 11, 2025
7228c2e
Remove unneeded prop
GigiaJ Jun 11, 2025
02ac70a
Re-arrange more options and add checks for each option to see if it i…
GigiaJ Jun 11, 2025
daadbe4
Invert icons to show the state instead of the action they will perfor…
GigiaJ Jun 11, 2025
e1146b1
Update src/app/features/room-nav/RoomCallNavStatus.tsx
GigiaJ Jun 16, 2025
a5a9e72
Update src/app/features/room-nav/RoomCallNavStatus.tsx
GigiaJ Jun 16, 2025
3b76787
Update src/app/features/room-nav/RoomCallNavStatus.tsx
GigiaJ Jun 16, 2025
8dfc3aa
Update src/app/features/room-nav/RoomCallNavStatus.tsx
GigiaJ Jun 16, 2025
0d2f76e
Update src/app/features/room-nav/RoomCallNavStatus.tsx
GigiaJ Jun 16, 2025
2575d77
Update src/app/features/room-nav/RoomCallNavStatus.tsx
GigiaJ Jun 16, 2025
5d22b28
Update src/app/features/room-nav/RoomNavItem.tsx
GigiaJ Jun 16, 2025
8e4f310
Update src/app/features/room/RoomViewHeader.tsx
GigiaJ Jun 16, 2025
4d14eb9
Update src/app/features/room-nav/RoomNavItem.tsx
GigiaJ Jun 17, 2025
3f2c2af
Update src/app/features/room-nav/RoomNavItem.tsx
GigiaJ Jun 17, 2025
9f749d1
Update src/app/features/room-nav/RoomNavItem.tsx
GigiaJ Jun 17, 2025
b08fa60
Update src/app/features/room-nav/RoomNavItem.tsx
GigiaJ Jun 17, 2025
7a169fc
Update src/app/features/room-nav/RoomNavItem.tsx
GigiaJ Jun 17, 2025
f74feec
Update src/app/features/room-nav/RoomNavItem.tsx
GigiaJ Jun 17, 2025
aca2a40
Update src/app/features/room-nav/RoomNavUser.tsx
GigiaJ Jun 17, 2025
b46c9ed
Update src/app/features/room-nav/RoomNavUser.tsx
GigiaJ Jun 17, 2025
dd158fa
Update src/app/features/room-nav/RoomNavUser.tsx
GigiaJ Jun 17, 2025
e6e751d
Update src/app/pages/client/space/Space.tsx
GigiaJ Jun 17, 2025
6b3c9df
Update src/app/features/call/CallView.tsx
GigiaJ Jun 18, 2025
c675131
Update src/app/features/call/CallView.tsx
GigiaJ Jun 18, 2025
a2c8097
Update src/app/features/call/CallView.tsx
GigiaJ Jun 18, 2025
9be2a94
Update src/app/features/room/RoomView.tsx
GigiaJ Jun 18, 2025
4403eac
Update src/app/features/room/RoomView.tsx
GigiaJ Jun 18, 2025
7712e34
adjust room header for calling
GigiaJ Jun 18, 2025
2081539
Remove No Active Call text when not in a call
GigiaJ Jun 18, 2025
12e4ba9
Merge branch 'dev' into dev
GigiaJ Jun 19, 2025
78c3850
update element-call version
GigiaJ Jun 20, 2025
6d0e8b7
Update src/app/features/room/RoomViewHeader.tsx
GigiaJ Jun 25, 2025
7e948f0
Update src/app/features/room/RoomViewHeader.tsx
GigiaJ Jun 25, 2025
40a2277
Update src/app/features/room/RoomViewHeader.tsx
GigiaJ Jun 25, 2025
2869735
Update src/app/features/room/RoomViewHeader.tsx
GigiaJ Jun 25, 2025
eaf70fb
Update src/app/features/room/RoomViewHeader.tsx
GigiaJ Jun 25, 2025
efc77ce
Revert most changes to Space.tsx
GimleLarpes Jun 27, 2025
f407905
Show call room even if category is collapsed
GimleLarpes Jun 27, 2025
79fab78
changes to RoomNavItem, RoomNavUser and add useCallMembers
GimleLarpes Jun 29, 2025
ca2c868
Rename file, sprinkle in the magic one line for matrixRTCSession. and…
GigiaJ Jul 5, 2025
92e24e5
swap userId to callMembership as a prop and add a nullchecked userId …
GigiaJ Jul 5, 2025
5a25da4
update references to use callMembership instead
GigiaJ Jul 5, 2025
235bb63
Merge pull request #41 from GimleLarpes/patch-1
GigiaJ Jul 5, 2025
77f8a04
Merge pull request #54 from GigiaJ/pr-41
GigiaJ Jul 5, 2025
4be7042
Simplify RoomNavUser
GimleLarpes Jul 30, 2025
b91a9d7
Simplify RoomViewHeader.tsx
GimleLarpes Jul 31, 2025
fb9ca31
Update Room.tsx to accomodate restructuring of Room, RoomView and Cal…
GimleLarpes Jul 31, 2025
e504a9e
Update RoomView.tsx to accomodate restructuring of Room, RoomView and…
GimleLarpes Jul 31, 2025
528cbc5
Update CallView.tsx to accomodate restructuring of Room, RoomView and…
GimleLarpes Jul 31, 2025
51cfd72
Merge pull request #59 from GimleLarpes/patch-2
GigiaJ Aug 9, 2025
141f148
Merge pull request #60 from GimleLarpes/patch-3
GigiaJ Aug 9, 2025
a299e9c
Merge pull request #58 from GimleLarpes/patch-1
GigiaJ Aug 18, 2025
7bca8fb
add call related permissions to room permissions
YoJames20192 Feb 8, 2026
9e1aab2
bump element call to 0.16.3, apply cinny theme to element call ui, re…
YoJames20192 Feb 9, 2026
e481116
update text spacing
YoJames20192 Feb 9, 2026
990a92a
redo roomcallnavstatus ui, force user preferred mute/video states whe…
YoJames20192 Feb 10, 2026
5b3a0f1
set default mic state to enabled
YoJames20192 Feb 10, 2026
4095763
clean up ts/eslint errors
YoJames2019 Feb 10, 2026
9562103
remove debug logs
YoJames2019 Feb 11, 2026
008669e
format using prettier rules from project prettierrc
YoJames2019 Feb 11, 2026
e01009f
Merge remote-tracking branch 'upstream/dev' into feat/element-call
hazre Feb 11, 2026
47f1d11
fix: show call nav status while active call is ongoing
hazre Feb 11, 2026
9dbe53a
fix: clean up call nav/call view console warnings
hazre Feb 11, 2026
7ceba03
fix: keep call media controls visible before joining
hazre Feb 11, 2026
4f498af
fix: restore header icon button fill behavior
hazre Feb 11, 2026
afac47d
style: blend header and room input button styles in call nav
hazre Feb 11, 2026
a6f75eb
fix page header background color on room view header
YoJames2019 Feb 11, 2026
5aec273
Merge pull request #1 from YoJames2019/feat/element-call
hazre Feb 11, 2026
e04aeb8
Merge branch 'dev' into feat/element-call
ajbura Feb 12, 2026
9554b31
Merge branch 'dev' into feat/element-call
hazre Feb 12, 2026
efb3e11
fix: permissions and room icon resolution (#2)
YoJames2019 Feb 13, 2026
92f490e
feat: show connected/connecting call status
hazre Feb 13, 2026
d2348d2
fix: preserve navigation context when opening non-call rooms
hazre Feb 13, 2026
23b1216
fix: reset room name state when room instance changes
hazre Feb 13, 2026
1f2f8ff
Merge pull request #3 from hazre/fix/element-call-bug-1
hazre Feb 13, 2026
9bc157a
Merge remote-tracking branch 'upstream/dev' into feat/element-call
hazre Feb 14, 2026
99cae93
feat: Disable webcam by default using callIntent='audio'
hanthor Feb 14, 2026
34bccf6
Add channel type selecor
TymekV Feb 14, 2026
31e4a02
Add option for voice rooms, which for now sets the default selected
TymekV Feb 14, 2026
2a10347
Add proper support for room selection from the enu
TymekV Feb 14, 2026
e85172a
Merge pull request #4 from hanthor/fix/disable-webcam-default
hazre Feb 14, 2026
ee6875b
Move enums to `types.ts` and change icons selection to use
TymekV Feb 15, 2026
2efdaae
Merge pull request #5 from Tymek-V/feat/channel-type-selector
hazre Feb 15, 2026
c037af4
Merge remote-tracking branch 'upstream/dev' into feat/element-call
hazre Feb 16, 2026
341e3cd
fix: group duplicate conditions into one
YoJames2019 Feb 17, 2026
cee5396
fix: typo
YoJames2019 Feb 17, 2026
c97fba7
Merge pull request #7 from YoJames2019/fix/room-header-cleanup-1
hazre Feb 19, 2026
7f73caf
refactor: rename kind/voice to access/type and simplify room creation
hazre Feb 19, 2026
881da5c
refactor: unify join rule icon mapping and update call/space icons
hazre Feb 19, 2026
30303fe
chore(deps): bump matrix-widget-api to 1.17 and remove react-sdk-modu…
hazre Feb 19, 2026
a4c34ef
fix: adapt SmallWidget to matrix-widget-api 1.17.0 API
hazre Feb 19, 2026
0f047e5
fix: render call room chat only when chat panel is open
hazre Feb 19, 2026
ff3def0
fix(permissions): show call settings permissions only for call rooms
hazre Feb 19, 2026
7f1a465
refactor: remove redundant room-nav props/guards and minor naming cle…
hazre Feb 19, 2026
5b7e96f
fix: use PhoneDown icon for hang up action
hazre Feb 19, 2026
578cb86
chore(hooks): remove unused useStateEvents hook
hazre Feb 19, 2026
21e596d
fix(room): enable members drawer toggle in desktop call rooms
hazre Feb 19, 2026
8aedad0
Revert "fix: adapt SmallWidget to matrix-widget-api 1.17.0 API"
hazre Feb 20, 2026
f463f3e
fix: semi-revert matrix-widget-api 1.17 bump and migrate to 1.13 API
hazre Feb 20, 2026
459b52e
fix(call): wait for Element Call contentLoaded before widget handshake
hazre Feb 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"xmr.se"
],
"allowCustomHomeservers": true,
"elementCallUrl": null,

"featuredCommunities": {
"openAsDefault": false,
Expand Down
2 changes: 2 additions & 0 deletions docker-nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ server {
rewrite ^/public/(.*)$ /public/$1 break;
rewrite ^/assets/(.*)$ /assets/$1 break;

rewrite ^/element-call/dist/(.*)$ /element-call/dist/$1 break;

rewrite ^(.+)$ /index.html break;
}
}
23 changes: 16 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"scripts": {
"start": "vite",
"build": "vite build",
"preview": "vite preview",
"lint": "yarn check:eslint && yarn check:prettier",
"check:eslint": "eslint src/*",
"check:prettier": "prettier --check .",
Expand Down Expand Up @@ -43,7 +44,7 @@
"emojibase-data": "15.3.2",
"file-saver": "2.0.5",
"focus-trap-react": "10.0.2",
"folds": "2.5.0",
"folds": "2.6.0",
"html-dom-parser": "4.0.0",
"html-react-parser": "4.2.0",
"i18next": "23.12.2",
Expand All @@ -55,6 +56,7 @@
"linkify-react": "4.1.3",
"linkifyjs": "4.1.3",
"matrix-js-sdk": "38.2.0",
"matrix-widget-api": "1.13.0",
"millify": "6.1.0",
"pdfjs-dist": "4.2.67",
"prismjs": "1.30.0",
Expand All @@ -76,6 +78,7 @@
"ua-parser-js": "1.0.35"
},
"devDependencies": {
"@element-hq/element-call-embedded": "0.16.3",
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
"@rollup/plugin-inject": "5.0.3",
"@rollup/plugin-wasm": "6.1.1",
Expand Down
30 changes: 10 additions & 20 deletions src/app/components/JoinRulesSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,24 @@ import {
import { JoinRule } from 'matrix-js-sdk';
import FocusTrap from 'focus-trap-react';
import { stopPropagation } from '../utils/keyboard';
import { getRoomIconSrc } from '../utils/room';

export type ExtraJoinRules = 'knock_restricted';
export type ExtendedJoinRules = JoinRule | ExtraJoinRules;

type JoinRuleIcons = Record<ExtendedJoinRules, IconSrc>;
export const useRoomJoinRuleIcon = (): JoinRuleIcons =>
useMemo(
() => ({
[JoinRule.Invite]: Icons.HashLock,
[JoinRule.Knock]: Icons.HashLock,
knock_restricted: Icons.Hash,
[JoinRule.Restricted]: Icons.Hash,
[JoinRule.Public]: Icons.HashGlobe,
[JoinRule.Private]: Icons.HashLock,
}),
[]
);
export const useSpaceJoinRuleIcon = (): JoinRuleIcons =>

export const useJoinRuleIcons = (roomType?: string): JoinRuleIcons =>
useMemo(
() => ({
[JoinRule.Invite]: Icons.SpaceLock,
[JoinRule.Knock]: Icons.SpaceLock,
knock_restricted: Icons.Space,
[JoinRule.Restricted]: Icons.Space,
[JoinRule.Public]: Icons.SpaceGlobe,
[JoinRule.Private]: Icons.SpaceLock,
[JoinRule.Invite]: getRoomIconSrc(Icons, roomType, JoinRule.Invite),
[JoinRule.Knock]: getRoomIconSrc(Icons, roomType, JoinRule.Knock),
knock_restricted: getRoomIconSrc(Icons, roomType, JoinRule.Restricted),
[JoinRule.Restricted]: getRoomIconSrc(Icons, roomType, JoinRule.Restricted),
[JoinRule.Public]: getRoomIconSrc(Icons, roomType, JoinRule.Public),
[JoinRule.Private]: getRoomIconSrc(Icons, roomType, JoinRule.Private),
}),
[]
[roomType]
);

type JoinRuleLabels = Record<ExtendedJoinRules, string>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,39 @@ import React from 'react';
import { Box, Text, Icon, Icons, config, IconSrc } from 'folds';
import { SequenceCard } from '../sequence-card';
import { SettingTile } from '../setting-tile';
import { CreateRoomAccess } from './types';

export enum CreateRoomKind {
Private = 'private',
Restricted = 'restricted',
Public = 'public',
}
type CreateRoomKindSelectorProps = {
value?: CreateRoomKind;
onSelect: (value: CreateRoomKind) => void;
type CreateRoomAccessSelectorProps = {
value?: CreateRoomAccess;
onSelect: (value: CreateRoomAccess) => void;
canRestrict?: boolean;
disabled?: boolean;
getIcon: (kind: CreateRoomKind) => IconSrc;
getIcon: (access: CreateRoomAccess) => IconSrc;
};
export function CreateRoomKindSelector({
export function CreateRoomAccessSelector({
value,
onSelect,
canRestrict,
disabled,
getIcon,
}: CreateRoomKindSelectorProps) {
}: CreateRoomAccessSelectorProps) {
return (
<Box shrink="No" direction="Column" gap="100">
{canRestrict && (
<SequenceCard
style={{ padding: config.space.S300 }}
variant={value === CreateRoomKind.Restricted ? 'Primary' : 'SurfaceVariant'}
variant={value === CreateRoomAccess.Restricted ? 'Primary' : 'SurfaceVariant'}
direction="Column"
gap="100"
as="button"
type="button"
aria-pressed={value === CreateRoomKind.Restricted}
onClick={() => onSelect(CreateRoomKind.Restricted)}
aria-pressed={value === CreateRoomAccess.Restricted}
onClick={() => onSelect(CreateRoomAccess.Restricted)}
disabled={disabled}
>
<SettingTile
before={<Icon size="400" src={getIcon(CreateRoomKind.Restricted)} />}
after={value === CreateRoomKind.Restricted && <Icon src={Icons.Check} />}
before={<Icon size="400" src={getIcon(CreateRoomAccess.Restricted)} />}
after={value === CreateRoomAccess.Restricted && <Icon src={Icons.Check} />}
>
<Text size="H6">Restricted</Text>
<Text size="T300" priority="300">
Expand All @@ -49,18 +45,18 @@ export function CreateRoomKindSelector({
)}
<SequenceCard
style={{ padding: config.space.S300 }}
variant={value === CreateRoomKind.Private ? 'Primary' : 'SurfaceVariant'}
variant={value === CreateRoomAccess.Private ? 'Primary' : 'SurfaceVariant'}
direction="Column"
gap="100"
as="button"
type="button"
aria-pressed={value === CreateRoomKind.Private}
onClick={() => onSelect(CreateRoomKind.Private)}
aria-pressed={value === CreateRoomAccess.Private}
onClick={() => onSelect(CreateRoomAccess.Private)}
disabled={disabled}
>
<SettingTile
before={<Icon size="400" src={getIcon(CreateRoomKind.Private)} />}
after={value === CreateRoomKind.Private && <Icon src={Icons.Check} />}
before={<Icon size="400" src={getIcon(CreateRoomAccess.Private)} />}
after={value === CreateRoomAccess.Private && <Icon src={Icons.Check} />}
>
<Text size="H6">Private</Text>
<Text size="T300" priority="300">
Expand All @@ -70,18 +66,18 @@ export function CreateRoomKindSelector({
</SequenceCard>
<SequenceCard
style={{ padding: config.space.S300 }}
variant={value === CreateRoomKind.Public ? 'Primary' : 'SurfaceVariant'}
variant={value === CreateRoomAccess.Public ? 'Primary' : 'SurfaceVariant'}
direction="Column"
gap="100"
as="button"
type="button"
aria-pressed={value === CreateRoomKind.Public}
onClick={() => onSelect(CreateRoomKind.Public)}
aria-pressed={value === CreateRoomAccess.Public}
onClick={() => onSelect(CreateRoomAccess.Public)}
disabled={disabled}
>
<SettingTile
before={<Icon size="400" src={getIcon(CreateRoomKind.Public)} />}
after={value === CreateRoomKind.Public && <Icon src={Icons.Check} />}
before={<Icon size="400" src={getIcon(CreateRoomAccess.Public)} />}
after={value === CreateRoomAccess.Public && <Icon src={Icons.Check} />}
>
<Text size="H6">Public</Text>
<Text size="T300" priority="300">
Expand Down
65 changes: 65 additions & 0 deletions src/app/components/create-room/CreateRoomTypeSelector.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import React from 'react';
import { Box, Text, Icon, Icons, config, IconSrc } from 'folds';
import { SequenceCard } from '../sequence-card';
import { SettingTile } from '../setting-tile';
import { CreateRoomType } from './types';

type CreateRoomTypeSelectorProps = {
value?: CreateRoomType;
onSelect: (value: CreateRoomType) => void;
disabled?: boolean;
getIcon: (type: CreateRoomType) => IconSrc;
};
export function CreateRoomTypeSelector({
value,
onSelect,
disabled,
getIcon,
}: CreateRoomTypeSelectorProps) {
return (
<Box shrink="No" direction="Column" gap="100">
<SequenceCard
style={{ padding: config.space.S300 }}
variant={value === CreateRoomType.TextRoom ? 'Primary' : 'SurfaceVariant'}
direction="Column"
gap="100"
as="button"
type="button"
aria-pressed={value === CreateRoomType.TextRoom}
onClick={() => onSelect(CreateRoomType.TextRoom)}
disabled={disabled}
>
<SettingTile
before={<Icon size="400" src={getIcon(CreateRoomType.TextRoom)} />}
after={value === CreateRoomType.TextRoom && <Icon src={Icons.Check} />}
>
<Text size="H6">Text</Text>
<Text size="T300" priority="300">
Send text messages, videos and GIFs.
</Text>
</SettingTile>
</SequenceCard>
<SequenceCard
style={{ padding: config.space.S300 }}
variant={value === CreateRoomType.VoiceRoom ? 'Primary' : 'SurfaceVariant'}
direction="Column"
gap="100"
as="button"
type="button"
aria-pressed={value === CreateRoomType.VoiceRoom}
onClick={() => onSelect(CreateRoomType.VoiceRoom)}
disabled={disabled}
>
<SettingTile
before={<Icon size="400" src={getIcon(CreateRoomType.VoiceRoom)} />}
after={value === CreateRoomType.VoiceRoom && <Icon src={Icons.Check} />}
>
<Text size="H6">Voice</Text>
<Text size="T300" priority="300">
A room optimized for voice calls.
</Text>
</SettingTile>
</SequenceCard>
</Box>
);
}
3 changes: 2 additions & 1 deletion src/app/components/create-room/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from './CreateRoomKindSelector';
export * from './CreateRoomAccessSelector';
export * from './CreateRoomAliasInput';
export * from './RoomVersionSelector';
export * from './utils';
export * from './AdditionalCreatorInput';
export * from './types';
10 changes: 10 additions & 0 deletions src/app/components/create-room/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export enum CreateRoomType {
TextRoom = 'text',
VoiceRoom = 'voice',
}

export enum CreateRoomAccess {
Private = 'private',
Restricted = 'restricted',
Public = 'public',
}
Loading