diff --git a/client/src/components/app.riot b/client/src/components/app.riot index 6700488..e241caf 100644 --- a/client/src/components/app.riot +++ b/client/src/components/app.riot @@ -15,6 +15,7 @@ user={state.user} cb-select-room={selectRoom} cb-create-room={() => update({ showCreateModal: true })} + cb-profile={() => update({ showProfileModal: true })} cb-logout={handleLogout} />
@@ -69,6 +70,13 @@ cb-confirm={confirmClearRoom} cb-close={() => update({ showClearModal: false })} /> + + update({ showProfileModal: false })} + /> @@ -157,6 +165,7 @@ showInviteModal: false, showDeleteModal: false, showClearModal: false, + showProfileModal: false, aiTyping: false, aiToolStatus: null, streamingMessage: null, @@ -368,8 +377,8 @@ } }, - sendMessage({ content, mentions }) { - ws.sendMessage(this.state.activeRoomId, content, mentions) + sendMessage({ content, mentions, imageUrl }) { + ws.sendMessage(this.state.activeRoomId, content, mentions, imageUrl) }, handleDeleteRoom(roomId) { @@ -388,6 +397,10 @@ this.update({ messages: [], showClearModal: false }) }, + handleProfileUpdate(user) { + this.update({ user }) + }, + /** Check URL for /invite/:token and stash it for after login if needed */ checkPendingInvite() { const match = window.location.pathname.match(/^\/invite\/(.+)$/) diff --git a/client/src/components/chat-room.riot b/client/src/components/chat-room.riot index d59ceed..2cb1503 100644 --- a/client/src/components/chat-room.riot +++ b/client/src/components/chat-room.riot @@ -118,7 +118,25 @@
+ +
+ Preview + {state.pendingImage?.name || 'Pasted image'} + +
+ +