From 0e51fac2b24c752513afe65736e98eb5fb5ec3af Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 5 Dec 2017 11:02:41 +0100 Subject: Add missing component code. --- src/components/chat/chat.vue | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/components/chat/chat.vue (limited to 'src/components/chat/chat.vue') diff --git a/src/components/chat/chat.vue b/src/components/chat/chat.vue new file mode 100644 index 00000000..9d3ab39c --- /dev/null +++ b/src/components/chat/chat.vue @@ -0,0 +1,49 @@ + + + + + + -- cgit v1.2.3-70-g09d2 From a03b92e252406a8469a9ffe871a6882b3aedb366 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 5 Dec 2017 12:09:54 +0100 Subject: Post on submit, not on enter. --- src/components/chat/chat.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/components/chat/chat.vue') diff --git a/src/components/chat/chat.vue b/src/components/chat/chat.vue index 9d3ab39c..0c397472 100644 --- a/src/components/chat/chat.vue +++ b/src/components/chat/chat.vue @@ -18,7 +18,9 @@
- +
+ +
@@ -41,9 +43,12 @@ } .chat-input { display: flex; - input { + form { flex: auto; - margin: 0.5em; + input { + margin: 0.5em; + width: 100%; + } } } -- cgit v1.2.3-70-g09d2 From 6c4e3a509a23a4f683aee02fcd0b186813ae3de0 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 5 Dec 2017 14:20:34 +0100 Subject: Don't display if we don't have a chat. --- src/components/chat/chat.vue | 2 +- src/components/nav_panel/nav_panel.js | 3 +++ src/components/nav_panel/nav_panel.vue | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/components/chat/chat.vue') diff --git a/src/components/chat/chat.vue b/src/components/chat/chat.vue index 0c397472..488faf9a 100644 --- a/src/components/chat/chat.vue +++ b/src/components/chat/chat.vue @@ -7,7 +7,7 @@
-
+
{{message.author.username}}: diff --git a/src/components/nav_panel/nav_panel.js b/src/components/nav_panel/nav_panel.js index baeaaede..ea5d7ea4 100644 --- a/src/components/nav_panel/nav_panel.js +++ b/src/components/nav_panel/nav_panel.js @@ -2,6 +2,9 @@ const NavPanel = { computed: { currentUser () { return this.$store.state.users.currentUser + }, + chat () { + return this.$store.state.chat.channel } } } diff --git a/src/components/nav_panel/nav_panel.vue b/src/components/nav_panel/nav_panel.vue index fa4000b0..ccc772a8 100644 --- a/src/components/nav_panel/nav_panel.vue +++ b/src/components/nav_panel/nav_panel.vue @@ -7,7 +7,7 @@ {{ $t("nav.timeline") }} -
  • +
  • {{ $t("nav.chat") }} -- cgit v1.2.3-70-g09d2 From ecb8acb155a77092b0661854b0ca4cf3c19ff56e Mon Sep 17 00:00:00 2001 From: eal Date: Thu, 7 Dec 2017 19:03:26 +0200 Subject: Some css fixes. Scale chat panel size to viewport height, fit message field to width. --- src/components/chat/chat.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/components/chat/chat.vue') diff --git a/src/components/chat/chat.vue b/src/components/chat/chat.vue index 488faf9a..6c1e2c38 100644 --- a/src/components/chat/chat.vue +++ b/src/components/chat/chat.vue @@ -30,6 +30,11 @@