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-input
placeholder="Start typing to search..."
@ -8,7 +8,7 @@
(ionChange)="onSearchChange($event)"
></ion-input>
</ion-header>
<div class="search-results">
<div class="search-results" style="height: 100%; overflow-y: scroll;">
<ion-list>
<ion-item
*ngFor="let result of (results | async)"
@ -24,11 +24,11 @@
class="search-assoc"
[ngClass]="result.associated.type"
*ngIf="result.associated"
[title]="'Open associated '+result.associated.type"
[title]="result.associated.title"
(click)="openRelated($event, result)"
>
<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>
</ion-item>
</ion-list>

View File

@ -60,12 +60,12 @@
}
&.page {
background: var(--noded-background-note);
color: var(--noded-color-note);
border: 1px solid var(--noded-background-note);
border-radius: 3px;
&:hover {
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() {
setTimeout(() => {
this.ionInput.setFocus();
}, 750);
}, 400);
}
async onSearchChange($event) {