fix #43 (but limitations due to the API)
This commit is contained in:
parent
b58809c909
commit
f548a58bc3
|
@ -4,8 +4,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="status">
|
<div class="status">
|
||||||
|
|
||||||
<a href class="status__profile-link" title="{{displayedStatus.account.acct}}" (click)="openAccount(displayedStatus.account)">
|
<a href class="status__profile-link" title="{{displayedStatus.account.acct}}"
|
||||||
<img [class.status__avatar--boosted]="reblog" class="status__avatar" src="{{ displayedStatus.account.avatar }}" />
|
(click)="openAccount(displayedStatus.account)">
|
||||||
|
<img [class.status__avatar--boosted]="reblog" class="status__avatar"
|
||||||
|
src="{{ displayedStatus.account.avatar }}" />
|
||||||
<!-- <img *ngIf="reblog" class="status__avatar--reblog" src="{{ status.account.avatar }}" /> -->
|
<!-- <img *ngIf="reblog" class="status__avatar--reblog" src="{{ status.account.avatar }}" /> -->
|
||||||
<span class="status__name">
|
<span class="status__name">
|
||||||
<span class="status__name--displayname" innerHTML="{{displayedStatus.account.display_name}}"></span><span
|
<span class="status__name--displayname" innerHTML="{{displayedStatus.account.display_name}}"></span><span
|
||||||
|
@ -17,15 +19,28 @@
|
||||||
{{ status.created_at | timeAgo | async }}
|
{{ status.created_at | timeAgo | async }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="status__automation-data">
|
||||||
|
<div class="status__automation-data--label status__automation-data--bot" title="bot"
|
||||||
|
*ngIf="status.account.bot">
|
||||||
|
bot
|
||||||
|
</div>
|
||||||
|
<div class="status__automation-data--label status__automation-data--xpost" title="cross-poster"
|
||||||
|
*ngIf="isCrossPoster">
|
||||||
|
x-post
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- <div #content class="status__content" innerHTML="{{displayedStatus.content}}"></div> -->
|
<!-- <div #content class="status__content" innerHTML="{{displayedStatus.content}}"></div> -->
|
||||||
|
|
||||||
<app-databinded-text class="status__content" [text]="displayedStatus.content" (accountSelected)="accountSelected($event)"
|
<app-databinded-text class="status__content" [text]="displayedStatus.content"
|
||||||
(hashtagSelected)="hashtagSelected($event)" (textSelected)="textSelected()"></app-databinded-text>
|
(accountSelected)="accountSelected($event)" (hashtagSelected)="hashtagSelected($event)"
|
||||||
|
(textSelected)="textSelected()"></app-databinded-text>
|
||||||
|
|
||||||
|
|
||||||
<app-attachements *ngIf="hasAttachments" class="attachments" [attachments]="displayedStatus.media_attachments"></app-attachements>
|
<app-attachements *ngIf="hasAttachments" class="attachments" [attachments]="displayedStatus.media_attachments">
|
||||||
|
</app-attachements>
|
||||||
|
|
||||||
<app-action-bar [statusWrapper]="statusWrapper" (replyEvent)="openReply()"></app-action-bar>
|
<app-action-bar [statusWrapper]="statusWrapper" (replyEvent)="openReply()"></app-action-bar>
|
||||||
|
|
||||||
<app-reply-to-status *ngIf="replyingToStatus" [statusReplyingToWrapper]="statusWrapper" (onClose)="closeReply()"></app-reply-to-status>
|
<app-reply-to-status *ngIf="replyingToStatus" [statusReplyingToWrapper]="statusWrapper" (onClose)="closeReply()">
|
||||||
|
</app-reply-to-status>
|
||||||
</div>
|
</div>
|
|
@ -1,5 +1,4 @@
|
||||||
@import "variables";
|
@import "variables";
|
||||||
|
|
||||||
.reblog {
|
.reblog {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 5px 0 0 10px;
|
margin: 5px 0 0 10px;
|
||||||
|
@ -48,6 +47,32 @@
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&__automation-data {
|
||||||
|
position: absolute;
|
||||||
|
top: 65px;
|
||||||
|
left: 10px;
|
||||||
|
width: 50px;
|
||||||
|
cursor: default;
|
||||||
|
|
||||||
|
&--label {
|
||||||
|
text-transform: uppercase;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 7px;
|
||||||
|
margin-bottom: 3px; // color: #000;
|
||||||
|
border-radius: 2px; //border: 1px solid greenyellow;
|
||||||
|
padding-top: 1px;
|
||||||
|
}
|
||||||
|
&--bot {
|
||||||
|
background-color: rgb(0, 225, 255);
|
||||||
|
background-color: rgb(0, 159, 180);
|
||||||
|
background-color: rgb(0, 114, 129);
|
||||||
|
}
|
||||||
|
&--xpost {
|
||||||
|
background-color: rgb(255, 153, 0);
|
||||||
|
background-color: rgb(189, 113, 0);
|
||||||
|
background-color: rgb(156, 94, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
&__name {
|
&__name {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: calc(100% - 40px);
|
width: calc(100% - 40px);
|
||||||
|
@ -78,8 +103,7 @@
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
margin: 0 10px 0 $avatar-column-space;
|
margin: 0 10px 0 $avatar-column-space;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
} // &__content p {
|
||||||
// &__content p {
|
|
||||||
// margin: 0 !important;
|
// margin: 0 !important;
|
||||||
// font-size: 0.85em;
|
// font-size: 0.85em;
|
||||||
// }
|
// }
|
||||||
|
@ -87,11 +111,9 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 7px;
|
top: 7px;
|
||||||
right: 5px;
|
right: 5px;
|
||||||
|
|
||||||
&--link {
|
&--link {
|
||||||
color: $status-secondary-color;
|
color: $status-secondary-color;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: lighten($status-secondary-color, 20);
|
color: lighten($status-secondary-color, 20);
|
||||||
}
|
}
|
||||||
|
@ -100,7 +122,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachments {
|
.attachments {
|
||||||
display: block;
|
display: block; // width: calc(100% - 80px);
|
||||||
// width: calc(100% - 80px);
|
|
||||||
margin: 10px 10px 0 $avatar-column-space;
|
margin: 10px 10px 0 $avatar-column-space;
|
||||||
}
|
}
|
|
@ -13,6 +13,7 @@ export class StatusComponent implements OnInit {
|
||||||
reblog: boolean;
|
reblog: boolean;
|
||||||
hasAttachments: boolean;
|
hasAttachments: boolean;
|
||||||
replyingToStatus: boolean;
|
replyingToStatus: boolean;
|
||||||
|
isCrossPoster: boolean;
|
||||||
|
|
||||||
@Output() browseAccountEvent = new EventEmitter<string>();
|
@Output() browseAccountEvent = new EventEmitter<string>();
|
||||||
@Output() browseHashtagEvent = new EventEmitter<string>();
|
@Output() browseHashtagEvent = new EventEmitter<string>();
|
||||||
|
@ -25,6 +26,8 @@ export class StatusComponent implements OnInit {
|
||||||
this._statusWrapper = value;
|
this._statusWrapper = value;
|
||||||
this.status = value.status;
|
this.status = value.status;
|
||||||
|
|
||||||
|
this.checkCrossPosting(this.status);
|
||||||
|
|
||||||
if (this.status.reblog) {
|
if (this.status.reblog) {
|
||||||
this.reblog = true;
|
this.reblog = true;
|
||||||
this.displayedStatus = this.status.reblog;
|
this.displayedStatus = this.status.reblog;
|
||||||
|
@ -49,6 +52,21 @@ export class StatusComponent implements OnInit {
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private checkCrossPosting(status: Status) {
|
||||||
|
//since API is limited with federated status...
|
||||||
|
if(status.uri.includes('birdsite.link')){
|
||||||
|
this.isCrossPoster = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status.application) {
|
||||||
|
console.warn(status.application);
|
||||||
|
const usedApp = status.application.name.toLowerCase();
|
||||||
|
if (usedApp && (usedApp.includes('moa') || usedApp.includes('birdsite') || usedApp.includes('twitter'))) {
|
||||||
|
this.isCrossPoster = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
openAccount(account: Account): boolean {
|
openAccount(account: Account): boolean {
|
||||||
let accountName = account.acct;
|
let accountName = account.acct;
|
||||||
if (!accountName.includes('@'))
|
if (!accountName.includes('@'))
|
||||||
|
|
Loading…
Reference in New Issue