Sort box
This commit is contained in:
parent
a0eb43188f
commit
08ba649a91
|
@ -56,7 +56,15 @@ async function dummyThemes() {
|
|||
author: dummyAuthor
|
||||
});
|
||||
}
|
||||
return { docs: dummies, total: 25 };
|
||||
return {
|
||||
docs: dummies,
|
||||
pagination: {
|
||||
total: 25,
|
||||
pages: 3,
|
||||
limit: 9,
|
||||
page: 1
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default class BdWebApi {
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
<div class="bd-fancySearch" :class="{'bd-disabled': loadingOnline, 'bd-active': loadingOnline || (onlineThemes && onlineThemes.docs)}">
|
||||
<input type="text" class="bd-textInput" placeholder="Search" @keydown.enter="searchInput" @keyup.stop />
|
||||
</div>
|
||||
<div class="bd-searchSort">
|
||||
<span>Sort by:</span>
|
||||
</div>
|
||||
<div v-if="loadingOnline" class="bd-spinnerContainer">
|
||||
<div class="bd-spinner7"/>
|
||||
</div>
|
||||
|
@ -95,7 +98,7 @@
|
|||
const getThemes = await BdWebApi.themes.get();
|
||||
this.onlineThemes = getThemes;
|
||||
if (!this.onlineThemes.docs) return;
|
||||
this.searchHint = `${this.onlineThemes.total} Results`;
|
||||
this.searchHint = `${this.onlineThemes.pagination.total} Results`;
|
||||
} catch (err) {
|
||||
Logger.err('ThemesView', err);
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue