feat: agregar búsqueda de canciones y configurar hook de Gitea Actions
All checks were successful
build-and-deploy / build (push) Successful in 25s
build-and-deploy / deploy (push) Successful in 4s

- Agregar componente SearchFilter.client.vue modular y expandible
- Integrar búsqueda en MainContainer con contador de resultados
- Implementar filtrado de canciones por nombre en pages/index.vue
- Configurar hook PostToolUse para monitorear Gitea Actions
- Copiar y adaptar script monitor-gitea-action.sh para repodructor
This commit is contained in:
2025-10-14 01:14:19 -06:00
parent 182bfa74c9
commit de3ffbe05f
4 changed files with 484 additions and 5 deletions

View File

@@ -7,11 +7,13 @@
/>
<!-- Main Container -->
<MainContainer
<MainContainer
:current-track="currentTrack"
:is-playing="isPlaying"
:filtered-count="filteredCount"
@shuffle-changed="handleShuffleChanged"
@repeat-changed="handleRepeatChanged"
@search="handleSearch"
>
<!-- Track List -->
<TrackList
@@ -91,16 +93,41 @@ const isShuffled = useLocalStorage('shuffle', false)
const repeatMode = useLocalStorage('repeat', 'none') // 'none', 'all', 'one'
const shuffledIndices = ref([])
// Search state
const searchQuery = ref('')
// Refs
const audioPlayer = ref(null)
// Computed - removed progressPercent as it's not used in this component
const displayTracks = computed(() => {
if (isShuffled.value && shuffledIndices.value.length > 0) {
return shuffledIndices.value.map(index => tracks.value[index])
let tracksToDisplay = tracks.value
// Aplicar filtro de búsqueda
if (searchQuery.value.length > 0) {
tracksToDisplay = tracksToDisplay.filter(track =>
track.name.toLowerCase().includes(searchQuery.value)
)
}
return tracks.value
// Aplicar shuffle si está activado
if (isShuffled.value && shuffledIndices.value.length > 0) {
const shuffledTracks = shuffledIndices.value
.map(index => tracks.value[index])
.filter(track =>
searchQuery.value.length === 0 ||
track.name.toLowerCase().includes(searchQuery.value)
)
return shuffledTracks
}
return tracksToDisplay
})
const filteredCount = computed(() => {
if (searchQuery.value.length === 0) return null
return displayTracks.value.length
})
// Methods
@@ -293,6 +320,10 @@ const handleRepeatChanged = (mode) => {
repeatMode.value = mode
}
const handleSearch = (query) => {
searchQuery.value = query
}
const handleTrackSelected = ({ track, index }) => {
playTrack(track, index)
}