Added about page

This commit is contained in:
Morgan McMillian 2018-11-12 13:04:31 -08:00
parent 77db17acd4
commit 1da3eb3b98
6 changed files with 82 additions and 2 deletions

View file

@ -84,7 +84,6 @@
<icon height="110" src="resources/icon-110.png" width="110" />
<icon height="144" src="resources/icon-144.png" width="144" />
</platform>
<allow-navigation href="http://10.0.0.212:8100" />
<plugin name="cordova-plugin-filechooser" spec="^1.0.1" />
<plugin name="cordova-plugin-share-content" spec="^1.0.0" />
<plugin name="cordova-plugin-file" spec="^6.0.1" />

View file

@ -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);

View file

@ -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
],

View file

@ -0,0 +1,43 @@
<!--
Generated template for the AboutPage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>About</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<ion-row center>
<ion-col text-center>
<img src="assets/icon/icon.png" height="64" width="64">
</ion-col>
</ion-row>
<ion-row center>
<ion-col text-center>
<h1>Goober {{ version }}</h1>
</ion-col>
</ion-row>
<ion-row center>
<ion-col text-center>
<p>Goober is a cross platform mobile client for the
<a href="https://pnut.io" target="_blank">pnut.io</a> network written by
Morgan McMillian (<a href="https://pnut.io/@thrrgilag" target="_blank">@thrrgilag</a>).</p>
<p>Goober is free and open source software licensed under the
Apache License 2.0.</p>
<p><a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">
http://www.apache.org/licenses/LICENSE-2.0</a></p>
<p><button ion-button (click)="browse('https://gitlab.dreamfall.space/thrrgilag/Goober/wikis/home')">Project Site</button></p>
</ion-col>
</ion-row>
</ion-content>

View file

@ -0,0 +1,3 @@
page-about {
}

30
src/pages/about/about.ts Normal file
View file

@ -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');
}
}