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: [],
|
// results: [],
|
||||||
titleStartsWithResults: [],
|
titleStartsWithResults: [],
|
||||||
titleContainsResults: [],
|
titleContainsResults: [],
|
||||||
descriptionContainsResults: [],
|
sectionNameContainsResults: [],
|
||||||
// store: overlayStore.state
|
// store: overlayStore.state
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -122,7 +122,7 @@ export default {
|
||||||
return [
|
return [
|
||||||
...this.titleStartsWithResults,
|
...this.titleStartsWithResults,
|
||||||
...this.titleContainsResults,
|
...this.titleContainsResults,
|
||||||
...this.descriptionContainsResults
|
...this.sectionNameContainsResults
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
hasSearchInputText () {
|
hasSearchInputText () {
|
||||||
|
|
@ -160,10 +160,10 @@ export default {
|
||||||
}
|
}
|
||||||
return matches
|
return matches
|
||||||
},
|
},
|
||||||
descriptionContains (query, app) {
|
sectionNameContains (query, app) {
|
||||||
const matches = app.description.toLowerCase().includes(query)
|
const matches = app.sectionName.toLowerCase().includes(query)
|
||||||
if (matches) {
|
if (matches) {
|
||||||
this.descriptionContainsResults.push(app)
|
this.sectionNameContainsResults.push(app)
|
||||||
}
|
}
|
||||||
return matches
|
return matches
|
||||||
},
|
},
|
||||||
|
|
@ -177,7 +177,7 @@ export default {
|
||||||
// Clear any results from before
|
// Clear any results from before
|
||||||
this.titleStartsWithResults = []
|
this.titleStartsWithResults = []
|
||||||
this.titleContainsResults = []
|
this.titleContainsResults = []
|
||||||
this.descriptionContainsResults = []
|
this.sectionNameContainsResults = []
|
||||||
|
|
||||||
|
|
||||||
// Snap results scroll position back to top
|
// Snap results scroll position back to top
|
||||||
|
|
@ -195,7 +195,7 @@ export default {
|
||||||
const matchers = [
|
const matchers = [
|
||||||
this.titleStartsWith,
|
this.titleStartsWith,
|
||||||
this.titleContains,
|
this.titleContains,
|
||||||
// this.descriptionContains
|
this.sectionNameContains
|
||||||
]
|
]
|
||||||
|
|
||||||
// Run through our search priorities
|
// Run through our search priorities
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue