diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index db3b417bf..69db837c9 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -223,6 +223,10 @@ const routes = [ path: 'custom-image-cache', loadChildren: () => import('./services/file/custom-image-cache/custom-image-cache.module').then( m => m.CustomImageCachePageModule) }, + { + path: 'view-media', + loadChildren: () => import('./modals/view-media/view-media.module').then( m => m.ViewMediaPageModule) + }, diff --git a/src/app/modals/view-media/view-media-routing.module.ts b/src/app/modals/view-media/view-media-routing.module.ts new file mode 100644 index 000000000..e21bc8eb9 --- /dev/null +++ b/src/app/modals/view-media/view-media-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { ViewMediaPage } from './view-media.page'; + +const routes: Routes = [ + { + path: '', + component: ViewMediaPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class ViewMediaPageRoutingModule {} diff --git a/src/app/modals/view-media/view-media.module.ts b/src/app/modals/view-media/view-media.module.ts new file mode 100644 index 000000000..7a78f5148 --- /dev/null +++ b/src/app/modals/view-media/view-media.module.ts @@ -0,0 +1,22 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { ViewMediaPageRoutingModule } from './view-media-routing.module'; + +import { ViewMediaPage } from './view-media.page'; +import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + FontAwesomeModule, + ViewMediaPageRoutingModule + ], + declarations: [ViewMediaPage] +}) +export class ViewMediaPageModule {} diff --git a/src/app/modals/view-media/view-media.page.html b/src/app/modals/view-media/view-media.page.html new file mode 100644 index 000000000..75b8f918e --- /dev/null +++ b/src/app/modals/view-media/view-media.page.html @@ -0,0 +1,22 @@ + +
+
+ +
+
+
+ {{name}}, {{_updatedAt | date}} + +
+
+
+
+ +
+
+ +
+
+
diff --git a/src/app/modals/view-media/view-media.page.scss b/src/app/modals/view-media/view-media.page.scss new file mode 100644 index 000000000..527acab31 --- /dev/null +++ b/src/app/modals/view-media/view-media.page.scss @@ -0,0 +1,70 @@ +.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 5px 20px; + color:#000; + transform: translate3d(0, 1px, 0); + + .left{ + width: fit-content; + float: left; + //font-size: 35px; + overflow: hidden; + + .header-top-btn{ + background: transparent; + font-size: 25px !important; + font-weight: 100 !important; + /* color: #0782c9; */ + color: #42b9fe; + } + } + + .middle-container{ + overflow: auto; + width:calc(100% - 45px); + height: auto; + + .middle{ + padding: 0!important; + float: left; + width:calc(100% - 77px); + margin: 0px 0 0 10px; + display: flex; + align-items: center; + + .title{ + font-size: 25px; + white-space: nowrap; + overflow: hidden !important; + text-overflow: ellipsis !important; + float: left; + } + } + } +} + +.media { + background-color: #ebebeb; + padding: 10px !important; + height: 100% !important; + overflow: auto !important; + + .media-content{ + height: 100% !important; + overflow: auto !important; + img{ + width: fit-content !important; + height: 100% !important; + } + } +} + + + + diff --git a/src/app/modals/view-media/view-media.page.spec.ts b/src/app/modals/view-media/view-media.page.spec.ts new file mode 100644 index 000000000..8759d3bdb --- /dev/null +++ b/src/app/modals/view-media/view-media.page.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { ViewMediaPage } from './view-media.page'; + +describe('ViewMediaPage', () => { + let component: ViewMediaPage; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ ViewMediaPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(ViewMediaPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/modals/view-media/view-media.page.ts b/src/app/modals/view-media/view-media.page.ts new file mode 100644 index 000000000..a5754085b --- /dev/null +++ b/src/app/modals/view-media/view-media.page.ts @@ -0,0 +1,30 @@ +import { Component, OnInit } from '@angular/core'; +import { ModalController, NavParams } from '@ionic/angular'; + +@Component({ + selector: 'app-view-media', + templateUrl: './view-media.page.html', + styleUrls: ['./view-media.page.scss'], +}) +export class ViewMediaPage implements OnInit { + + image: any; + name: string + _updatedAt: string + + constructor( + private modalController: ModalController, + private navParams:NavParams, + ) { + this.image = this.navParams.get('image') + this.name = this.navParams.get('username') + this._updatedAt = this.navParams.get('_updatedAt') + } + + ngOnInit() { + } + + close(){ + this.modalController.dismiss() + } +} diff --git a/src/app/pages/chat/messages/messages.page.html b/src/app/pages/chat/messages/messages.page.html index cf14f59d9..c90e3e349 100644 --- a/src/app/pages/chat/messages/messages.page.html +++ b/src/app/pages/chat/messages/messages.page.html @@ -60,7 +60,9 @@ {{msg.msg}}
- image +
+ image +
@@ -138,7 +140,7 @@ -->
- +