Added plugin cordova-plugin-filechooser
Added image button to new post screen
11
config.xml
|
@ -1,5 +1,5 @@
|
||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<widget id="com.monkeystew.goober-m" version="0.5.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
<widget id="com.monkeystew.goober_m" version="0.5.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||||
<name>Goober</name>
|
<name>Goober</name>
|
||||||
<description>Goober, a mobile app for pnut.io</description>
|
<description>Goober, a mobile app for pnut.io</description>
|
||||||
<author email="gilag@monkeystew.com" href="https://monkeystew.org">Morgan McMillian</author>
|
<author email="gilag@monkeystew.com" href="https://monkeystew.org">Morgan McMillian</author>
|
||||||
|
@ -85,12 +85,13 @@
|
||||||
<icon height="144" src="resources/icon-144.png" width="144" />
|
<icon height="144" src="resources/icon-144.png" width="144" />
|
||||||
</platform>
|
</platform>
|
||||||
<allow-navigation href="http://10.0.0.212:8100" />
|
<allow-navigation href="http://10.0.0.212:8100" />
|
||||||
<engine name="android" spec="^6.2.3" />
|
<engine name="android" spec="^7.0.0" />
|
||||||
<plugin name="cordova-plugin-console" spec="^1.0.5" />
|
<plugin name="cordova-plugin-console" spec="^1.0.5" />
|
||||||
<plugin name="cordova-plugin-device" spec="^1.1.4" />
|
<plugin name="cordova-plugin-device" spec="^2.0.1" />
|
||||||
<plugin name="cordova-plugin-inappbrowser" spec="^1.7.1" />
|
<plugin name="cordova-plugin-filechooser" spec="^1.0.1" />
|
||||||
|
<plugin name="cordova-plugin-inappbrowser" spec="^2.0.2" />
|
||||||
<plugin name="cordova-plugin-share-content" spec="^1.0.0" />
|
<plugin name="cordova-plugin-share-content" spec="^1.0.0" />
|
||||||
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
|
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
|
||||||
<plugin name="cordova-plugin-statusbar" spec="^2.2.2" />
|
<plugin name="cordova-plugin-statusbar" spec="^2.2.2" />
|
||||||
<plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
|
<plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
|
||||||
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
|
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
|
||||||
|
|
|
@ -21,16 +21,19 @@
|
||||||
"@angular/platform-browser": "5.2.5",
|
"@angular/platform-browser": "5.2.5",
|
||||||
"@angular/platform-browser-dynamic": "5.2.5",
|
"@angular/platform-browser-dynamic": "5.2.5",
|
||||||
"@ionic-native/core": "4.5.3",
|
"@ionic-native/core": "4.5.3",
|
||||||
|
"@ionic-native/file-chooser": "^4.5.3",
|
||||||
"@ionic-native/splash-screen": "4.5.3",
|
"@ionic-native/splash-screen": "4.5.3",
|
||||||
"@ionic-native/status-bar": "4.5.3",
|
"@ionic-native/status-bar": "4.5.3",
|
||||||
"@ionic/storage": "2.1.3",
|
"@ionic/storage": "2.1.3",
|
||||||
"cordova-android": "^7.0.0",
|
"cordova-android": "^7.0.0",
|
||||||
"cordova-plugin-console": "^1.0.5",
|
"cordova-plugin-console": "^1.0.5",
|
||||||
"cordova-plugin-device": "^2.0.1",
|
"cordova-plugin-device": "^2.0.1",
|
||||||
|
"cordova-plugin-filechooser": "^1.0.1",
|
||||||
"cordova-plugin-inappbrowser": "^2.0.2",
|
"cordova-plugin-inappbrowser": "^2.0.2",
|
||||||
"cordova-plugin-share-content": "^1.0.0",
|
"cordova-plugin-share-content": "^1.0.0",
|
||||||
"cordova-plugin-splashscreen": "^5.0.2",
|
"cordova-plugin-splashscreen": "^5.0.2",
|
||||||
"cordova-plugin-statusbar": "^2.2.2",
|
"cordova-plugin-statusbar": "^2.2.2",
|
||||||
|
"cordova-plugin-telerik-imagepicker": "^2.1.8",
|
||||||
"cordova-plugin-whitelist": "^1.3.1",
|
"cordova-plugin-whitelist": "^1.3.1",
|
||||||
"ionic-angular": "3.9.2",
|
"ionic-angular": "3.9.2",
|
||||||
"ionic-plugin-keyboard": "^2.2.1",
|
"ionic-plugin-keyboard": "^2.2.1",
|
||||||
|
@ -58,7 +61,8 @@
|
||||||
"cordova-plugin-whitelist": {},
|
"cordova-plugin-whitelist": {},
|
||||||
"ionic-plugin-keyboard": {},
|
"ionic-plugin-keyboard": {},
|
||||||
"cordova-plugin-inappbrowser": {},
|
"cordova-plugin-inappbrowser": {},
|
||||||
"cordova-plugin-share-content": {}
|
"cordova-plugin-share-content": {},
|
||||||
|
"cordova-plugin-filechooser": {}
|
||||||
},
|
},
|
||||||
"platforms": [
|
"platforms": [
|
||||||
"android"
|
"android"
|
||||||
|
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
1
resources/icon.png.md5
Normal file
|
@ -0,0 +1 @@
|
||||||
|
b72de713e098078c68cbffd6ab82439b
|
1
resources/splash.png.md5
Normal file
|
@ -0,0 +1 @@
|
||||||
|
7ce07128c050f41eb46a94eaddd55d4a
|
|
@ -12,6 +12,7 @@ import { StatusBar } from '@ionic-native/status-bar';
|
||||||
import { SplashScreen } from '@ionic-native/splash-screen';
|
import { SplashScreen } from '@ionic-native/splash-screen';
|
||||||
import { IonicStorageModule } from '@ionic/storage';
|
import { IonicStorageModule } from '@ionic/storage';
|
||||||
import { Device } from '@ionic-native/device';
|
import { Device } from '@ionic-native/device';
|
||||||
|
import { FileChooser } from '@ionic-native/file-chooser';
|
||||||
import { TimeagoPipe } from '../pipes/timeago/timeago';
|
import { TimeagoPipe } from '../pipes/timeago/timeago';
|
||||||
import { ParserPipe } from '../pipes/parser/parser';
|
import { ParserPipe } from '../pipes/parser/parser';
|
||||||
|
|
||||||
|
@ -46,6 +47,7 @@ import { ParserPipe } from '../pipes/parser/parser';
|
||||||
StatusBar,
|
StatusBar,
|
||||||
SplashScreen,
|
SplashScreen,
|
||||||
Device,
|
Device,
|
||||||
|
FileChooser,
|
||||||
{provide: ErrorHandler, useClass: IonicErrorHandler}
|
{provide: ErrorHandler, useClass: IonicErrorHandler}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { Component, ViewChild, ChangeDetectorRef } from '@angular/core';
|
||||||
import { ViewController, NavController, NavParams, ModalController, Content, ToastController, PopoverController } from 'ionic-angular';
|
import { ViewController, NavController, NavParams, ModalController, Content, ToastController, PopoverController } from 'ionic-angular';
|
||||||
import { ThreadPage } from '../thread/thread';
|
import { ThreadPage } from '../thread/thread';
|
||||||
import { Storage } from '@ionic/storage';
|
import { Storage } from '@ionic/storage';
|
||||||
|
import { FileChooser } from '@ionic-native/file-chooser';
|
||||||
import { Events } from 'ionic-angular';
|
import { Events } from 'ionic-angular';
|
||||||
|
|
||||||
import * as pnut from 'pnut-butter';
|
import * as pnut from 'pnut-butter';
|
||||||
|
@ -335,6 +336,11 @@ export class StreamPage {
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-card-content>
|
</ion-card-content>
|
||||||
<ion-row justify-content-end>
|
<ion-row justify-content-end>
|
||||||
|
<ion-col offset-0>
|
||||||
|
<button ion-button (click)="attachImage()">
|
||||||
|
<ion-icon name="image"></ion-icon>
|
||||||
|
</button>
|
||||||
|
</ion-col>
|
||||||
<ion-col col-2><div text-center>{{textCount()}}</div></ion-col>
|
<ion-col col-2><div text-center>{{textCount()}}</div></ion-col>
|
||||||
<ion-col col-2>
|
<ion-col col-2>
|
||||||
<button ion-button (click)="send()">
|
<button ion-button (click)="send()">
|
||||||
|
@ -356,7 +362,7 @@ export class NewPostModal {
|
||||||
raw: {type: string, value: Object}[] = [];
|
raw: {type: string, value: Object}[] = [];
|
||||||
|
|
||||||
constructor(public navParams: NavParams, public viewCtrl: ViewController, public toastCtrl: ToastController,
|
constructor(public navParams: NavParams, public viewCtrl: ViewController, public toastCtrl: ToastController,
|
||||||
public events: Events) {
|
private fileChooser: FileChooser, public events: Events) {
|
||||||
console.log(JSON.stringify(this.navParams));
|
console.log(JSON.stringify(this.navParams));
|
||||||
this.myUsername = navParams.data.me;
|
this.myUsername = navParams.data.me;
|
||||||
if (navParams.data.type === 'reply') {
|
if (navParams.data.type === 'reply') {
|
||||||
|
@ -449,6 +455,17 @@ export class NewPostModal {
|
||||||
}
|
}
|
||||||
return counttext
|
return counttext
|
||||||
}
|
}
|
||||||
|
|
||||||
|
attachImage() {
|
||||||
|
console.log('file chooser');
|
||||||
|
|
||||||
|
this.fileChooser.open().then(uri => {
|
||||||
|
console.log('File URI: ' + uri);
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|