Open source web app engine for the Digital Telepresence Platform.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

54 lines
2.0 KiB

extends ../../layouts/main
block page-footer
block content-container
mixin renderRoomList (rooms)
each room in ownedChatRooms
li.uk-active
a(href=`/chat/room/${room._id}`)= room.name
section.site-chat-section
div(uk-grid).uk-height-1-1
div(class="uk-width-1-1 uk-width-1-5@l uk-flex-last uk-flex-first@l").uk-height-1-1.uk-overflow-auto
.content-block.uk-border-rounded.uk-margin
if Array.isArray(ownedChatRooms) && (ownedChatRooms.length > 0)
ul#room-list.uk-nav.uk-nav-default
li.uk-nav-header
div(uk-grid).uk-grid-small
.uk-width-expand Your Rooms
.uk-width-auto
a(href='/chat/room/create', uk-tooltip="Create new chat room...").uk-link-reset
i.fas.fa-plus
+renderRoomList(ownedChatRooms)
else
div You don't own any chat rooms.
.content-block.uk-border-rounded
if Array.isArray(joinedChatRooms) && (joinedChatRooms.length > 0)
ul#room-list.uk-nav.uk-nav-default
li.uk-nav-header Joined Rooms
+renderRoomList(ownedChatRooms)
else
div You haven't joined any chat rooms.
div(class="uk-width-1-1 uk-width-expand@l").uk-height-1-1
#chat-room.uk-height-1-1
block content
div(class="uk-width-1-1 uk-width-1-5@l").uk-height-1-1.uk-overflow-auto
.content-block.uk-border-rounded
if chatRoom
if Array.isArray(chatRoom.members) && (chatRoom.members.length > 0)
ul#room-member-list.uk-nav.uk-nav-default
li.uk-nav-header Room Members
each member in chatRoom.members
li
a(href="")= member.displayName || member.username
else
div The room has no members
else
div Not in a room
block viewjs
script.
window.dtp.room = !{JSON.stringify(room)};