FEAT: playlist filters
This commit is contained in:
25
app/components/ui/SearchInput.vue
Normal file
25
app/components/ui/SearchInput.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<div class="relative">
|
||||
<input v-model="searchQuery" type="text" placeholder="Rechercher..."
|
||||
class="px-4 py-2 pl-10 w-48 m-4 h-12 font-bold text-black bg-esyellow border border-none rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-estyellow-dark focus:border-estyellow-dark"
|
||||
@input="handleSearch">
|
||||
<div class="absolute inset-y-0 left-0 flex items-center pl-6 pointer-events-none">
|
||||
<svg class="w-5 h-5 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const emit = defineEmits(['search'])
|
||||
|
||||
const searchQuery = ref('')
|
||||
|
||||
const handleSearch = () => {
|
||||
emit('search', searchQuery.value.trim().toLowerCase())
|
||||
}
|
||||
</script>
|
||||
37
app/components/ui/SelectCardRank.vue
Normal file
37
app/components/ui/SelectCardRank.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<select v-model="selectedRank" @change="handleChange"
|
||||
class="px-4 py-2 m-4 font-bold h-12 border-none text-center bg-esyellow transition-colors border border-esyellow-dark rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-estyellow-dark focus:border-estyellow-dark cursor-pointer appearance-none">
|
||||
<option value="">rank</option>
|
||||
<option v-for="rank in ranks" :key="rank.value" :value="rank.value">
|
||||
{{ rank.label }}
|
||||
</option>
|
||||
</select>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const emit = defineEmits(['change'])
|
||||
|
||||
const ranks = [
|
||||
{ value: 'A', label: 'Ace' },
|
||||
{ value: '2', label: '2' },
|
||||
{ value: '3', label: '3' },
|
||||
{ value: '4', label: '4' },
|
||||
{ value: '5', label: '5' },
|
||||
{ value: '6', label: '6' },
|
||||
{ value: '7', label: '7' },
|
||||
{ value: '8', label: '8' },
|
||||
{ value: '9', label: '9' },
|
||||
{ value: '10', label: '10' },
|
||||
{ value: 'J', label: 'Jack' },
|
||||
{ value: 'Q', label: 'Queen' },
|
||||
{ value: 'K', label: 'King' }
|
||||
]
|
||||
|
||||
const selectedRank = ref('')
|
||||
|
||||
const handleChange = () => {
|
||||
emit('change', selectedRank.value)
|
||||
}
|
||||
</script>
|
||||
28
app/components/ui/SelectCardSuit.vue
Normal file
28
app/components/ui/SelectCardSuit.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<select v-model="selectedSuit" @change="handleChange"
|
||||
class="px-4 py-2 m-4 text-black font-bold h-12 border-none text-center hover:text-black bg-esyellow transition-colors border border-esyellow-dark rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-esyellow-dark focus:border-esyellow-dark cursor-pointer appearance-none">
|
||||
<option value="">♠♣♦♥</option>
|
||||
<option v-for="suit in suits" :key="suit.value" :value="suit.value">
|
||||
{{ suit.label }}
|
||||
</option>
|
||||
</select>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const emit = defineEmits(['change'])
|
||||
|
||||
const suits = [
|
||||
{ value: '♥', label: '♥' },
|
||||
{ value: '♦', label: '♦' },
|
||||
{ value: '♣', label: '♣' },
|
||||
{ value: '♠', label: '♠' }
|
||||
]
|
||||
|
||||
const selectedSuit = ref('')
|
||||
|
||||
const handleChange = () => {
|
||||
emit('change', selectedSuit.value)
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user