|
@@ -1,6 +1,10 @@
|
|
|
import { Component } from '@angular/core';
|
|
import { Component } from '@angular/core';
|
|
|
import { Router } from '@angular/router';
|
|
import { Router } from '@angular/router';
|
|
|
-import { IonHeader, IonToolbar, IonTitle, IonContent, ModalController, IonButton } from '@ionic/angular/standalone';
|
|
|
|
|
|
|
+import { CommonModule } from '@angular/common';
|
|
|
|
|
+import { IonHeader, IonToolbar, IonTitle, IonContent, ModalController, IonButton,
|
|
|
|
|
+ IonCard, IonCardHeader, IonCardTitle, IonCardContent,
|
|
|
|
|
+ IonList, IonItem, IonLabel, IonAvatar, IonInput, IonIcon
|
|
|
|
|
+ } from '@ionic/angular/standalone';
|
|
|
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
|
|
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
|
|
|
import { ChatPanelOptions, FmChatModalInput, FmodeChat, FmodeChatMessage, openChatPanelModal } from 'fmode-ng';
|
|
import { ChatPanelOptions, FmChatModalInput, FmodeChat, FmodeChatMessage, openChatPanelModal } from 'fmode-ng';
|
|
|
// import { ModalAudioMessageComponent } from 'fmode-ng/lib/aigc/chat/chat-modal-input/modal-audio-message/modal-audio-message.component';
|
|
// import { ModalAudioMessageComponent } from 'fmode-ng/lib/aigc/chat/chat-modal-input/modal-audio-message/modal-audio-message.component';
|
|
@@ -14,12 +18,29 @@ import { ChatPanelOptions, FmChatModalInput, FmodeChat, FmodeChatMessage, openCh
|
|
|
IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent,
|
|
IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent,
|
|
|
IonButton,
|
|
IonButton,
|
|
|
// ASR语音输入模块
|
|
// ASR语音输入模块
|
|
|
- FmChatModalInput,
|
|
|
|
|
|
|
+ FmChatModalInput,
|
|
|
// ModalAudioMessageComponent
|
|
// ModalAudioMessageComponent
|
|
|
|
|
+ CommonModule, IonCard, IonCardHeader, IonCardTitle, IonCardContent,
|
|
|
|
|
+ IonList, IonItem, IonLabel, IonAvatar, IonInput, IonIcon
|
|
|
]
|
|
]
|
|
|
})
|
|
})
|
|
|
export class Tab3Page {
|
|
export class Tab3Page {
|
|
|
|
|
|
|
|
|
|
+ roles = [
|
|
|
|
|
+ { name: '角色一', description: '这是角色一的描述', avatar: 'assets/role1.png' },
|
|
|
|
|
+ { name: '角色二', description: '这是角色二的描述', avatar: 'assets/role2.png' },
|
|
|
|
|
+ { name: '角色三', description: '这是角色三的描述', avatar: 'assets/role3.png' },
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ startChat() {
|
|
|
|
|
+ this.router.navigate(['/chat']); // 跳转到聊天页面
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ startRoleChat(role: any) {
|
|
|
|
|
+ this.router.navigate(['/role-chat', { role: role.name }]); // 跳转到角色聊天页面
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
constructor(
|
|
constructor(
|
|
|
private modalCtrl:ModalController,
|
|
private modalCtrl:ModalController,
|
|
|
private router:Router,
|
|
private router:Router,
|