Skip to content

Commit

Permalink
Open private chat
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrián García Diéguez authored and Adrián García Diéguez committed Feb 6, 2019
1 parent c996909 commit 7f75956
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
23 changes: 13 additions & 10 deletions src/components/ChatDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@
:md-click-outside-to-close="false"
>
<div>
<md-avatar class="md-avatar-icon md-primary">
<md-icon>folder</md-icon>
</md-avatar>
<md-button class="md-icon-button" v-on:click="closeChat()">
<md-icon>close</md-icon>
</md-button>
</div>
<md-dialog-content>whateverrr</md-dialog-content>

<!--
<md-dialog-actions>
<md-button class="md-primary" @click="showDialog = false">Close</md-button>
<md-button class="md-primary" @click="showDialog = false">Save</md-button>
</md-dialog-actions>
</md-dialog-actions> -->
</md-dialog>

<md-button class="md-primary md-raised" @click="showDialog = true">Show Dialog</md-button>
</div>
</template>

Expand All @@ -33,13 +31,18 @@ export default {
return {
};
},
created() {}
created() {},
methods: {
closeChat(){
this.$emit('close-chat')
}
}
};
</script>

<style lang="scss" scoped>
.md-overlay {
position: absolute !important;
button {
float: right;
}
</style>

4 changes: 4 additions & 0 deletions src/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
position: unset;
top: unset;
right: unset;
}

.md-dialog-container{
border: 1px solid gainsboro;
}
5 changes: 4 additions & 1 deletion src/views/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@

<MessageArea v-on:send-message="sendMessage($event)"></MessageArea>

<ChatDialog v-bind:showDialog="openPrivateChat"></ChatDialog>
<ChatDialog
v-bind:showDialog="openPrivateChat"
v-on:close-chat="openPrivateChat = false">
</ChatDialog>
</div>
</template>

Expand Down

0 comments on commit 7f75956

Please sign in to comment.