hide overflow for now and tweak the mention highlight yet again

This commit is contained in:
Morgan McMillian 2017-07-09 08:08:05 -07:00
parent 4174ec3fc6
commit 46ac23bb68
4 changed files with 40 additions and 8 deletions

View file

@ -4,7 +4,7 @@ import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';
import { LoginPage } from '../pages/login/login';
import { StreamPage, NewPostModal } from '../pages/stream/stream';
import { StreamPage, NewPostModal, PostMenu } from '../pages/stream/stream';
import { ThreadPage } from '../pages/thread/thread';
import { StatusBar } from '@ionic-native/status-bar';
@ -22,6 +22,7 @@ import { ParserPipe } from '../pipes/parser/parser';
ThreadPage,
TimeagoPipe,
NewPostModal,
PostMenu,
ParserPipe
],
imports: [
@ -35,7 +36,8 @@ import { ParserPipe } from '../pipes/parser/parser';
LoginPage,
StreamPage,
ThreadPage,
NewPostModal
NewPostModal,
PostMenu
],
providers: [
StatusBar,

View file

@ -82,11 +82,11 @@
<div *ngIf="post.counts.replies > 0">{{ post.counts.replies }}</div>
</button>
</ion-col>
<ion-col>
<button ion-button icon-left clear small block>
<!-- <ion-col>
<button ion-button icon-left clear small block (click)="presentPostMenu($event)">
<ion-icon name="more"></ion-icon>
</button>
</ion-col>
</ion-col> -->
</ion-row>
</ion-card>
</ion-list>

View file

@ -1,5 +1,5 @@
import { Component, ViewChild, ChangeDetectorRef } from '@angular/core';
import { ViewController, NavController, NavParams, ModalController, Content, ToastController } from 'ionic-angular';
import { ViewController, NavController, NavParams, ModalController, Content, ToastController, PopoverController } from 'ionic-angular';
import { ThreadPage } from '../thread/thread';
import * as pnut from 'pnut-butter';
@ -28,7 +28,7 @@ export class StreamPage {
showScrollBtn: boolean = false;
constructor(public navCtrl: NavController, public navParams: NavParams, public modalCtrl: ModalController,
private changeDetectorRef: ChangeDetectorRef, public toastCtrl: ToastController) {
private changeDetectorRef: ChangeDetectorRef, public toastCtrl: ToastController, public popoverCtrl: PopoverController) {
// console.log(JSON.stringify(navParams));
switch (navParams.data.stream) {
@ -263,6 +263,13 @@ export class StreamPage {
toast.present();
}
presentPostMenu(myEvent) {
let popover = this.popoverCtrl.create(PostMenu);
popover.present({
ev: myEvent
});
}
scrollToTop() {
this.content.scrollToTop();
}
@ -373,3 +380,26 @@ export class NewPostModal {
}
}
}
@Component({
template: `
<ion-list>
<button ion-item disabled (click)="close()">Share</button>
<button ion-item *ngIf="showDelBtn" (click)="close()">Delete</button>
</ion-list>
`
})
export class PostMenu {
showDelBtn: boolean = false;
constructor(public navParams: NavParams, public viewCtrl: ViewController) {}
// buttonState() {
// return this.showDelBtn ? _.state : _;
// }
close() {
this.viewCtrl.dismiss();
}
}

View file

@ -29,7 +29,7 @@ $colors: (
danger: #f53d3d,
light: #f4f4f4,
dark: #222,
mention: #fffde7
mention: #f0f0f0
);