]> Untitled Git - lemmy-ui.git/commitdiff
Adding URL search type. Fixes #286
authorDessalines <tyhou13@gmx.com>
Tue, 4 May 2021 21:31:38 +0000 (17:31 -0400)
committerDessalines <tyhou13@gmx.com>
Tue, 4 May 2021 21:31:38 +0000 (17:31 -0400)
src/shared/components/search.tsx

index 72bdfcc80428073a35e4958eb1888cf034a4da1b..dc8976c2068f8092c1245f3824e0e1443147d203 100644 (file)
@@ -326,6 +326,7 @@ export class Search extends Component<any, SearchState> {
         {this.state.type_ == SearchType.Posts && this.posts()}
         {this.state.type_ == SearchType.Communities && this.communities()}
         {this.state.type_ == SearchType.Users && this.users()}
+        {this.state.type_ == SearchType.Url && this.posts()}
         {this.resultsCount() == 0 && <span>{i18n.t("no_results")}</span>}
         {this.paginator()}
       </div>
@@ -374,6 +375,7 @@ export class Search extends Component<any, SearchState> {
             {i18n.t("communities")}
           </option>
           <option value={SearchType.Users}>{i18n.t("users")}</option>
+          <option value={SearchType.Url}>{i18n.t("url")}</option>
         </select>
         <span class="ml-2">
           <ListingTypeSelect