diff --git a/src/pages/stream/post-menu.ts b/src/pages/stream/post-menu.ts
index 092b459..34d6a2b 100644
--- a/src/pages/stream/post-menu.ts
+++ b/src/pages/stream/post-menu.ts
@@ -12,6 +12,7 @@ import * as pnut from 'pnut-butter';
+
`
@@ -20,9 +21,11 @@ export class PostMenu {
showDelBtn: boolean = false;
showShareBtn: boolean = false;
+ postURL: string;
constructor(public navParams: NavParams, public viewCtrl: ViewController, public toastCtrl: ToastController,
public events: Events, private clipboardSrv: ClipboardService, private device: Device) {
+ this.postURL = 'https://posts.pnut.io/' + this.navParams.data.post.id;
if (navParams.data.me == navParams.data.post.user.username) {
this.showDelBtn = true;
} else {
@@ -34,7 +37,7 @@ export class PostMenu {
}
browse() {
- window.open('https://posts.pnut.io/' + this.navParams.data.post.id, '_system');
+ window.open(this.postURL, '_system');
this.close();
}
@@ -70,6 +73,12 @@ export class PostMenu {
return text;
}
+ copyPostURL() {
+ this.clipboardSrv.copyFromContent(this.postURL);
+ this.presentToast('Post link copied');
+ this.close();
+ }
+
delete() {
pnut.deletePost(this.navParams.data.post.id).then(res => {
console.log(res);