diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 4076d6b..9fdb65d 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -10,6 +10,7 @@ import { NewPostModal } from '../pages/stream/new-post'; import { ThreadPage } from '../pages/thread/thread'; import { SettingsPage } from '../pages/settings/settings'; import { AboutPage } from '../pages/about/about'; +import { ProfilePage } from '../pages/profile/profile'; import { SplashScreen } from '@ionic-native/splash-screen'; import { IonicStorageModule } from '@ionic/storage'; @@ -28,6 +29,7 @@ import { ParserPipe } from '../pipes/parser/parser'; ThreadPage, SettingsPage, AboutPage, + ProfilePage, TimeagoPipe, NewPostModal, PostMenu, @@ -46,6 +48,7 @@ import { ParserPipe } from '../pipes/parser/parser'; ThreadPage, SettingsPage, AboutPage, + ProfilePage, NewPostModal, PostMenu ], diff --git a/src/pages/profile/profile.html b/src/pages/profile/profile.html new file mode 100644 index 0000000..eb9a0d6 --- /dev/null +++ b/src/pages/profile/profile.html @@ -0,0 +1,43 @@ + + + + + {{ user.username }} + + + + + + + + + + + + + +

{{ user.name }}

+

@{{ user.username }}

+ +
+ +

+ +

+ + + + + + + + + + + + diff --git a/src/pages/profile/profile.scss b/src/pages/profile/profile.scss new file mode 100644 index 0000000..6186185 --- /dev/null +++ b/src/pages/profile/profile.scss @@ -0,0 +1,14 @@ +page-profile { + .item-md ion-avatar img { + border-radius: 10px; + background-color: #e9e9e9; + } + .item-wp ion-avatar img { + border-radius: 10px; + background-color: #e9e9e9; + } + .item-ios ion-avatar img { + border-radius: 10px; + background-color: #e9e9e9; + } +} diff --git a/src/pages/profile/profile.ts b/src/pages/profile/profile.ts new file mode 100644 index 0000000..af51b5a --- /dev/null +++ b/src/pages/profile/profile.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { NavController, NavParams } from 'ionic-angular'; + +/** + * Generated class for the ProfilePage page. + * + * See https://ionicframework.com/docs/components/#navigation for more info on + * Ionic pages and navigation. + */ + +@Component({ + selector: 'page-profile', + templateUrl: 'profile.html', +}) +export class ProfilePage { + + private user: any; + + constructor(public navCtrl: NavController, public navParams: NavParams) { + this.user = this.navParams.data.user; + } + + ionViewDidLoad() { + console.log('ionViewDidLoad ProfilePage'); + } + +} diff --git a/src/pages/stream/stream.html b/src/pages/stream/stream.html index 0412d50..3626809 100644 --- a/src/pages/stream/stream.html +++ b/src/pages/stream/stream.html @@ -25,7 +25,7 @@ - +

{{ post.user.name }}

diff --git a/src/pages/stream/stream.scss b/src/pages/stream/stream.scss index 82c216c..07469da 100644 --- a/src/pages/stream/stream.scss +++ b/src/pages/stream/stream.scss @@ -1,14 +1,14 @@ page-stream { .item-md ion-avatar img { - border-radius: 0; + border-radius: 10px; background-color: #e9e9e9; } .item-wp ion-avatar img { - border-radius: 0; + border-radius: 10px; background-color: #e9e9e9; } .item-ios ion-avatar img { - border-radius: 0; + border-radius: 10px; background-color: #e9e9e9; } } diff --git a/src/pages/stream/stream.ts b/src/pages/stream/stream.ts index 9c825cc..065b291 100644 --- a/src/pages/stream/stream.ts +++ b/src/pages/stream/stream.ts @@ -4,6 +4,7 @@ import { ThreadPage } from '../thread/thread'; import { Storage } from '@ionic/storage'; import { Events } from 'ionic-angular'; import { LoginPage } from '../login/login'; +import { ProfilePage } from '../profile/profile'; import { PostMenu } from '../stream/post-menu'; import { NewPostModal } from '../stream/new-post'; @@ -311,6 +312,10 @@ export class StreamPage { window.open(url, '_blank'); } + showProfile(user) { + this.navCtrl.push(ProfilePage, {user: user}); + } + presentToast(text) { let toast = this.toastCtrl.create({ position: 'top',