mirror of https://github.com/Squidex/squidex.git
10 changed files with 108 additions and 78 deletions
@ -0,0 +1,14 @@ |
|||
<ng-container *ngIf="events"> |
|||
<div *ngFor="let event of events" class="event row no-gutters"> |
|||
<div class="col col-auto"> |
|||
<img class="user-picture" [attr.title]="event.actor | sqxUserNameRef:null" [attr.src]="event.actor | sqxUserPictureRef" /> |
|||
</div> |
|||
<div class="col pl-2"> |
|||
<div class="event-message"> |
|||
<span class="user-ref">{{event.actor | sqxUserNameRef:null}}</span> |
|||
<span [innerHTML]="format(event.message) | async"></span> |
|||
</div> |
|||
<div class="event-created">{{event.created | sqxFromNow}}</div> |
|||
</div> |
|||
</div> |
|||
</ng-container> |
|||
@ -0,0 +1,29 @@ |
|||
@import '_vars'; |
|||
@import '_mixins'; |
|||
|
|||
:host /deep/ { |
|||
.user-ref { |
|||
color: $color-title; |
|||
} |
|||
|
|||
.marker-ref { |
|||
color: $color-title; |
|||
} |
|||
} |
|||
|
|||
.user-picture { |
|||
margin-top: .25rem; |
|||
} |
|||
|
|||
.event { |
|||
& { |
|||
color: $color-text-decent; |
|||
font-size: .9rem; |
|||
font-weight: normal; |
|||
margin-bottom: 1.5rem; |
|||
} |
|||
|
|||
&-created { |
|||
font-size: .75rem; |
|||
} |
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
/* |
|||
* Squidex Headless CMS |
|||
* |
|||
* @license |
|||
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. |
|||
*/ |
|||
|
|||
import { Component, Input } from '@angular/core'; |
|||
import { Observable } from 'rxjs'; |
|||
|
|||
import { |
|||
formatHistoryMessage, |
|||
HistoryEventDto, |
|||
UsersProviderService |
|||
} from '@app/shared/internal'; |
|||
|
|||
@Component({ |
|||
selector: 'sqx-history-list', |
|||
styleUrls: ['./history-list.component.scss'], |
|||
templateUrl: './history-list.component.html' |
|||
}) |
|||
export class HistoryListComponent { |
|||
@Input() |
|||
public events: HistoryEventDto; |
|||
|
|||
constructor( |
|||
private readonly users: UsersProviderService |
|||
) { |
|||
} |
|||
|
|||
public format(message: string): Observable<string> { |
|||
return formatHistoryMessage(message, this.users); |
|||
} |
|||
|
|||
public trackByEvent(index: number, event: HistoryEventDto) { |
|||
return event.eventId; |
|||
} |
|||
} |
|||
@ -1,25 +1,2 @@ |
|||
@import '_vars'; |
|||
@import '_mixins'; |
|||
|
|||
.event { |
|||
& { |
|||
@include flex-box; |
|||
margin-bottom: 1rem; |
|||
} |
|||
|
|||
&-main { |
|||
@include flex-grow(1); |
|||
} |
|||
|
|||
&-left { |
|||
min-width: 2.8rem; |
|||
max-width: 2.8rem; |
|||
margin-top: .25rem; |
|||
} |
|||
|
|||
&-created { |
|||
font-size: .65rem; |
|||
font-weight: normal; |
|||
color: $color-text-decent; |
|||
} |
|||
} |
|||
@import '_mixins'; |
|||
Loading…
Reference in new issue