Skip to content

Commit 673081f

Browse files
committed
chore: Update select.blade.php with improved search functionality
1 parent 2dc3177 commit 673081f

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

resources/views/livewire/project/new/select.blade.php

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@
1010
</div>
1111
</div>
1212
<div class="pb-4">Deploy resources, like Applications, Databases, Services...</div>
13-
<div class="flex flex-col gap-2 py-4" x-data="searchResources()">
13+
<div class="flex flex-col gap-4 py-4" x-data="searchResources()">
1414
@if ($current_step === 'type')
15-
<input autocomplete="off" x-ref="searchInput" class="input" x-model="search" placeholder="Search...">
15+
<div class="sticky top-0 z-50 py-2">
16+
<input autocomplete="off" x-ref="searchInput" class="input w-full" x-model="search"
17+
placeholder="Type / to search..." @keydown.window.slash.prevent="$refs.searchInput.focus()">
18+
</div>
1619
<div x-show="loading">Loading...</div>
1720
<h2 x-show="filteredGitBasedApplications.length > 0">Applications</h2>
1821
<h4 x-show="filteredGitBasedApplications.length > 0">Git Based</h4>
19-
<div class="grid justify-start grid-cols-1 gap-4 text-left xl:grid-cols-1">
22+
<div x-show="filteredGitBasedApplications.length > 0"
23+
class="grid justify-start grid-cols-1 gap-4 text-left xl:grid-cols-1">
2024
<template x-for="application in filteredGitBasedApplications" :key="application.name">
2125
<div x-on:click='setType(application.id)'>
2226
<x-resource-view>
@@ -34,7 +38,8 @@
3438
</template>
3539
</div>
3640
<h4 x-show="filteredDockerBasedApplications.length > 0">Docker Based</h4>
37-
<div class="grid justify-start grid-cols-1 gap-4 text-left xl:grid-cols-3">
41+
<div x-show="filteredDockerBasedApplications.length > 0"
42+
class="grid justify-start grid-cols-1 gap-4 text-left xl:grid-cols-3">
3843
<template x-for="application in filteredDockerBasedApplications" :key="application.name">
3944
<div x-on:click="setType(application.id)">
4045
<x-resource-view>
@@ -48,8 +53,9 @@ class="w-[4.5rem]
4853
</div>
4954
</template>
5055
</div>
51-
<h2 x-show="filteredDatabases.length > 0" class="py-4"> Databases </h2>
52-
<div class="grid justify-start grid-cols-1 gap-4 text-left xl:grid-cols-2">
56+
<h2 x-show="filteredDatabases.length > 0">Databases</h2>
57+
<div x-show="filteredDatabases.length > 0"
58+
class="grid justify-start grid-cols-1 gap-4 text-left xl:grid-cols-2">
5359
<template x-for="database in filteredDatabases" :key="database.id">
5460
<div x-on:click="setType(database.id)">
5561
<x-resource-view>
@@ -66,7 +72,7 @@ class="w-[4.5rem]
6672
</div>
6773
<div x-show="filteredServices.length > 0">
6874
<div class="flex items-center gap-4" x-init="loadResources">
69-
<h2 class="py-4">Services</h2>
75+
<h2>Services</h2>
7076
<x-forms.button x-on:click="loadResources">Reload List</x-forms.button>
7177
</div>
7278
<div class="pb-4 text-xs">Trademarks Policy: The respective trademarks mentioned here are owned by the
@@ -271,7 +277,8 @@ function searchResources() {
271277
272278
<div class="flex items-center px-2" title="Read the documentation.">
273279
<a class="p-2 hover:underline group-hover:dark:text-white dark:text-white text-neutral-6000"
274-
onclick="event.stopPropagation()" href="https://hub.docker.com/_/postgres/" target="_blank">
280+
onclick="event.stopPropagation()" href="https://hub.docker.com/_/postgres/"
281+
target="_blank">
275282
Documentation
276283
</a>
277284
</div>

0 commit comments

Comments
 (0)