added DM icon
This commit is contained in:
parent
8aac46a4c2
commit
d1c0488460
|
@ -8,9 +8,10 @@
|
|||
[class.boosted]="isBoosted" [class.boosting]="boostIsLoading" (click)="boost()">
|
||||
<fa-icon [icon]="faRetweet"></fa-icon>
|
||||
</a>
|
||||
<fa-icon *ngIf="isBoostLocked && !isLocked" class="action-bar__lock" title="This post cannot be boosted"
|
||||
<fa-icon *ngIf="isBoostLocked && !isLocked && !isDM" class="action-bar__lock" title="This post cannot be boosted"
|
||||
[icon]="faLock"></fa-icon>
|
||||
<fa-icon *ngIf="isLocked" class="action-bar__lock" title="Account can't access this post" [icon]="faLock"></fa-icon>
|
||||
<fa-icon *ngIf="isDM && !isLocked" class="action-bar__envelope" title="DM post cannot be boosted" [icon]="faEnvelope"></fa-icon>
|
||||
|
||||
<a *ngIf="!isLocked" href class="action-bar__link action-bar__link--fav" title="Favourite"
|
||||
[class.favorited]="isFavorited" [class.favoriting]="favoriteIsLoading" (click)="favorite()">
|
||||
|
|
|
@ -50,7 +50,18 @@
|
|||
}
|
||||
}
|
||||
|
||||
&__lock {
|
||||
&__lock {
|
||||
color: $status-secondary-color;
|
||||
width: 22px;
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-right: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
&__envelope {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
color: $status-secondary-color;
|
||||
width: 22px;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Component, OnInit, OnDestroy, Input, Output, EventEmitter, ViewChild }
|
|||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { Store } from '@ngxs/store';
|
||||
import { Observable, Subscription } from 'rxjs';
|
||||
import { faWindowClose, faReply, faRetweet, faStar, faEllipsisH, faLock } from "@fortawesome/free-solid-svg-icons";
|
||||
import { faWindowClose, faReply, faRetweet, faStar, faEllipsisH, faLock, faEnvelope } from "@fortawesome/free-solid-svg-icons";
|
||||
import { faWindowClose as faWindowCloseRegular } from "@fortawesome/free-regular-svg-icons";
|
||||
import { ContextMenuComponent, ContextMenuService } from 'ngx-contextmenu';
|
||||
|
||||
|
@ -27,6 +27,7 @@ export class ActionBarComponent implements OnInit, OnDestroy {
|
|||
faWindowCloseRegular = faWindowCloseRegular;
|
||||
faEllipsisH = faEllipsisH;
|
||||
faLock = faLock;
|
||||
faEnvelope = faEnvelope;
|
||||
|
||||
@ViewChild(ContextMenuComponent) public contextMenu: ContextMenuComponent;
|
||||
public items = [
|
||||
|
@ -42,6 +43,7 @@ export class ActionBarComponent implements OnInit, OnDestroy {
|
|||
|
||||
isFavorited: boolean;
|
||||
isBoosted: boolean;
|
||||
isDM: boolean;
|
||||
|
||||
isBoostLocked: boolean;
|
||||
isLocked: boolean;
|
||||
|
@ -92,6 +94,10 @@ export class ActionBarComponent implements OnInit, OnDestroy {
|
|||
this.displayedStatus = status;
|
||||
}
|
||||
|
||||
if(this.displayedStatus.visibility === 'direct'){
|
||||
this.isDM = true;
|
||||
}
|
||||
|
||||
this.accountSub = this.accounts$.subscribe((accounts: AccountInfo[]) => {
|
||||
this.loadedAccounts = accounts;
|
||||
this.checkStatus(accounts);
|
||||
|
|
Loading…
Reference in New Issue