summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-09-15 17:16:34 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-09-18 08:11:47 +0200
commit7991ed6cf3197180ec0e45333733016988dc302f (patch)
tree1188d47eefe1dee5d50b9e5bd038597a89e2b4a6 /core/src
parent283e66b300a7bda61c5a5fdf967a3f73d6b1a2a8 (diff)
downloadnextcloud-server-7991ed6cf3197180ec0e45333733016988dc302f.tar.gz
nextcloud-server-7991ed6cf3197180ec0e45333733016988dc302f.zip
Properly show loading state if there are still pending requests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/views/UnifiedSearch.vue10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/src/views/UnifiedSearch.vue b/core/src/views/UnifiedSearch.vue
index 099fa336508..0114f2fcf13 100644
--- a/core/src/views/UnifiedSearch.vue
+++ b/core/src/views/UnifiedSearch.vue
@@ -35,6 +35,7 @@
<div class="unified-search__input-wrapper">
<form class="unified-search__form"
role="search"
+ :class="{'icon-loading-small': isLoading}"
@submit.prevent.stop="onInputEnter"
@reset.prevent.stop="onReset">
<!-- Search input -->
@@ -48,7 +49,7 @@
@keypress.enter.prevent.stop="onInputEnter">
<!-- Reset search button -->
- <input v-if="!!query"
+ <input v-if="!!query && !isLoading"
type="reset"
class="unified-search__form-reset icon-close"
:aria-label="t('core','Reset search')"
@@ -646,6 +647,12 @@ $input-padding: 6px;
width: 100%;
margin: $margin;
+ // Loading spinner
+ &::after {
+ right: $input-padding;
+ left: auto;
+ }
+
&-input,
&-reset {
margin: $input-padding / 2;
@@ -673,6 +680,7 @@ $input-padding: 6px;
}
// Ellipsis earlier if reset button is here
+ .icon-loading-small &,
&--with-reset {
padding-right: $input-height;
}