add action to open post in browser resolves issue #65

This commit is contained in:
Morgan McMillian 2018-07-07 08:16:41 -07:00
parent 43a8e0c43b
commit 749281d959

View file

@ -563,6 +563,7 @@ export class NewPostModal {
@Component({ @Component({
template: ` template: `
<ion-list> <ion-list>
<button ion-item (click)="browse()">Open in Browser</button>
<button ion-item (click)="share()">Share</button> <button ion-item (click)="share()">Share</button>
<button ion-item *ngIf="showDelBtn" (click)="delete()">Delete</button> <button ion-item *ngIf="showDelBtn" (click)="delete()">Delete</button>
</ion-list> </ion-list>
@ -581,6 +582,11 @@ export class PostMenu {
} }
} }
browse() {
window.open('https://posts.pnut.io/' + this.navParams.data.post.id, '_system');
this.close();
}
share() { share() {
(<any>window).shareContentPlugin.share(this.navParams.data.post.content.text, function(e) { (<any>window).shareContentPlugin.share(this.navParams.data.post.content.text, function(e) {
console.log('sharing post:'); console.log('sharing post:');