aboutsummaryrefslogtreecommitdiff
path: root/src/components/search/search.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/search/search.vue')
-rw-r--r--src/components/search/search.vue44
1 files changed, 35 insertions, 9 deletions
diff --git a/src/components/search/search.vue b/src/components/search/search.vue
index b7bfc1f3..19b9c577 100644
--- a/src/components/search/search.vue
+++ b/src/components/search/search.vue
@@ -22,7 +22,7 @@
</button>
</div>
<div
- v-if="loading"
+ v-if="loading && statusesOffset == 0"
class="text-center loading-icon"
>
<FAIcon
@@ -55,12 +55,6 @@
</div>
<div class="panel-body">
<div v-if="currenResultTab === 'statuses'">
- <div
- v-if="visibleStatuses.length === 0 && !loading && loaded"
- class="search-result-heading"
- >
- <h4>{{ $t('search.no_results') }}</h4>
- </div>
<Status
v-for="status in visibleStatuses"
:key="status.id"
@@ -71,6 +65,33 @@
:statusoid="status"
:no-heading="false"
/>
+ <button
+ v-if="!loading && loaded && lastStatusFetchCount > 0"
+ class="more-statuses-button button-unstyled -link -fullwidth"
+ @click.prevent="search(searchTerm, 'statuses')"
+ >
+ <div class="new-status-notification text-center">
+ {{ $t('search.load_more') }}
+ </div>
+ </button>
+ <div
+ v-else-if="loading && statusesOffset > 0"
+ class="text-center loading-icon"
+ >
+ <FAIcon
+ icon="circle-notch"
+ spin
+ size="lg"
+ />
+ </div>
+ <div
+ v-if="(visibleStatuses.length === 0 || lastStatusFetchCount === 0) && !loading && loaded"
+ class="search-result-heading"
+ >
+ <h4>
+ {{ visibleStatuses.length === 0 ? $t('search.no_results') : $t('search.no_more_results') }}
+ </h4>
+ </div>
</div>
<div v-else-if="currenResultTab === 'people'">
<div
@@ -127,7 +148,7 @@
<script src="./search.js"></script>
<style lang="scss">
-@import '../../_variables.scss';
+@import "../../variables";
.search-result-heading {
color: $fallback--faint;
@@ -155,7 +176,7 @@
}
.search-result-footer {
- border-width: 1px 0 0 0;
+ border-width: 1px 0 0;
border-style: solid;
border-color: var(--border, $fallback--border);
padding: 10px;
@@ -210,4 +231,9 @@
}
}
+.more-statuses-button {
+ height: 3.5em;
+ line-height: 3.5em;
+}
+
</style>