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.
 
 
 
 

50 lines
1.7 KiB

extends ../../layouts/main
block content-container
mixin renderRoomList (rooms)
each room in ownedChatRooms
li.uk-active
a(href=`/chat/${room._id}`)= room.name
section.uk-section.uk-section-default.uk-section-small
.uk-container.uk-container-expand
div(uk-grid)
div(class="uk-width-1-1 uk-width-1-5@l uk-flex-first@l").uk-flex-last
.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 Your Rooms
+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")
#chat-room
block content
div(class="uk-width-1-1 uk-width-1-5@l")
.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)};