mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Search app’s section name
This commit is contained in:
parent
741214dd07
commit
e1ac97140a
1 changed files with 7 additions and 7 deletions
|
|
@ -111,7 +111,7 @@ export default {
|
|||
// results: [],
|
||||
titleStartsWithResults: [],
|
||||
titleContainsResults: [],
|
||||
descriptionContainsResults: [],
|
||||
sectionNameContainsResults: [],
|
||||
// store: overlayStore.state
|
||||
}
|
||||
},
|
||||
|
|
@ -122,7 +122,7 @@ export default {
|
|||
return [
|
||||
...this.titleStartsWithResults,
|
||||
...this.titleContainsResults,
|
||||
...this.descriptionContainsResults
|
||||
...this.sectionNameContainsResults
|
||||
]
|
||||
},
|
||||
hasSearchInputText () {
|
||||
|
|
@ -160,10 +160,10 @@ export default {
|
|||
}
|
||||
return matches
|
||||
},
|
||||
descriptionContains (query, app) {
|
||||
const matches = app.description.toLowerCase().includes(query)
|
||||
sectionNameContains (query, app) {
|
||||
const matches = app.sectionName.toLowerCase().includes(query)
|
||||
if (matches) {
|
||||
this.descriptionContainsResults.push(app)
|
||||
this.sectionNameContainsResults.push(app)
|
||||
}
|
||||
return matches
|
||||
},
|
||||
|
|
@ -177,7 +177,7 @@ export default {
|
|||
// Clear any results from before
|
||||
this.titleStartsWithResults = []
|
||||
this.titleContainsResults = []
|
||||
this.descriptionContainsResults = []
|
||||
this.sectionNameContainsResults = []
|
||||
|
||||
|
||||
// Snap results scroll position back to top
|
||||
|
|
@ -195,7 +195,7 @@ export default {
|
|||
const matchers = [
|
||||
this.titleStartsWith,
|
||||
this.titleContains,
|
||||
// this.descriptionContains
|
||||
this.sectionNameContains
|
||||
]
|
||||
|
||||
// Run through our search priorities
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue