From 00a96c2bd424bdf305e7087bd1f97e4ec2adb367 Mon Sep 17 00:00:00 2001 From: Fabian Trampusch Date: Mon, 25 Mar 2019 14:05:05 +0100 Subject: [PATCH] feat: add roster list header --- .../ngx-chat/src/lib/components/chat.component.ts | 1 + .../roster-list/roster-list.component.html | 12 ++++++++---- .../roster-list/roster-list.component.less | 5 +++++ .../ngx-chat/src/lib/core/translations.ts | 1 + 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/projects/pazznetwork/ngx-chat/src/lib/components/chat.component.ts b/projects/pazznetwork/ngx-chat/src/lib/components/chat.component.ts index c15f93b9..aa81a965 100644 --- a/projects/pazznetwork/ngx-chat/src/lib/components/chat.component.ts +++ b/projects/pazznetwork/ngx-chat/src/lib/components/chat.component.ts @@ -72,6 +72,7 @@ export class ChatComponent implements OnInit, OnChanges { rosterState = 'hidden'; private defaultTranslations: Translations = { + 'chat': 'Chat', 'contacts': 'Contacts', 'contactRequestIn': 'Incoming contact requests', 'contactRequestOut': 'Outgoing contact requests', diff --git a/projects/pazznetwork/ngx-chat/src/lib/components/roster-list/roster-list.component.html b/projects/pazznetwork/ngx-chat/src/lib/components/roster-list/roster-list.component.html index 3a1de909..f0b56dbf 100644 --- a/projects/pazznetwork/ngx-chat/src/lib/components/roster-list/roster-list.component.html +++ b/projects/pazznetwork/ngx-chat/src/lib/components/roster-list/roster-list.component.html @@ -5,8 +5,12 @@
+
+ {{ chatService.translations.chat }} +
+ -
{{chatService.translations.contacts}}
+
{{chatService.translations.contacts}}
@@ -19,7 +23,7 @@ -
{{chatService.translations.contactRequestIn}}
+
{{chatService.translations.contactRequestIn}}
-
{{chatService.translations.contactRequestOut}}
+
{{chatService.translations.contactRequestOut}}
-
{{chatService.translations.contactsUnaffiliated}}
+
{{chatService.translations.contactsUnaffiliated}}
diff --git a/projects/pazznetwork/ngx-chat/src/lib/components/roster-list/roster-list.component.less b/projects/pazznetwork/ngx-chat/src/lib/components/roster-list/roster-list.component.less index 75bb126e..5146838c 100644 --- a/projects/pazznetwork/ngx-chat/src/lib/components/roster-list/roster-list.component.less +++ b/projects/pazznetwork/ngx-chat/src/lib/components/roster-list/roster-list.component.less @@ -26,6 +26,11 @@ flex-direction: column; .roster-header { + text-align: center; + margin-bottom: 1em; + } + + .roster-group-header { border-bottom: 1px solid @general-border-color; padding-bottom: 0.5em; } diff --git a/projects/pazznetwork/ngx-chat/src/lib/core/translations.ts b/projects/pazznetwork/ngx-chat/src/lib/core/translations.ts index c8b80ebc..68e2e7d8 100644 --- a/projects/pazznetwork/ngx-chat/src/lib/core/translations.ts +++ b/projects/pazznetwork/ngx-chat/src/lib/core/translations.ts @@ -1,4 +1,5 @@ export interface Translations { + chat: string; contacts: string; contactRequestIn: string; contactRequestOut: string;