search input type variable

This commit is contained in:
Kyle Spearrin 2019-03-13 22:54:18 -04:00
parent 0df3208d45
commit 10bb317a67
7 changed files with 14 additions and 8 deletions

View File

@ -3,7 +3,7 @@
html.browser_safari {
header {
.search .fa {
left: 25px;
left: 20px;
}
.left + .search .fa {

View File

@ -6,8 +6,9 @@
</button>
</div>
<div class="search">
<input type="search" placeholder="{{searchPlaceholder || ('searchVault' | i18n)}}" id="search"
[(ngModel)]="searchText" (input)="search(200)" appAutofocus>
<input type="{{searchTypeSearch ? 'search' : 'text'}}"
placeholder="{{searchPlaceholder || ('searchVault' | i18n)}}" id="search" [(ngModel)]="searchText"
(input)="search(200)" appAutofocus>
<i class="fa fa-search"></i>
</div>
<div class="right">

View File

@ -51,6 +51,7 @@ export class CiphersComponent extends BaseCiphersComponent implements OnInit, On
pagedCiphers: CipherView[] = [];
nestedFolders: Array<TreeNode<FolderView>>;
nestedCollections: Array<TreeNode<CollectionView>>;
searchTypeSearch = false;
private didScroll = false;
private selectedTimeout: number;
@ -72,6 +73,7 @@ export class CiphersComponent extends BaseCiphersComponent implements OnInit, On
}
async ngOnInit() {
this.searchTypeSearch = !this.platformUtilsService.isSafari();
const queryParamsSub = this.route.queryParams.subscribe(async (params) => {
if (params.type) {
this.searchPlaceholder = this.i18nService.t('searchType');

View File

@ -6,8 +6,8 @@
</button>
</div>
<div class="search">
<input type="search" placeholder="{{'searchVault' | i18n}}" id="search" [(ngModel)]="searchText"
(input)="searchVault()">
<input type="{{searchTypeSearch ? 'search' : 'text'}}" placeholder="{{'searchVault' | i18n}}" id="search"
[(ngModel)]="searchText" (input)="searchVault()">
<i class="fa fa-search"></i>
</div>
<div class="right">

View File

@ -49,6 +49,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
searchText: string;
inSidebar = false;
showLeftHeader = false;
searchTypeSearch = false;
loaded = false;
private totpCode: string;
@ -65,7 +66,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
private searchService: SearchService, private storageService: StorageService) { }
async ngOnInit() {
this.showLeftHeader = !this.platformUtilsService.isSafari();
this.showLeftHeader = this.searchTypeSearch = !this.platformUtilsService.isSafari();
this.inSidebar = this.popupUtilsService.inSidebar(window);
this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {

View File

@ -3,8 +3,8 @@
<app-pop-out></app-pop-out>
</div>
<div class="search">
<input type="search" placeholder="{{'searchVault' | i18n}}" id="search" [(ngModel)]="searchText"
(input)="search(200)" appAutofocus>
<input type="{{searchTypeSearch ? 'search' : 'text'}}" placeholder="{{'searchVault' | i18n}}" id="search"
[(ngModel)]="searchText" (input)="search(200)" appAutofocus>
<i class="fa fa-search"></i>
</div>
<div class="right">

View File

@ -56,6 +56,7 @@ export class GroupingsComponent extends BaseGroupingsComponent implements OnInit
scopeState: any;
showLeftHeader = true;
searchPending = false;
searchTypeSearch = false;
private loadedTimeout: number;
private selectedTimeout: number;
@ -89,6 +90,7 @@ export class GroupingsComponent extends BaseGroupingsComponent implements OnInit
}
async ngOnInit() {
this.searchTypeSearch = !this.platformUtilsService.isSafari();
this.showLeftHeader = !this.platformUtilsService.isSafari() &&
!(this.popupUtils.inSidebar(window) && this.platformUtilsService.isFirefox());
this.stateService.remove('CiphersComponent');