appPicture pipe, feed component update

This commit is contained in:
nixa 2016-05-05 17:35:23 +03:00
parent 07b1aeb835
commit d529265b37
6 changed files with 19 additions and 3 deletions

View file

@ -1,13 +1,13 @@
import {Component, ViewEncapsulation} from 'angular2/core';
import {ProfilePicturePipe} from '../../../theme/pipes';
import {ProfilePicturePipe, AppPicturePipe} from '../../../theme/pipes';
import {FeedService} from './feed.service';
@Component({
selector: 'feed',
encapsulation: ViewEncapsulation.None,
providers: [FeedService],
pipes: [ProfilePicturePipe],
pipes: [ProfilePicturePipe, AppPicturePipe],
styles: [require('./feed.scss')],
template: require('./feed.html')
})

View file

@ -16,7 +16,7 @@
</div>
<div class="preview" [ngClass]="{'hidden': !message.expanded}" *ngIf="message.preview">
<a href="{{ message.link }}" target="_blank">
<!--<img src="{{ ( message.preview | appImage )}}">-->
<img src="{{ ( message.preview | appPicture )}}">
</a>
</div>
<div [ngClass]="{'hidden': !message.expanded}" class="message-time">

View file

@ -16,6 +16,10 @@
padding-top: 0;
}
.hidden {
display: none!important;
}
.message-icon {
cursor: pointer;
width: 60px;

View file

@ -0,0 +1,10 @@
import {Pipe, PipeTransform} from 'angular2/core';
import {layoutPaths} from '../../../theme';
@Pipe({name: 'appPicture'})
export class AppPicturePipe implements PipeTransform {
transform(input:string, args:any[]):string {
return layoutPaths.images.root + input;
}
}

View file

@ -0,0 +1 @@
export * from './appPicture.pipe.ts';

View file

@ -1 +1,2 @@
export * from './profilePicture';
export * from './appPicture';