Clean up search and strip HTML
This commit is contained in:
parent
d954777b89
commit
c69aed2488
@ -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>
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user