mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
[Manager] Show progress spinner on initial load (#2936)
This commit is contained in:
@@ -36,8 +36,14 @@
|
|||||||
@update:filterBy="handleFilterChange"
|
@update:filterBy="handleFilterChange"
|
||||||
/>
|
/>
|
||||||
<div class="flex-1 overflow-auto">
|
<div class="flex-1 overflow-auto">
|
||||||
|
<div
|
||||||
|
v-if="isLoading || isInitialLoad"
|
||||||
|
class="flex justify-center items-center h-full"
|
||||||
|
>
|
||||||
|
<ProgressSpinner />
|
||||||
|
</div>
|
||||||
<NoResultsPlaceholder
|
<NoResultsPlaceholder
|
||||||
v-if="error || searchResults.length === 0"
|
v-else-if="error || searchResults.length === 0"
|
||||||
:title="
|
:title="
|
||||||
error
|
error
|
||||||
? $t('manager.errorConnecting')
|
? $t('manager.errorConnecting')
|
||||||
@@ -49,12 +55,6 @@
|
|||||||
: $t('manager.tryDifferentSearch')
|
: $t('manager.tryDifferentSearch')
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<div
|
|
||||||
v-else-if="isLoading"
|
|
||||||
class="flex justify-center items-center h-full"
|
|
||||||
>
|
|
||||||
<ProgressSpinner />
|
|
||||||
</div>
|
|
||||||
<div v-else class="h-full" @click="handleGridContainerClick">
|
<div v-else class="h-full" @click="handleGridContainerClick">
|
||||||
<VirtualGrid
|
<VirtualGrid
|
||||||
:items="resultsWithKeys"
|
:items="resultsWithKeys"
|
||||||
@@ -144,6 +144,11 @@ const handleTabSelection = (tab: TabItem) => {
|
|||||||
const { searchQuery, pageNumber, sortField, isLoading, error, searchResults } =
|
const { searchQuery, pageNumber, sortField, isLoading, error, searchResults } =
|
||||||
useRegistrySearch()
|
useRegistrySearch()
|
||||||
pageNumber.value = 1
|
pageNumber.value = 1
|
||||||
|
|
||||||
|
const isInitialLoad = computed(
|
||||||
|
() => searchResults.value.length === 0 && searchQuery.value === ''
|
||||||
|
)
|
||||||
|
|
||||||
const resultsWithKeys = computed(() =>
|
const resultsWithKeys = computed(() =>
|
||||||
searchResults.value.map((item) => ({
|
searchResults.value.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
|
|||||||
Reference in New Issue
Block a user