mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 08:20:13 +01:00
msgCenter -> baMsgCenter
This commit is contained in:
parent
e125febda6
commit
12a1056c12
9 changed files with 41 additions and 17 deletions
|
|
@ -0,0 +1,23 @@
|
||||||
|
import {Component} from '@angular/core';
|
||||||
|
|
||||||
|
import {BaMsgCenterService} from './baMsgCenter.service';
|
||||||
|
import {BaProfilePicturePipe} from '../../pipes';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'msg-center',
|
||||||
|
providers: [BaMsgCenterService],
|
||||||
|
styles: [require('./baMsgCenter.scss')],
|
||||||
|
template: require('./baMsgCenter.html'),
|
||||||
|
pipes: [BaProfilePicturePipe]
|
||||||
|
})
|
||||||
|
export class BaMsgCenter {
|
||||||
|
|
||||||
|
public notifications:Array<Object>;
|
||||||
|
public messages:Array<Object>;
|
||||||
|
|
||||||
|
constructor(private _baMsgCenterService:BaMsgCenterService) {
|
||||||
|
this.notifications = this._baMsgCenterService.getNotifications();
|
||||||
|
this.messages = this._baMsgCenterService.getMessages();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,16 +1,9 @@
|
||||||
import {Component} from '@angular/core';
|
import {Injectable} from '@angular/core'
|
||||||
|
|
||||||
import {BaProfilePicturePipe} from '../../pipes';
|
@Injectable()
|
||||||
|
export class BaMsgCenterService {
|
||||||
|
|
||||||
@Component({
|
private _notifications = [
|
||||||
selector: 'msg-center',
|
|
||||||
styles: [require('./msgCenter.scss')],
|
|
||||||
template: require('./msgCenter.html'),
|
|
||||||
pipes: [BaProfilePicturePipe]
|
|
||||||
})
|
|
||||||
export class MsgCenter {
|
|
||||||
|
|
||||||
notifications = [
|
|
||||||
{
|
{
|
||||||
name: 'Vlad',
|
name: 'Vlad',
|
||||||
text: 'Vlad posted a new article.',
|
text: 'Vlad posted a new article.',
|
||||||
|
|
@ -48,7 +41,7 @@ export class MsgCenter {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
messages = [
|
private _messages = [
|
||||||
{
|
{
|
||||||
name: 'Nasta',
|
name: 'Nasta',
|
||||||
text: 'After you get up and running, you can place Font Awesome icons just about...',
|
text: 'After you get up and running, you can place Font Awesome icons just about...',
|
||||||
|
|
@ -85,4 +78,12 @@ export class MsgCenter {
|
||||||
time: '1 week ago'
|
time: '1 week ago'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public getMessages():Array<Object> {
|
||||||
|
return this._messages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public getNotifications():Array<Object> {
|
||||||
|
return this._notifications;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
1
src/app/theme/components/baMsgCenter/index.ts
Normal file
1
src/app/theme/components/baMsgCenter/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './baMsgCenter.component.ts';
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
export * from './pageTop';
|
export * from './pageTop';
|
||||||
export * from './msgCenter';
|
export * from './baMsgCenter';
|
||||||
export * from './sidebar';
|
export * from './sidebar';
|
||||||
export * from './baContentTop';
|
export * from './baContentTop';
|
||||||
export * from './baCard';
|
export * from './baCard';
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export * from './msgCenter.component.ts';
|
|
||||||
|
|
@ -2,14 +2,14 @@ import {Component, ViewEncapsulation} from '@angular/core';
|
||||||
|
|
||||||
import {AppState} from '../../../app.state';
|
import {AppState} from '../../../app.state';
|
||||||
import {BaProfilePicturePipe} from '../../pipes';
|
import {BaProfilePicturePipe} from '../../pipes';
|
||||||
import {MsgCenter} from '../../components/msgCenter';
|
import {BaMsgCenter} from '../../components/baMsgCenter';
|
||||||
import {BaScrollPosition} from '../../directives';
|
import {BaScrollPosition} from '../../directives';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'page-top',
|
selector: 'page-top',
|
||||||
styles: [require('./pageTop.scss')],
|
styles: [require('./pageTop.scss')],
|
||||||
template: require('./pageTop.html'),
|
template: require('./pageTop.html'),
|
||||||
directives: [MsgCenter, BaScrollPosition],
|
directives: [BaMsgCenter, BaScrollPosition],
|
||||||
pipes: [BaProfilePicturePipe],
|
pipes: [BaProfilePicturePipe],
|
||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
@import '../../sass/conf/conf';
|
@import '../../sass/conf/conf';
|
||||||
@import '../../components/msgCenter/msgCenter';
|
@import '../../components/baMsgCenter/baMsgCenter';
|
||||||
|
|
||||||
.page-top {
|
.page-top {
|
||||||
background-color: $sidebar;
|
background-color: $sidebar;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue