Skip to content

Commit

Permalink
performance improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
vivganes committed Aug 1, 2023
1 parent 60101b1 commit f01e730
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</a>
<clr-dropdown>
<button class="nav-icon" clrDropdownTrigger aria-label="toggle settings menu">
<cds-icon shape="user"></cds-icon>
<cds-icon shape="user" solid></cds-icon>
<cds-icon shape="angle" direction="down"></cds-icon>
</button>
<clr-dropdown-menu *clrIfOpen clrPosition="bottom-right">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(inViewportAction)="onShowInViewPort($event)"
>
<div class="card">
<div class="card-img">
<div *ngIf= "showHeaderImage" class="card-img">
<img *ngIf="community.image" (click)="openCommunityPage()" alt="Community image" src="{{ community.image }}"
class="community-banner pointer-cursor" title="Browse n/{{community.name}}" />
<img alt="temp community avatar" (click)="openCommunityPage()" *ngIf="community.image == undefined"
Expand Down
2 changes: 2 additions & 0 deletions src/app/component/community-card/community-card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export class CommunityCardComponent {
currentUserHexKey?:string;
joinOrLeaveInProgress:boolean = false;
ndkProvider:NdkproviderService;
showHeaderImage:boolean = false;

@Output()
onLeave:EventEmitter<Community> = new EventEmitter<Community>();
Expand All @@ -39,6 +40,7 @@ export class CommunityCardComponent {

onShowInViewPort({ target, visible }: { target: Element; visible: boolean }): void{
if(visible){
this.showHeaderImage=true;
this.fetchFollowers();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/page/community-list/community-list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h3 *ngIf="showOnlyModeratingCommunities" align="center">
<div class="clr-col-md-3 clr-col-10">
<form class="search" onsubmit="return false;">
<label for="search_input_mobile">
<input clrInput id="search_input" type="search" placeholder="Search..." [(ngModel)]="searchTerm"
<input clrInput id="search_input" type="search" placeholder="🔎︎ Search..." [(ngModel)]="searchTerm"
name="search_input" (ngModelChange)="onSearchTermChange()">
</label>
</form>
Expand Down

0 comments on commit f01e730

Please sign in to comment.