Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. <template>
  2. <div class="page-container">
  3. <div class="md-layout-item">
  4. <!-- Change room select -->
  5. <md-field>
  6. <label for="room">Room</label>
  7. <md-select v-model="room" @md-selected="onChangeRoom" name="room" id="room">
  8. <md-option v-for="room in this.$store.state.rooms" :key="room.id" :value="room.name">{{room.name}}</md-option>
  9. </md-select>
  10. </md-field>
  11. </div>
  12.  
  13. <md-app md-waterfall md-mode="fixed">
  14. <!-- Room title and logout -->
  15. <md-app-toolbar class="md-primary">
  16. <span class="md-title page-container__room">{{room}}</span>
  17. <md-button class="md-icon-button page-container-logout" @click.native="logout()">
  18. <md-icon>power_settings_new</md-icon>
  19. </md-button>
  20. </md-app-toolbar>
  21.  
  22. <!-- Connected users list -->
  23. <md-app-drawer md-permanent="full">
  24. <!-- Display the users and emit an event when the user open a private chat -->
  25. <UserList
  26. :users="users"
  27. :openPrivateChat="openPrivateChat.chat"
  28. @open-chat="openChat($event)"
  29. ></UserList>
  30. </md-app-drawer>
  31.  
  32. <!-- Chat area with all the messages -->
  33. <md-app-content>
  34. <!-- As an input it display the messages received from the server -->
  35. <ChatArea :messages="messages"></ChatArea>
  36. </md-app-content>
  37. </md-app>
  38.  
  39. <!-- Text area to write on. It emits an event each time the user sends a message -->
  40. <MessageArea
  41. @send-message="sendMessage($event)">
  42. </MessageArea>
  43.  
  44. <!-- Private chat. The showDialog input controls whether we open a private chat or not -->
  45. <!-- The openPrivateChat is an object defined in the Vue chat component that contains
  46. information to handle the private chat -->
  47. <ChatDialog
  48. :showDialog="openPrivateChat"
  49. @close-chat="closePrivateChat()">
  50. </ChatDialog>
  51. </div>
  52. </template>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement