Skip to content

Commit

Permalink
adding Return Key update and bugfixes for route exit issue [appends #27]
Browse files Browse the repository at this point in the history
  • Loading branch information
bignamehere committed Aug 30, 2022
1 parent c823c6f commit 492826f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Design System Training</title>
<title>FPAC UX Training</title>
<script type="text/javascript">
const redirect = (r) => {
if (r.search[1] === '/' ) {
Expand Down
10 changes: 6 additions & 4 deletions src/Search/_views/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,23 +196,25 @@ export default {
const totalResults = ref(0);
const setSearchResults = (_phrase) => {
if(_phrase === undefined) return; // only execute if a phrase has been passed
searchPhrase.value = _phrase;
let results = videos.value.filter( (_o) => {
let isFound = false;
isFound = isFound ? true : checkSearchTeams(_phrase, _o);
isFound = isFound ? true : checkSearchTerms(_phrase, _o);
isFound = isFound ? true : checkDescription(_phrase, _o);
return isFound;
});
if( results.length > 0 ){
videoResults.value = results;
totalResults.value = results.length;
} else {
videoResults.value = null;
totalResults.value = 0;
videoResults.value = null;
totalResults.value = 0;
}
}
const checkSearchTeams = (_phrase, _o) => {
const checkSearchTerms = (_phrase, _o) => {
let ind = _o.searchTerms.findIndex( _oo => _oo.toLowerCase() == _phrase.toLowerCase() );
if( ind > -1 ) return true;
else return false;
Expand Down
4 changes: 2 additions & 2 deletions src/_components/global-nav/global-nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<div class="fsa-search__bd">
<div class="fsa-search__entry fsa-search__entry--grow">
<label class="fsa-search__label fsa-search__label--sr-only" for="searchPhrase">Search [app-name]</label>
<input placeholder="Search" class="fsa-input fsa-input--small fsa-search__input" id="searchPhrase" type="search" name="searchPhrase">
<input v-on:keyup.enter="doSearch" placeholder="Search" class="fsa-input fsa-input--small fsa-search__input" id="searchPhrase" type="search" name="searchPhrase">
</div>
<div class="fsa-search__submit">
<button @click="doSearch" class="fsa-btn fsa-btn--small fsa-search__btn fsa-search__btn--icon">
Expand All @@ -126,7 +126,7 @@
<div class="fsa-search__bd">
<div class="fsa-search__entry fsa-search__entry--grow">
<label class="fsa-search__label fsa-search__label--sr-only" for="scopedSearchPhrase">Search [app-name]</label>
<input placeholder="Search" class="fsa-input fsa-input--small fsa-search__input" id="scopedSearchPhrase" type="search" name="scopedSearchPhrase">
<input v-on:keyup.enter="doScopedSearch" placeholder="Search" class="fsa-input fsa-input--small fsa-search__input" id="scopedSearchPhrase" type="search" name="scopedSearchPhrase">
</div>
<div class="fsa-search__entry">
<label class="fsa-search__label fsa-search__label--sr-only" for="scopedCategory">Search Category</label>
Expand Down

0 comments on commit 492826f

Please sign in to comment.