diff --git a/projects/common/src/fm/common.module.ts b/projects/common/src/fm/common.module.ts index 6076215..674f959 100644 --- a/projects/common/src/fm/common.module.ts +++ b/projects/common/src/fm/common.module.ts @@ -33,6 +33,7 @@ import { MenuBackgroundComponent } from './components/menu-background/menu-backg import { HasPackageDirective} from './components/has-package/has-package.directive'; import { HasClaimDirective} from './components/has-claim/has-claim.directive'; import { UserMenuComponent} from './components/user-menu/user-menu.component'; +import { ThumbnailComponent } from './components/thumbnail/thumbnail.component'; import { Alert } from './enumerations/alert.enum'; import { IEventMessage } from './models/event.message'; import { IItem, Item } from './models/item'; @@ -71,6 +72,7 @@ export { TimespanComponent, TagInputComponent, UserMenuComponent, + ThumbnailComponent, HasPackageDirective, HasClaimDirective, Alert, @@ -133,7 +135,8 @@ export { GradientSelectComponent, AppMenuComponent, NotificationMenuComponent, - BackButtonComponent + BackButtonComponent, + ThumbnailComponent ], exports: [ NgbModule, @@ -156,7 +159,8 @@ export { UserMenuComponent, GradientComponent, GradientSelectComponent, - BackButtonComponent + BackButtonComponent, + ThumbnailComponent ] }) export class AppCommonModule { diff --git a/projects/common/src/fm/components/thumbnail/thumbnail.component.html b/projects/common/src/fm/components/thumbnail/thumbnail.component.html new file mode 100644 index 0000000..16a806e --- /dev/null +++ b/projects/common/src/fm/components/thumbnail/thumbnail.component.html @@ -0,0 +1,6 @@ +
+ +
+ +
+
\ No newline at end of file diff --git a/projects/common/src/fm/components/thumbnail/thumbnail.component.scss b/projects/common/src/fm/components/thumbnail/thumbnail.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/projects/common/src/fm/components/thumbnail/thumbnail.component.ts b/projects/common/src/fm/components/thumbnail/thumbnail.component.ts new file mode 100644 index 0000000..9163846 --- /dev/null +++ b/projects/common/src/fm/components/thumbnail/thumbnail.component.ts @@ -0,0 +1,22 @@ +import { Component,Input } from '@angular/core'; +import { Store } from '@ngrx/store'; +import { IItem } from '../../models/item'; +import { commonReducers,ItemTypeService } from '../../../public-api' + +@Component({ + selector: 'fm-thumbnail', + templateUrl: 'thumbnail.component.html', + styleUrls: ['thumbnail.component.scss'] + }) + + + export class ThumbnailComponent { + @Input() public item: IItem; + + constructor(public store: Store, public itemTypeService: ItemTypeService) { + } + + getThumbnailUrl(item:IItem):string { + return item.url+'/thumbnail?v=' + Date.parse(item.updated); + } + } \ No newline at end of file