|
@@ -1,24 +1,18 @@
|
|
|
-<ion-header [translucent]="true">
|
|
|
- <ion-toolbar>
|
|
|
- <ion-title>ai-chat</ion-title>
|
|
|
+<ion-header>
|
|
|
+ <ion-toolbar class="title">
|
|
|
+ <ion-title >历史聊天</ion-title>
|
|
|
</ion-toolbar>
|
|
|
</ion-header>
|
|
|
|
|
|
-<ion-content [fullscreen]="true">
|
|
|
- <ion-header collapse="condense">
|
|
|
- <ion-toolbar>
|
|
|
- <ion-title size="large">Chat</ion-title>
|
|
|
- </ion-toolbar>
|
|
|
- </ion-header>
|
|
|
-
|
|
|
+<ion-content [fullscreen]="true" class="history">
|
|
|
<!-- Displaying chat history -->
|
|
|
<div *ngIf="chatHistory.length > 0; else noChats">
|
|
|
<ion-list>
|
|
|
<ion-item *ngFor="let chat of chatHistory" (click)="goToChat(chat.chatId)" class="chat-item">
|
|
|
<div class="avatar">{{ chat.username[0].toUpperCase() }}</div>
|
|
|
<ion-label>
|
|
|
- <h2>{{ chat.username }}</h2>
|
|
|
- <p>{{ chat.userChat }}</p>
|
|
|
+ <h2>{{ chat.userChat.slice(0,18) }}</h2>
|
|
|
+ <p>{{ chat.aiChat.slice(0,18) }}</p>
|
|
|
</ion-label>
|
|
|
</ion-item>
|
|
|
</ion-list>
|