diff --git a/src/assets/css/chat.scss b/src/assets/css/chat.scss index 7563a2b..b68207b 100644 --- a/src/assets/css/chat.scss +++ b/src/assets/css/chat.scss @@ -435,12 +435,17 @@ $admin-fg: white; } } -.room-name { +.room-name, .room-name-inline { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 18 * $chat-text-size; text-transform: uppercase; color: black; + text-align: center; +} + +.room-name-inline { + text-align: start; } @@ -523,19 +528,6 @@ $admin-fg: white; font-size: 16 * $chat-text-size !important; } - .room-name { - text-align: center; - margin-top: 15px; - } - .back { - position: absolute; - top: 0px; - left: 0px; - margin: 10px 0px; - font-weight: bold; - font-size: 12 * $chat-text-size; - } - .qr { width: 120px; height: 120px; @@ -568,6 +560,24 @@ $admin-fg: white; } } +.header-button-left { + position: absolute; + top: 0px; + left: 0px; + margin: 10px 0px; + font-weight: bold; + font-size: 12 * $chat-text-size; +} + +.header-button-right { + position: absolute; + top: 0px; + right: 0px; + margin: 10px 0px; + font-weight: bold; + font-size: 12 * $chat-text-size; +} + .profile { background-color: white; height: 100%; @@ -575,19 +585,6 @@ $admin-fg: white; background-color: transparent; border: none; } - .room-name { - text-align: center; - margin-top: 15px; - } - .back { - position: absolute; - top: 0px; - right: 0px; - margin: 10px 0px; - font-weight: bold; - font-size: 12 * $chat-text-size; - } - .v-card { background-color: white; border-radius: 20px; @@ -713,4 +710,44 @@ $admin-fg: white; font-size: 70 * $chat-text-size !important; } } +} + +.create-room { + .v-avatar { + border: 1px solid #808080 !important; + } + + .section { + background-color: white; + border-radius: 20px; + padding: 20px; + border: 1px solid #808080 !important; + position: relative; + } + + .link-copied { + position: absolute; + bottom: 10px; + left: 20%; + right: 20%; + background-color: #888888; + height: 50px; + border-radius: 25px; + color: white; + text-align: center; + vertical-align: middle; + padding-top: 10px; + } +} + +.room-link .v-input__slot::before { + /* Remove text underline */ + border-style: none !important; +} + +.created-room-welcome-header { + background-color: #e0e0e0; + border-radius: 25px; + margin: 20px; + padding: 20px; } \ No newline at end of file diff --git a/src/components/Chat.vue b/src/components/Chat.vue index 55a42e3..779a465 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -32,6 +32,8 @@ @notify="handleChatContainerResize" /> + +
{ self.initialLoadDone = true; - if (initialEventId) { + if (initialEventId && !this.showCreatedRoomWelcomeHeader) { self.scrollToEvent(initialEventId); + } else if (this.showCreatedRoomWelcomeHeader) { + self.onScroll(); } self.restartRRTimer(); }); @@ -1229,6 +1249,16 @@ export default { this.sendAttachment(text); this.showRecorder = false; }, + + closeCreateRoomWelcomeHeader() { + this.showCreatedRoomWelcomeHeader = false; + this.$nextTick(() => { + // We change the layout when removing the welcome header, so call + // onScroll here to handle updates (e.g. remove the "scroll to last" if we now + // can see all messages). + this.onScroll(); + }); + } }, }; diff --git a/src/components/ChatHeader.vue b/src/components/ChatHeader.vue index ee7a779..781ca1c 100644 --- a/src/components/ChatHeader.vue +++ b/src/components/ChatHeader.vue @@ -12,7 +12,7 @@ -
{{ room.summary.info.title }}
+
{{ room.summary.info.title }}
{{ memberCount }}{{ memberCount > 1 ? " members" : " member" }}
diff --git a/src/components/CreateRoom.vue b/src/components/CreateRoom.vue index 7a6f281..5ad976e 100644 --- a/src/components/CreateRoom.vue +++ b/src/components/CreateRoom.vue @@ -1,91 +1,180 @@ diff --git a/src/components/CreatedRoomWelcomeHeader.vue b/src/components/CreatedRoomWelcomeHeader.vue new file mode 100644 index 0000000..aa91351 --- /dev/null +++ b/src/components/CreatedRoomWelcomeHeader.vue @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/src/components/Invite.vue b/src/components/Invite.vue new file mode 100644 index 0000000..3e0c079 --- /dev/null +++ b/src/components/Invite.vue @@ -0,0 +1,47 @@ + + + + + \ No newline at end of file diff --git a/src/components/Profile.vue b/src/components/Profile.vue index e0b9063..a906467 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -5,7 +5,7 @@
My Profile
diff --git a/src/components/RoomInfo.vue b/src/components/RoomInfo.vue index 863170d..ff3829a 100644 --- a/src/components/RoomInfo.vue +++ b/src/components/RoomInfo.vue @@ -5,7 +5,7 @@
Info
@@ -216,15 +216,6 @@ export default { return ""; }, - publicRoomLink() { - if (this.room && this.roomJoinRule == "public") { - return this.$router.getRoomLink( - this.room.getCanonicalAlias() || this.room.roomId - ); - } - return null; - }, - joinedMembers() { if (!this.room) { return []; diff --git a/src/components/roomInfoMixin.js b/src/components/roomInfoMixin.js index 59ea941..a9e2a69 100644 --- a/src/components/roomInfoMixin.js +++ b/src/components/roomInfoMixin.js @@ -39,6 +39,15 @@ export default { } return ""; }, + + publicRoomLink() { + if (this.room && this.roomJoinRule == "public") { + return this.$router.getRoomLink( + this.room.getCanonicalAlias() || this.room.roomId + ); + } + return null; + }, }, watch: { room: { diff --git a/src/router/index.js b/src/router/index.js index 3b6b5b0..ccac933 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -48,7 +48,7 @@ const routes = [ name: 'CreateRoom', component: CreateRoom, meta: { - title: 'Create' + title: 'Create room' } }, { @@ -62,6 +62,14 @@ const routes = [ name: 'Join', component: Join }, + { + path: '/invite', + name: 'Invite', + component: () => import('../components/Invite.vue'), + meta: { + title: 'Add Friends' + } + } ] const router = new VueRouter({