Skip to content

Commit

Permalink
fix: render loading state before loading before loading starts
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Jul 25, 2022
1 parent 9437135 commit c93f488
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/bugfix-loading-state-in-views
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Loading state in views

We fixed a small glitch in views of the files app, where the view would show a state like "Resource not found" in the brief moment before the resource loading started. Now the views correctly start in a loading state.

https://github.com/owncloud/web/pull/7325
2 changes: 1 addition & 1 deletion packages/web-app-files/src/components/TrashBin.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<app-bar :breadcrumbs="breadcrumbs" :has-bulk-actions="true" />
<app-loading-spinner v-if="loadResourcesTask.isRunning" />
<app-loading-spinner v-if="loadResourcesTask.isRunning || !loadResourcesTask.last" />
<template v-else>
<no-content-message
v-if="isEmpty"
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/views/Favorites.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<app-bar />
<app-loading-spinner v-if="loadResourcesTask.isRunning" />
<app-loading-spinner v-if="loadResourcesTask.isRunning || !loadResourcesTask.last" />
<template v-else>
<no-content-message v-if="isEmpty" id="files-favorites-empty" class="files-empty" icon="star">
<template #message>
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/views/Personal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<create-and-upload />
</template>
</app-bar>
<app-loading-spinner v-if="loadResourcesTask.isRunning" />
<app-loading-spinner v-if="loadResourcesTask.isRunning || !loadResourcesTask.last" />
<template v-else>
<not-found-message v-if="folderNotFound" class="files-not-found oc-height-1-1" />
<no-content-message
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/views/PublicFiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<create-and-upload />
</template>
</app-bar>
<app-loading-spinner v-if="loadResourcesTask.isRunning" />
<app-loading-spinner v-if="loadResourcesTask.isRunning || !loadResourcesTask.last" />
<template v-else>
<not-found-message v-if="folderNotFound" class="files-not-found oc-height-1-1" />
<no-content-message
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/views/shares/SharedResource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<create-and-upload />
</template>
</app-bar>
<app-loading-spinner v-if="loadResourcesTask.isRunning" />
<app-loading-spinner v-if="loadResourcesTask.isRunning || !loadResourcesTask.last" />
<template v-else>
<not-found-message v-if="folderNotFound" class="files-not-found oc-height-1-1" />
<no-content-message
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/views/shares/SharedViaLink.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<app-bar :has-shares-navigation="true" />
<app-loading-spinner v-if="loadResourcesTask.isRunning" />
<app-loading-spinner v-if="loadResourcesTask.isRunning || !loadResourcesTask.last" />
<template v-else>
<no-content-message
v-if="isEmpty"
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/views/shares/SharedWithMe.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="oc-flex oc-flex-column">
<app-bar :has-shares-navigation="true" :has-bulk-actions="true" />
<app-loading-spinner v-if="loadResourcesTask.isRunning" />
<app-loading-spinner v-if="loadResourcesTask.isRunning || !loadResourcesTask.last" />
<template v-else>
<!-- Pending shares -->
<div v-if="hasPending">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<app-bar :has-shares-navigation="true" />
<app-loading-spinner v-if="loadResourcesTask.isRunning" />
<app-loading-spinner v-if="loadResourcesTask.isRunning || !loadResourcesTask.last" />
<template v-else>
<no-content-message
v-if="isEmpty"
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/views/spaces/Project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<create-and-upload />
</template>
</app-bar>
<app-loading-spinner v-if="loadResourcesTask.isRunning" />
<app-loading-spinner v-if="loadResourcesTask.isRunning || !loadResourcesTask.last" />
<template v-else>
<not-found-message v-if="!space.id" class="space-not-found oc-height-1-1" />
<div v-else-if="isSpaceRoot">
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/views/spaces/Projects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<p v-text="spacesHint" />
</template>
</app-bar>
<app-loading-spinner v-if="loadResourcesTask.isRunning" />
<app-loading-spinner v-if="loadResourcesTask.isRunning || !loadResourcesTask.last" />
<template v-else>
<no-content-message
v-if="!spaces.length"
Expand Down

0 comments on commit c93f488

Please sign in to comment.