Add support for full-text search (#7)
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
<ion-list>
|
||||
<ion-item button (click)="onSelect('search_everywhere')">
|
||||
<i slot="start" class="fa fa-search"></i>
|
||||
<ion-label>Search Everywhere</ion-label>
|
||||
</ion-item>
|
||||
<ion-item button (click)="onSelect('html_export')">
|
||||
<ion-icon slot="start" name="menu"></ion-icon>
|
||||
<i slot="start" class="fa fa-code"></i>
|
||||
<ion-label>Export to HTML Site</ion-label>
|
||||
</ion-item>
|
||||
<ion-item button (click)="onSelect('toggle_darkmode')">
|
||||
<ion-icon slot="start" [name]="isDark() ? 'sun' : 'moon'"></ion-icon>
|
||||
<i slot="start" class="fa" [ngClass]="isDark() ? 'fa-sun' : 'fa-moon'"></i>
|
||||
<ion-label>{{ isDark() ? 'To The Light!' : 'Go Dark...' }}</ion-label>
|
||||
</ion-item>
|
||||
<ion-item button (click)="onSelect('logout')">
|
||||
<ion-icon slot="start" name="exit"></ion-icon>
|
||||
<i slot="start" class="fa fa-sign-out-alt"></i>
|
||||
<ion-label>Logout</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {Router} from '@angular/router';
|
||||
import {ApiService} from '../../service/api.service';
|
||||
import {PopoverController} from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-option-picker',
|
||||
@@ -10,10 +11,12 @@ import {ApiService} from '../../service/api.service';
|
||||
export class OptionPickerComponent implements OnInit {
|
||||
@Input() toggleDark: () => void;
|
||||
@Input() isDark: () => boolean;
|
||||
@Input() showSearch: () => void | Promise<void>;
|
||||
|
||||
constructor(
|
||||
protected api: ApiService,
|
||||
protected router: Router,
|
||||
protected popover: PopoverController,
|
||||
) { }
|
||||
|
||||
ngOnInit() {}
|
||||
@@ -25,6 +28,9 @@ export class OptionPickerComponent implements OnInit {
|
||||
window.location.href = '/auth/logout';
|
||||
} else if ( key === 'toggle_darkmode' ) {
|
||||
this.toggleDark();
|
||||
} else if ( key === 'search_everywhere' ) {
|
||||
this.showSearch();
|
||||
this.popover.dismiss();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user