mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-08 19:45:08 +00:00
(apps/chat) Fixed: Empty route related issues
This commit is contained in:
parent
8fd434600b
commit
f5cc14939c
|
@ -12,6 +12,7 @@ import { chatRoutes } from 'app/modules/admin/apps/chat/chat.routing';
|
||||||
import { ChatComponent } from 'app/modules/admin/apps/chat/chat.component';
|
import { ChatComponent } from 'app/modules/admin/apps/chat/chat.component';
|
||||||
import { ChatsComponent } from 'app/modules/admin/apps/chat/chats/chats.component';
|
import { ChatsComponent } from 'app/modules/admin/apps/chat/chats/chats.component';
|
||||||
import { ContactInfoComponent } from 'app/modules/admin/apps/chat/contact-info/contact-info.component';
|
import { ContactInfoComponent } from 'app/modules/admin/apps/chat/contact-info/contact-info.component';
|
||||||
|
import { EmptyConversationComponent } from 'app/modules/admin/apps/chat/empty-conversation/empty-conversation.component';
|
||||||
import { ConversationComponent } from 'app/modules/admin/apps/chat/conversation/conversation.component';
|
import { ConversationComponent } from 'app/modules/admin/apps/chat/conversation/conversation.component';
|
||||||
import { NewChatComponent } from 'app/modules/admin/apps/chat/new-chat/new-chat.component';
|
import { NewChatComponent } from 'app/modules/admin/apps/chat/new-chat/new-chat.component';
|
||||||
import { ProfileComponent } from 'app/modules/admin/apps/chat/profile/profile.component';
|
import { ProfileComponent } from 'app/modules/admin/apps/chat/profile/profile.component';
|
||||||
|
@ -22,6 +23,7 @@ import { ProfileComponent } from 'app/modules/admin/apps/chat/profile/profile.co
|
||||||
ChatsComponent,
|
ChatsComponent,
|
||||||
ContactInfoComponent,
|
ContactInfoComponent,
|
||||||
ConversationComponent,
|
ConversationComponent,
|
||||||
|
EmptyConversationComponent,
|
||||||
NewChatComponent,
|
NewChatComponent,
|
||||||
ProfileComponent
|
ProfileComponent
|
||||||
],
|
],
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { ChatChatResolver, ChatChatsResolver, ChatContactsResolver, ChatProfileR
|
||||||
import { ChatComponent } from 'app/modules/admin/apps/chat/chat.component';
|
import { ChatComponent } from 'app/modules/admin/apps/chat/chat.component';
|
||||||
import { ChatsComponent } from 'app/modules/admin/apps/chat/chats/chats.component';
|
import { ChatsComponent } from 'app/modules/admin/apps/chat/chats/chats.component';
|
||||||
import { ConversationComponent } from 'app/modules/admin/apps/chat/conversation/conversation.component';
|
import { ConversationComponent } from 'app/modules/admin/apps/chat/conversation/conversation.component';
|
||||||
|
import { EmptyConversationComponent } from 'app/modules/admin/apps/chat/empty-conversation/empty-conversation.component';
|
||||||
|
|
||||||
export const chatRoutes: Route[] = [
|
export const chatRoutes: Route[] = [
|
||||||
{
|
{
|
||||||
|
@ -20,15 +21,14 @@ export const chatRoutes: Route[] = [
|
||||||
children : [
|
children : [
|
||||||
{
|
{
|
||||||
path : '',
|
path : '',
|
||||||
|
component: EmptyConversationComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path : ':id',
|
||||||
component: ConversationComponent,
|
component: ConversationComponent,
|
||||||
children : [
|
resolve : {
|
||||||
{
|
conversation: ChatChatResolver
|
||||||
path : ':id',
|
}
|
||||||
resolve: {
|
|
||||||
conversation: ChatChatResolver
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
<div class="flex flex-col flex-auto overflow-y-auto lg:overflow-hidden bg-card dark:bg-default">
|
||||||
|
|
||||||
|
<!-- Select chat or start new template -->
|
||||||
|
<div class="flex flex-col flex-auto items-center justify-center bg-gray-100 dark:bg-transparent">
|
||||||
|
<mat-icon
|
||||||
|
class="icon-size-24"
|
||||||
|
[svgIcon]="'iconsmind:speach_bubble'"></mat-icon>
|
||||||
|
<div class="mt-4 text-2xl font-semibold tracking-tight text-secondary">Select a conversation or start a new chat</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
|
@ -0,0 +1,17 @@
|
||||||
|
import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector : 'chat-empty-conversation',
|
||||||
|
templateUrl : './empty-conversation.component.html',
|
||||||
|
encapsulation : ViewEncapsulation.None,
|
||||||
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
|
})
|
||||||
|
export class EmptyConversationComponent
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
|
constructor()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user