From 1da3eb3b9800b9e0d842d10dfce2e2bd4779e202 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Mon, 12 Nov 2018 13:04:31 -0800 Subject: [PATCH] Added about page --- config.xml | 1 - src/app/app.component.ts | 4 +++- src/app/app.module.ts | 3 +++ src/pages/about/about.html | 43 ++++++++++++++++++++++++++++++++++++++ src/pages/about/about.scss | 3 +++ src/pages/about/about.ts | 30 ++++++++++++++++++++++++++ 6 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 src/pages/about/about.html create mode 100644 src/pages/about/about.scss create mode 100644 src/pages/about/about.ts diff --git a/config.xml b/config.xml index 1cb6758..44564b1 100644 --- a/config.xml +++ b/config.xml @@ -84,7 +84,6 @@ - diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 613d0ed..ceca7eb 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -7,6 +7,7 @@ import { Device } from '@ionic-native/device'; import { LoginPage } from '../pages/login/login'; import { StreamPage } from '../pages/stream/stream'; import { SettingsPage } from '../pages/settings/settings'; +import { AboutPage } from '../pages/about/about'; import * as pnut from 'pnut-butter'; @@ -33,6 +34,7 @@ export class MyApp { { title: 'Global', component: StreamPage, params: {stream: 'global'} }, { title: 'Bookmarks', component: StreamPage, params: {stream: 'bookmarks'} }, { title: 'Settings', component: SettingsPage, params: {}}, + { title: 'About', component: AboutPage, params: {}}, { title: 'Logout', component: {}, params: {}}, ]; @@ -93,7 +95,7 @@ export class MyApp { // this.storage.remove('token'); this.storage.clear(); this.nav.setRoot(LoginPage, {'scope': this.scope}); - } else if (page.title === 'Settings') { + } else if (page.title === 'Settings' || page.title === 'About') { this.nav.push(page.component, page.params); } else { this.nav.setRoot(page.component, page.params); diff --git a/src/app/app.module.ts b/src/app/app.module.ts index c4bff4b..4076d6b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -9,6 +9,7 @@ import { PostMenu } from '../pages/stream/post-menu'; 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 { SplashScreen } from '@ionic-native/splash-screen'; import { IonicStorageModule } from '@ionic/storage'; @@ -26,6 +27,7 @@ import { ParserPipe } from '../pipes/parser/parser'; StreamPage, ThreadPage, SettingsPage, + AboutPage, TimeagoPipe, NewPostModal, PostMenu, @@ -43,6 +45,7 @@ import { ParserPipe } from '../pipes/parser/parser'; StreamPage, ThreadPage, SettingsPage, + AboutPage, NewPostModal, PostMenu ], diff --git a/src/pages/about/about.html b/src/pages/about/about.html new file mode 100644 index 0000000..f9dad10 --- /dev/null +++ b/src/pages/about/about.html @@ -0,0 +1,43 @@ + + + + + About + + + + + + + + + + + + + + + +

Goober {{ version }}

+
+
+ + + +

Goober is a cross platform mobile client for the + pnut.io network written by + Morgan McMillian (@thrrgilag).

+

Goober is free and open source software licensed under the + Apache License 2.0.

+

+ http://www.apache.org/licenses/LICENSE-2.0

+

+
+
+ +
diff --git a/src/pages/about/about.scss b/src/pages/about/about.scss new file mode 100644 index 0000000..639956d --- /dev/null +++ b/src/pages/about/about.scss @@ -0,0 +1,3 @@ +page-about { + +} diff --git a/src/pages/about/about.ts b/src/pages/about/about.ts new file mode 100644 index 0000000..c49ca45 --- /dev/null +++ b/src/pages/about/about.ts @@ -0,0 +1,30 @@ +import { Component } from '@angular/core'; +import { NavController, NavParams } from 'ionic-angular'; + +/** + * Generated class for the AboutPage page. + * + * See https://ionicframework.com/docs/components/#navigation for more info on + * Ionic pages and navigation. + */ + +@Component({ + selector: 'page-about', + templateUrl: 'about.html', +}) +export class AboutPage { + + private version: string = '0.6.3'; + + constructor(public navCtrl: NavController, public navParams: NavParams) { + } + + ionViewDidLoad() { + console.log('ionViewDidLoad AboutPage'); + } + + browse(url) { + window.open(url, '_blank'); + } + +}