Procházet zdrojové kódy

feat: add chat component and configure chat settings

tigger před 7 měsíci
rodič
revize
d84275e118

+ 1 - 0
src/app/app.component.html

@@ -82,6 +82,7 @@
 <div [ngClass]="theme" class="container">
   <div class="main">
     <router-outlet></router-outlet>
+    <chat title="{{'fis_ai_chat'|tr:'FIS A.I. Chat'}}"></chat>
     <div class="mobile-buffer">&nbsp;</div>
   </div>
 </div>

+ 12 - 0
src/app/app.component.scss

@@ -186,6 +186,14 @@ footer {
     display: none;
 }
 
+chat {
+    position: fixed;
+    bottom: 0;
+    right: 10px;
+    width: 350px;
+    z-index: 100;
+}
+
 /** Mobile styles */
 @media screen and (pointer: none), (pointer: coarse) {
     .toolbar {display: none;}
@@ -213,6 +221,10 @@ footer {
         bottom: 0; left: 0;
         width: 100%;
     }
+
+    chat {
+        bottom: 60px;
+    }
 }
 
 @media screen and (pointer: none), (pointer: coarse) and (orientation: landscape) {

+ 2 - 0
src/app/app.component.ts

@@ -24,6 +24,7 @@ import { BusinessDataModule } from 'fis/business.data/business.data.module';
 import { NotificationService } from 'angularlib/notification/notification.service';
 import { env } from 'angularlib/environments/environment';
 import { TranslatePipe } from 'angularlib/labels/translate.pipe';
+import { ChatComponent } from 'angularlib/chat/chat.component';
 
 @Component({
     selector: 'app-root',
@@ -35,6 +36,7 @@ import { TranslatePipe } from 'angularlib/labels/translate.pipe';
         Angularlib,
         NotificationModule,
         BusinessDataModule,
+        ChatComponent
     ],
     providers: [DatePipe, FISMessaging],
     templateUrl: './app.component.html',

+ 3 - 0
src/config/config.json

@@ -7,6 +7,9 @@
             "google": "https://api.swopt.com/auth/google"
         }
     },
+    "chat":{
+        "http":{"url":"https://n8n.swopt.com/webhook/236a2ba2-b147-4119-86a8-ee3a5ab30f4f"}
+    },
     "holidayCalendar": "https://api.swopt.com/data/h0/my/sar",
     "sessionTimeoutDuration":1800000
 }

+ 1 - 1
src/dependencies/angularlib

@@ -1 +1 @@
-Subproject commit b36c7d86364d8fba4874f7c2fabf426cf50e7ad5
+Subproject commit 2490c3a8d3c0b83958866cf7a6b255da53fda07d