mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add quick search buttons
This commit is contained in:
parent
85c48a5b18
commit
cb65cee21b
1 changed files with 35 additions and 0 deletions
|
|
@ -15,6 +15,14 @@
|
||||||
@focus="scrollInputToTop()"
|
@focus="scrollInputToTop()"
|
||||||
>
|
>
|
||||||
<div class="search-input-separator border-white border-t-2" />
|
<div class="search-input-separator border-white border-t-2" />
|
||||||
|
<div class="quick-buttons overflow-x-auto whitespace-no-wrap py-2 space-x-2">
|
||||||
|
<button
|
||||||
|
v-for="button in quickButtons"
|
||||||
|
:key="button.query"
|
||||||
|
class="inline-block text-xs neumorphic-shadow-inner rounded-lg py-1 px-2"
|
||||||
|
@click="query = button.query; queryResults(query)"
|
||||||
|
>{{ button.label }}</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
ref="search-container"
|
ref="search-container"
|
||||||
|
|
@ -107,6 +115,33 @@ import appList from '~/assets/app-list.json'
|
||||||
// import PlayCircle from '~/assets/svg/play-circle.svg?inline'
|
// import PlayCircle from '~/assets/svg/play-circle.svg?inline'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
quickButtons: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [
|
||||||
|
{
|
||||||
|
label: 'Music Tools',
|
||||||
|
query: 'Music'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Developer Tools',
|
||||||
|
query: 'Developer'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Photo Tools',
|
||||||
|
query: 'Photo'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Video Tools',
|
||||||
|
query: 'Video'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Productivity Tools',
|
||||||
|
query: 'Productivity'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
appList,
|
appList,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue