mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 23:40:14 +01:00
appPicture pipe, feed component update
This commit is contained in:
parent
07b1aeb835
commit
d529265b37
6 changed files with 19 additions and 3 deletions
|
|
@ -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')
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@
|
|||
padding-top: 0;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none!important;
|
||||
}
|
||||
|
||||
.message-icon {
|
||||
cursor: pointer;
|
||||
width: 60px;
|
||||
|
|
|
|||
10
src/app/theme/pipes/appPicture/appPicture.pipe.ts
Normal file
10
src/app/theme/pipes/appPicture/appPicture.pipe.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
1
src/app/theme/pipes/appPicture/index.ts
Normal file
1
src/app/theme/pipes/appPicture/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from './appPicture.pipe.ts';
|
||||
|
|
@ -1 +1,2 @@
|
|||
export * from './profilePicture';
|
||||
export * from './appPicture';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue