Skip to content

Commit 7a9501c

Browse files
committed
Remove external source logo and change date format on feed pages
1 parent 009d53d commit 7a9501c

File tree

7 files changed

+43
-36
lines changed

7 files changed

+43
-36
lines changed

projects/commudle-admin/src/app/feature-modules/external-feed/components/external-feed-hlist-item/external-feed-hlist-item.component.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<img src="{{ feedItem.details.image }}" alt="{{ feedItem.details.source }}">
66
</div>
77
<div class="source-details align-items-center d-flex">
8-
<div class="external-feed-post-source-image d-flex align-items-center">
8+
<!-- <div class="external-feed-post-source-image d-flex align-items-center">
99
<img alt="{{ feedItem.details.source }}" src="{{ feedItem.details.source_logo }}">
10-
</div>
10+
</div> -->
1111
<div class="source-info">
1212
<em> {{ feedItem.details.source}} </em> <br>
13-
<small> {{ feedItem.details.created_at.substr(0, 10) }} </small>
13+
<small> {{ feedItem.details.created_at}} </small>
1414
</div>
1515
</div>
1616
<div class="title">

projects/commudle-admin/src/app/feature-modules/external-feed/components/external-feed-hlist-item/external-feed-hlist-item.component.scss

+13-13
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@
3232
}
3333

3434
.source-details {
35-
.external-feed-post-source-image {
36-
min-height: 40px;
37-
max-height: 40px;
38-
min-width: 40px;
39-
max-width: 40px;
40-
overflow: hidden;
41-
border-radius: 50%;
42-
border: 0.5px solid $platinum;
43-
margin-right: $space-8;
35+
// .external-feed-post-source-image {
36+
// min-height: 40px;
37+
// max-height: 40px;
38+
// min-width: 40px;
39+
// max-width: 40px;
40+
// overflow: hidden;
41+
// border-radius: 50%;
42+
// border: 0.5px solid $platinum;
43+
// margin-right: $space-8;
4444

45-
img {
46-
width: 100%;
47-
}
48-
}
45+
// img {
46+
// width: 100%;
47+
// }
48+
// }
4949

5050
.source-info {
5151
align-items: center;

projects/commudle-admin/src/app/feature-modules/external-feed/components/external-feed-hlist-item/external-feed-hlist-item.component.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Component, OnInit, Input } from '@angular/core';
22
import { IFeedItem } from 'projects/shared-models/feed-item.model';
33
import * as moment from 'moment';
4+
import { DatePipe } from '@angular/common'
45

56
@Component({
67
selector: 'app-external-feed-hlist-item',
@@ -12,8 +13,9 @@ export class ExternalFeedHListItemComponent implements OnInit {
1213

1314
@Input() feedItem;
1415

15-
constructor() { }
16+
constructor(private datePipe: DatePipe) { }
1617

1718
ngOnInit() {
19+
this.feedItem.details.created_at = this.datePipe.transform(this.feedItem.details.created_at, 'd MMMM, YYYY');
1820
}
1921
}

projects/commudle-admin/src/app/feature-modules/external-feed/components/feed-item-details/feed-item-details.component.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
/>
99
</div>
1010
<div class="source-details d-flex align-items-center">
11-
<div class="external-feed-post-source-image d-flex align-items-center">
11+
<!--<div class="external-feed-post-source-image d-flex align-items-center">
1212
<img
1313
alt="{{ feedItem.details.source }}"
1414
src="{{ feedItem.details.source_logo }}"
1515
/>
16-
</div>
16+
</div> -->
1717
<div class="source-info">
1818
<em> {{ feedItem.details.source }} </em> <br />
19-
<small> {{ feedItem.details.created_at.substr(0, 10) }} </small>
19+
<small> {{ feedItem.details.created_at }} </small>
2020
</div>
2121
</div>
2222
<div class="title">

projects/commudle-admin/src/app/feature-modules/external-feed/components/feed-item-details/feed-item-details.component.scss

+14-14
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@
3030

3131
.source-details {
3232

33-
.external-feed-post-source-image {
34-
min-height: 40px;
35-
max-height: 40px;
36-
min-width: 40px;
37-
max-width: 40px;
38-
overflow: hidden;
39-
border-radius: 50%;
40-
border: 0.5px solid $platinum;
41-
margin-right: $space-8;
42-
43-
img {
44-
width: 100%;
45-
}
46-
}
33+
// .external-feed-post-source-image {
34+
// min-height: 40px;
35+
// max-height: 40px;
36+
// min-width: 40px;
37+
// max-width: 40px;
38+
// overflow: hidden;
39+
// border-radius: 50%;
40+
// border: 0.5px solid $platinum;
41+
// margin-right: $space-8;
42+
43+
// img {
44+
// width: 100%;
45+
// }
46+
// }
4747

4848
.source-info {
4949
align-items: center;

projects/commudle-admin/src/app/feature-modules/external-feed/components/feed-item-details/feed-item-details.component.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {Component, Input, OnInit, TemplateRef, ViewChild} from '@angular/core';
22
import {IFeedItem} from 'projects/shared-models/feed-item.model';
33
import {DiscussionsService} from 'projects/commudle-admin/src/app/services/discussions.service';
44
import {IDiscussion} from 'projects/shared-models/discussion.model';
5+
import { DatePipe } from '@angular/common'
56

67
@Component({
78
selector: 'app-feed-item-details',
@@ -18,10 +19,12 @@ export class FeedItemDetailsComponent implements OnInit {
1819
messagesCount: number;
1920

2021
constructor(
21-
private discussionsService: DiscussionsService
22+
private discussionsService: DiscussionsService,
23+
private datePipe: DatePipe
2224
) { }
2325

2426
ngOnInit() {
27+
this.feedItem.details.created_at = this.datePipe.transform(this.feedItem.details.created_at, 'd MMMM, YYYY');
2528
this.getDiscussionChat();
2629
}
2730

projects/commudle-admin/src/app/feature-modules/external-feed/external-feed.module.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {SharedPipesModule} from 'projects/shared-pipes/pipes.module';
2222
import {ExternalFeedHListItemComponent} from './components/external-feed-hlist-item/external-feed-hlist-item.component';
2323
import {FeedItemDiscussionComponent} from './components/feed-item-discussion/feed-item-discussion.component';
2424
import {FeedItemDiscussionMessageComponent} from './components/feed-item-discussion/feed-item-discussion-message/feed-item-discussion-message.component';
25+
import { DatePipe } from '@angular/common';
2526

2627
@NgModule({
2728
declarations: [
@@ -51,6 +52,7 @@ import {FeedItemDiscussionMessageComponent} from './components/feed-item-discuss
5152
NbCheckboxModule,
5253
NbFormFieldModule,
5354
NbUserModule,
54-
]
55+
],
56+
providers: [DatePipe]
5557
})
5658
export class ExternalFeedModule { }

0 commit comments

Comments
 (0)