feat: project search on frontend

This commit is contained in:
Andras Bacsai
2024-10-05 15:03:40 +02:00
parent 9448d0f0d2
commit a1124a885d
4 changed files with 60 additions and 30 deletions

View File

@@ -50,6 +50,10 @@
<div x-data="searchComponent()">
<x-forms.input placeholder="Search for name, fqdn..." x-model="search" id="null" />
<div class="grid grid-cols-1 gap-4 pt-4 lg:grid-cols-2 xl:grid-cols-3">
<template x-if="allFilteredItems.length === 0">
<div>No resource found with the search term "<span x-text="search"></span>".</div>
</template>
<template x-for="item in allFilteredItems" :key="item.uuid">
<span>
<a class="h-24 box group" :href="item.hrefLink">