diff --git a/resources/views/livewire/global-search.blade.php b/resources/views/livewire/global-search.blade.php index d8cbcf2d8..3df03ea0d 100644 --- a/resources/views/livewire/global-search.blade.php +++ b/resources/views/livewire/global-search.blade.php @@ -14,6 +14,11 @@ return []; } + // Don't execute search if data is still loading + if (this.isLoadingInitialData) { + return []; + } + const query = this.searchQuery.toLowerCase().trim(); const results = this.allSearchableItems.filter(item => { @@ -28,6 +33,12 @@ if (!this.searchQuery || this.searchQuery.length < 1) { return []; } + + // Don't execute search if data is still loading + if (this.isLoadingInitialData) { + return []; + } + const query = this.searchQuery.toLowerCase().trim(); if (query === 'new') { @@ -239,7 +250,8 @@ class="fixed top-0 left-0 z-99 flex items-start justify-center w-screen h-screen pt-[10vh]">
-
- + - + +
+ placeholder="Search resources, paths, everything (type new for create)..." x-ref="searchInput" + x-init="$watch('modalOpen', value => { if (value) setTimeout(() => $refs.searchInput.focus(), 100) })" + class="w-full pl-12 pr-32 py-4 text-base bg-white dark:bg-coolgray-100 border-none rounded-lg shadow-xl ring-1 ring-neutral-200 dark:ring-coolgray-300 dark:text-white placeholder-neutral-400 dark:placeholder-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-coollabs dark:focus-visible:ring-warning focus-visible:ring-offset-2 dark:focus-visible:ring-offset-base" />
/ or ⌘K to focus @@ -311,8 +323,8 @@ class="text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-white"> - +
@@ -327,13 +339,11 @@
@if ($loadingServers) -
- - +
+ + @@ -343,8 +353,7 @@
@elseif (count($availableServers) > 0) @foreach ($availableServers as $index => $server) - @@ -388,10 +396,10 @@
@@ -406,13 +414,11 @@
@if ($loadingDestinations) -
- - +
+ + @@ -422,24 +428,22 @@
@elseif (count($availableDestinations) > 0) @foreach ($availableDestinations as $index => $destination) - @@ -461,10 +465,10 @@
@@ -479,13 +483,11 @@
@if ($loadingProjects) -
- - +
+ + @@ -495,8 +497,7 @@
@elseif (count($availableProjects) > 0) @foreach ($availableProjects as $index => $project) - @@ -540,10 +540,10 @@
@@ -558,13 +558,11 @@
@if ($loadingEnvironments) -
- - +
+ + @@ -574,8 +572,7 @@
@elseif (count($availableEnvironments) > 0) @foreach ($availableEnvironments as $index => $environment) - @@ -636,8 +632,7 @@
- + {{ $result['name'] }}
@if (!empty($result['project']) && !empty($result['environment'])) -
+
{{ $result['project'] }} / {{ $result['environment'] }}
@endif @if (!empty($result['description'])) -
+
{{ Str::limit($result['description'], 80) }}
@endif @@ -674,8 +667,8 @@ - +
@@ -705,16 +698,15 @@
- + class="h-5 w-5 text-yellow-600 dark:text-yellow-400" fill="none" + viewBox="0 0 24 24" stroke="currentColor"> +
-
+
{{ $item['name'] }}
@if (isset($item['quickcommand'])) @@ -722,8 +714,7 @@ class="text-xs text-neutral-500 dark:text-neutral-400 shrink-0">{{ $item['quickcommand'] }} @endif
-
+
{{ $item['description'] }}
@@ -731,8 +722,8 @@ - +
@@ -817,8 +808,7 @@ class="flex-shrink-0 w-10 h-10 rounded-lg bg-yellow-100 dark:bg-yellow-900/40 flex items-center justify-center"> + fill="none" viewBox="0 0 24 24" stroke="currentColor"> @@ -886,12 +876,10 @@ if (firstInput) firstInput.focus(); }, 200); } - })" - class="fixed top-0 left-0 lg:px-0 px-4 z-99 flex items-center justify-center w-screen h-screen"> -
+
New Project @@ -928,12 +916,10 @@ if (firstInput) firstInput.focus(); }, 200); } - })" - class="fixed top-0 left-0 lg:px-0 px-4 z-99 flex items-center justify-center w-screen h-screen"> -
+
New Server @@ -970,12 +956,10 @@ if (firstInput) firstInput.focus(); }, 200); } - })" - class="fixed top-0 left-0 lg:px-0 px-4 z-99 flex items-center justify-center w-screen h-screen"> -
+
New Team @@ -1012,12 +996,10 @@ if (firstInput) firstInput.focus(); }, 200); } - })" - class="fixed top-0 left-0 lg:px-0 px-4 z-99 flex items-center justify-center w-screen h-screen"> -
+
New S3 Storage @@ -1054,12 +1036,10 @@ if (firstInput) firstInput.focus(); }, 200); } - })" - class="fixed top-0 left-0 lg:px-0 px-4 z-99 flex items-center justify-center w-screen h-screen"> -
+
New Private Key @@ -1096,12 +1076,10 @@ if (firstInput) firstInput.focus(); }, 200); } - })" - class="fixed top-0 left-0 lg:px-0 px-4 z-99 flex items-center justify-center w-screen h-screen"> -
+
New GitHub App @@ -1128,4 +1106,4 @@
-
+
\ No newline at end of file