diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index def598b45..7fd5e228a 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,24 +1,26 @@ -import { NgModule } from '@angular/core'; -import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; - -const routes: Routes = [ - { - path: '', - loadChildren: () => import('./index/index.module').then(m => m.IndexPageModule) - }, - { - path: '', - loadChildren: () => import('./home/home.module').then( m => m.HomePageModule) - }, { - path: 'messages', - loadChildren: () => import('./shared/chat/messages/messages.module').then( m => m.MessagesPageModule) - } +import { NgModule } from '@angular/core'; +import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; +import { MessagesPage } from './pages/chat/messages/messages.page'; -]; -@NgModule({ - imports: [ - RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) - ], - exports: [RouterModule] -}) -export class AppRoutingModule {} +const routes: Routes = [ + { + path: '', + loadChildren: () => import('./index/index.module').then(m => m.IndexPageModule) + }, + { + path: '', + loadChildren: () => import('./home/home.module').then( m => m.HomePageModule) + }, + /* { + path: 'messages', + component: MessagesPage + } */ + +]; +@NgModule({ + imports: [ + RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) + ], + exports: [RouterModule] +}) +export class AppRoutingModule {} diff --git a/src/app/home/home-routing.module.ts b/src/app/home/home-routing.module.ts index 203119606..63aeaa50a 100644 --- a/src/app/home/home-routing.module.ts +++ b/src/app/home/home-routing.module.ts @@ -1,6 +1,9 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { HomeGuard } from '../guards/home.guard'; +import { GroupMessagesPage } from '../pages/chat/group-messages/group-messages.page'; +import { MessagesPage } from '../pages/chat/messages/messages.page'; +import { TestPage } from '../pages/chat/test/test.page'; import { UserDataResolver } from '../resolvers/userData.resolver'; import { HomePage } from './home.page'; @@ -150,7 +153,28 @@ const routes: Routes = [ { path:'', loadChildren: ()=> import('../pages/chat/chat.module').then(m => m.ChatPageModule) - } + }, + { + path:'messages', + children: [ + { + path:'', + outlet:'message', + loadChildren: ()=> import('../pages/chat/messages/messages.module').then(m => m.MessagesPageModule) + }, + ] + }, + /* { + path:'messages', + outlet:'message', + component: MessagesPage + }, */ + { + path:'test', + outlet:'test', + component: TestPage + }, + ] }, ] diff --git a/src/app/pages/chat/chat-routing.module.ts b/src/app/pages/chat/chat-routing.module.ts index 7e318d35b..da6f2db29 100644 --- a/src/app/pages/chat/chat-routing.module.ts +++ b/src/app/pages/chat/chat-routing.module.ts @@ -1,13 +1,28 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { ChatPage } from './chat.page'; - -const routes: Routes = [ - { - path: '', - component: ChatPage - }, { +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { ChatPage } from './chat.page'; +import { GroupMessagesPage } from './group-messages/group-messages.page'; +import { MessagesPage } from './messages/messages.page'; + +const routes: Routes = [ + { + path: '', + component: ChatPage, + children: [ + { + path:'messages', + outlet:'message', + component: MessagesPage + }, + { + path:'groups', + outlet:'group', + component: GroupMessagesPage + }, + ] + }, + { path: 'conversation', loadChildren: () => import('./conversation/conversation.module').then( m => m.ConversationPageModule) }, @@ -30,12 +45,17 @@ const routes: Routes = [ { path: 'edit-group', loadChildren: () => import('./edit-group/edit-group.module').then( m => m.EditGroupPageModule) + }, + { + path: 'test', + outlet:'test', + loadChildren: () => import('./test/test.module').then( m => m.TestPageModule) } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class ChatPageRoutingModule {} +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class ChatPageRoutingModule {} diff --git a/src/app/pages/chat/chat.module.ts b/src/app/pages/chat/chat.module.ts index d4f756504..7fcc73c71 100644 --- a/src/app/pages/chat/chat.module.ts +++ b/src/app/pages/chat/chat.module.ts @@ -8,6 +8,7 @@ import { ChatPageRoutingModule } from './chat-routing.module'; import { ChatPage } from './chat.page'; import { SharedModule } from 'src/app/shared/shared.module'; +import { RouterModule } from '@angular/router'; @NgModule({ imports: [ @@ -16,6 +17,7 @@ import { SharedModule } from 'src/app/shared/shared.module'; IonicModule, SharedModule, ChatPageRoutingModule, + RouterModule, ], declarations: [ChatPage], schemas: [CUSTOM_ELEMENTS_SCHEMA] diff --git a/src/app/pages/chat/chat.page.scss b/src/app/pages/chat/chat.page.scss index 1969c6ff5..cb800df51 100644 --- a/src/app/pages/chat/chat.page.scss +++ b/src/app/pages/chat/chat.page.scss @@ -4,44 +4,35 @@ ion-content{ :host{ background: #0782c9; } -.main-header{ - width: 100%; /* 400px */ - height: 100%; - font-family: Roboto; - border-top-left-radius: 25px; - border-top-right-radius: 25px; - background-color: #fff; - overflow:hidden; - padding: 30px 20px 0px 20px; - color:#000; - transform: translate3d(0, 1px, 0); - + .title-content{ - width: 360px; - margin: 0px auto; + width: 100%; + margin-bottom: 15px; overflow: auto; padding: 0 !important; background: #fff; + + .div-title{ + padding: 0!important; + float: left; + } + .title{ + font-size: 25px; + } + .div-icon{ + width: 60%; + float: right; + font-size: 35px; + overflow: auto; + padding: 1px; + } + .div-icon ion-icon{ + float: right; + padding-left: 20px; + } } - .div-title{ - padding: 0!important; - float: left; - } - .title{ - font-size: 25px; - } - .div-icon{ - width: 112px; - float: right; - font-size: 35px; - overflow: auto; - padding: 1px; - } - .div-icon ion-icon{ - float: right; - padding-left: 20px; - } -} + + .main-content{ width: 100%; height: 100%; @@ -49,12 +40,13 @@ ion-content{ margin: 0 auto; background-color: #fff; overflow:auto; - padding: 15px 20px 0 20px; + padding: 30px 20px 0 20px; border-top-left-radius: 25px; border-top-right-radius: 25px; .aside-wrapper{ - justify-content: flex-start !important; + padding: 0 !important; + margin: 0 !important; } .iconschatnew-group{ @@ -121,11 +113,8 @@ ion-content{ .aside-wrapper{ width: 40%; - border: 1px solid red; .aside-title{ - text-align: left; font-size: 25px; - } } .aside{ diff --git a/src/app/pages/chat/test/test-routing.module.ts b/src/app/pages/chat/test/test-routing.module.ts new file mode 100644 index 000000000..7f8abfd58 --- /dev/null +++ b/src/app/pages/chat/test/test-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { TestPage } from './test.page'; + +const routes: Routes = [ + { + path: '', + component: TestPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class TestPageRoutingModule {} diff --git a/src/app/pages/chat/test/test.module.ts b/src/app/pages/chat/test/test.module.ts new file mode 100644 index 000000000..ce5e6f2ad --- /dev/null +++ b/src/app/pages/chat/test/test.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { TestPageRoutingModule } from './test-routing.module'; + +import { TestPage } from './test.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + TestPageRoutingModule + ], + declarations: [TestPage] +}) +export class TestPageModule {} diff --git a/src/app/pages/chat/test/test.page.html b/src/app/pages/chat/test/test.page.html new file mode 100644 index 000000000..53118ae47 --- /dev/null +++ b/src/app/pages/chat/test/test.page.html @@ -0,0 +1,9 @@ + + + test + + + + + + diff --git a/src/app/pages/chat/test/test.page.scss b/src/app/pages/chat/test/test.page.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/pages/chat/test/test.page.spec.ts b/src/app/pages/chat/test/test.page.spec.ts new file mode 100644 index 000000000..d721f93a1 --- /dev/null +++ b/src/app/pages/chat/test/test.page.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { TestPage } from './test.page'; + +describe('TestPage', () => { + let component: TestPage; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ TestPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(TestPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/chat/test/test.page.ts b/src/app/pages/chat/test/test.page.ts new file mode 100644 index 000000000..d91f99324 --- /dev/null +++ b/src/app/pages/chat/test/test.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-test', + templateUrl: './test.page.html', + styleUrls: ['./test.page.scss'], +}) +export class TestPage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/pages/events/events.page.html b/src/app/pages/events/events.page.html index a21ed4f54..b75a20e64 100644 --- a/src/app/pages/events/events.page.html +++ b/src/app/pages/events/events.page.html @@ -55,9 +55,11 @@
+