Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communication: Fix background color issue for pinned messages #9025

Merged
merged 3 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/webapp/app/shared/metis/metis.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}

.highlight-pinned {
background: var(--metis-pinned-post-highlight-color);
background-color: var(--metis-pinned-post-highlight-color);
}

@keyframes cssAnimation {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="row module-bg mb-1 pb-1 rounded-2" [ngClass]="{ 'mx-0': !isThreadSidebar }">
<div class="row module-bg mb-1 pb-1 rounded-2" [ngClass]="{ 'mx-0': !isThreadSidebar, 'highlight-pinned': posting.displayPriority === DisplayPriority.PINNED }">
<div class="align-items-center">
egekurt123 marked this conversation as resolved.
Show resolved Hide resolved
<jhi-post-header
[previewMode]="previewMode"
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/app/shared/metis/post/post.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Post } from 'app/entities/metis/post.model';
import { PostingDirective } from 'app/shared/metis/posting.directive';
import { MetisService } from 'app/shared/metis/metis.service';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { ContextInformation, PageType, RouteComponents } from '../metis.util';
import { ContextInformation, DisplayPriority, PageType, RouteComponents } from '../metis.util';
import { faBullhorn, faCheckSquare } from '@fortawesome/free-solid-svg-icons';
import dayjs from 'dayjs/esm';
import { PostFooterComponent } from 'app/shared/metis/posting-footer/post-footer/post-footer.component';
Expand Down Expand Up @@ -44,6 +44,7 @@ export class PostComponent extends PostingDirective<Post> implements OnInit, OnC
pageType: PageType;
contextInformation: ContextInformation;
readonly PageType = PageType;
readonly DisplayPriority = DisplayPriority;

// Icons
faBullhorn = faBullhorn;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<div [class]="post.displayPriority === DisplayPriority.PINNED ? 'highlight-pinned' : ''">
<div class="col-12 mx-0">
<jhi-post
[readOnlyMode]="readOnlyMode"
[lastReadDate]="lastReadDate"
[posting]="post"
[showAnswers]="showAnswers"
[isCommunicationPage]="isCommunicationPage"
[showChannelReference]="showChannelReference"
[hasChannelModerationRights]="hasChannelModerationRights"
(openThread)="openThread.emit(post)"
/>
</div>
<div class="col-12 mx-0">
<jhi-post
[readOnlyMode]="readOnlyMode"
[lastReadDate]="lastReadDate"
[posting]="post"
[showAnswers]="showAnswers"
[isCommunicationPage]="isCommunicationPage"
[showChannelReference]="showChannelReference"
[hasChannelModerationRights]="hasChannelModerationRights"
(openThread)="openThread.emit(post)"
/>
</div>
@if (!isCommunicationPage) {
<div class="post-separation-line"></div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Post } from 'app/entities/metis/post.model';
import dayjs from 'dayjs/esm';
import { DisplayPriority } from 'app/shared/metis/metis.util';

@Component({
selector: 'jhi-posting-thread',
Expand All @@ -17,6 +16,4 @@ export class PostingThreadComponent {
@Input() showChannelReference?: boolean;
@Input() hasChannelModerationRights = false;
@Output() openThread = new EventEmitter<Post>();

protected readonly DisplayPriority = DisplayPriority;
}
Loading