]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/header/search-typeahead.component.html
Fix search after first type on input
[github/Chocobozzz/PeerTube.git] / client / src / app / header / search-typeahead.component.html
index e3680906054ba0706ce2cf4b283de5a4ab688df0..710268664322ea2d4628830202588d2a81a0b4e4 100644 (file)
@@ -1,7 +1,7 @@
 <div class="d-inline-flex position-relative" id="typeahead-container">
   <input
     type="text" id="search-video" name="search-video" #searchVideo i18n-placeholder placeholder="Search videos, channels…"
-    [(ngModel)]="search" (ngModelChange)="onSearchChange()" (keyup)="handleKeyUp($event)"
+    [(ngModel)]="search" (ngModelChange)="onSearchChange()" (keyup)="handleKey($event)" (keydown.enter)="doSearch()"
   >
   <span class="icon icon-search" (click)="doSearch()"></span>
 
@@ -13,7 +13,7 @@
     <div *ngIf="showHelp" id="typeahead-help" class="overflow-hidden">
       <ng-container *ngIf="activeResult.type === 'search-global'">
         <div class="d-flex justify-content-between">
-          <label class="small-title" i18n>Global search</label>
+          <label class="small-title" i18n>GLOBAL SEARCH</label>
           <div class="advanced-search-status text-muted">
             <span *ngIf="serverConfig" class="mr-1" i18n>using {{ serverConfig.followings.instance.autoFollowIndex.indexUrl }}</span>
             <i class="glyphicon glyphicon-globe"></i>
@@ -26,7 +26,7 @@
     <!-- search instructions, when search input is empty -->
     <div *ngIf="areInstructionsDisplayed" id="typeahead-instructions" class="overflow-hidden">
       <div class="d-flex justify-content-between">
-        <label class="small-title" i18n>Advanced search</label>
+        <label class="small-title" i18n>ADVANCED SEARCH</label>
         <div class="advanced-search-status c-help">
           <span [ngClass]="canSearchAnyURI ? 'text-success' : 'text-muted'" i18n-title title="Determines whether you can resolve any distant content, or if this instance only allows doing so for instances it follows.">
             <span *ngIf="canSearchAnyURI" class="mr-1" i18n>any instance</span>
       </div>
       <ul>
         <li>
-          <em>@username@domain</em> <span class="flex-auto text-muted" i18n>account or channel</span>
+          <em>@channel_id@domain</em> <span class="flex-auto text-muted" i18n>channel</span>
         </li>
         <li>
-          <em>URL</em> <span class="text-muted" i18n>account or channel</span>
+          <em>URL</em> <span class="text-muted" i18n>channel</span>
         </li>
         <li>
           <em>UUID</em> <span class="text-muted" i18n>video</span>
         </li>
       </ul>
-      <span class="text-muted" i18n>Any other text will return matching video, channel or account names.</span>
+      <span class="text-muted" i18n>Any other text will return matching video or channel names.</span>
     </div>
   </div>