Clean up search and strip HTML
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
Garrett Mills 2020-11-20 12:49:41 -06:00
parent d954777b89
commit c69aed2488
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246
3 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
<div class="container"> <div class="container" style="display: flex; flex-direction: column; height: 100%;">
<ion-header class="search-header"> <ion-header class="search-header">
<ion-input <ion-input
placeholder="Start typing to search..." placeholder="Start typing to search..."
@ -8,7 +8,7 @@
(ionChange)="onSearchChange($event)" (ionChange)="onSearchChange($event)"
></ion-input> ></ion-input>
</ion-header> </ion-header>
<div class="search-results"> <div class="search-results" style="height: 100%; overflow-y: scroll;">
<ion-list> <ion-list>
<ion-item <ion-item
*ngFor="let result of (results | async)" *ngFor="let result of (results | async)"
@ -24,11 +24,11 @@
class="search-assoc" class="search-assoc"
[ngClass]="result.associated.type" [ngClass]="result.associated.type"
*ngIf="result.associated" *ngIf="result.associated"
[title]="'Open associated '+result.associated.type" [title]="result.associated.title"
(click)="openRelated($event, result)" (click)="openRelated($event, result)"
> >
<i class="assoc-icon" [ngClass]="typeIcons[result.associated.type]"></i> <i class="assoc-icon" [ngClass]="typeIcons[result.associated.type]"></i>
<div class="assoc-title">{{ result.associated.title }}</div> <div class="assoc-title">{{ result.associated.title.slice(0, 30) + (result.associated.title.length > 30 ? '...' : '') }}</div>
</div> </div>
</ion-item> </ion-item>
</ion-list> </ion-list>

View File

@ -60,12 +60,12 @@
} }
&.page { &.page {
background: var(--noded-background-note); border: 1px solid var(--noded-background-note);
color: var(--noded-color-note); border-radius: 3px;
&:hover { &:hover {
cursor: pointer; cursor: pointer;
background: var(--noded-background-note-hover); border: 1px solid var(--noded-background-note-hover);
} }
} }
} }

View File

@ -42,7 +42,7 @@ export class SearchComponent implements OnInit {
ngOnInit() { ngOnInit() {
setTimeout(() => { setTimeout(() => {
this.ionInput.setFocus(); this.ionInput.setFocus();
}, 750); }, 400);
} }
async onSearchChange($event) { async onSearchChange($event) {