Skip to content

Commit

Permalink
Add semantic search to the welcome view (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonggrijp committed May 19, 2021
1 parent 7ef3334 commit 809e3a9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions frontend/src/global/semantic-search.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import SemanticSearchView from '../semantic-search/semantic-search-view';

export default new SemanticSearchView();
3 changes: 2 additions & 1 deletion frontend/src/global/welcome-view.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import WelcomeView from '../welcome/welcome-view';
import searchBox from './searchbox';
import semSearch from './semantic-search';

export default new WelcomeView({searchBox});
export default new WelcomeView({searchBox, semSearch});
6 changes: 6 additions & 0 deletions frontend/src/welcome/welcome-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ import welcomeTemplate from './welcome-template';

export interface ViewOptions extends BaseOpt {
searchBox: View;
semSearch: View;
}

export default class WelcomeView extends CompositeView {
searchboxView: View;
semSearchView: View;

constructor(options: ViewOptions) {
super(options);
this.searchboxView = options.searchBox;
this.semSearchView = options.semSearch;
this.render();
this.searchboxView.on("searchClicked", this.search, this);
}
Expand All @@ -34,6 +37,9 @@ extend(WelcomeView.prototype, {
subviews: [{
view: 'searchboxView',
selector: '.welcome-image',
}, {
view: 'semSearchView',
selector: '.welcome-image',
}],
});

Expand Down

0 comments on commit 809e3a9

Please sign in to comment.