From 08ba649a9176cded11527684424bb0cda442ed23 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Sun, 2 Dec 2018 00:40:14 +0200 Subject: [PATCH] Sort box --- client/src/modules/bdwebapi.js | 10 +++++++++- client/src/ui/components/bd/ThemesView.vue | 5 ++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/client/src/modules/bdwebapi.js b/client/src/modules/bdwebapi.js index 941c4a72..89017d42 100644 --- a/client/src/modules/bdwebapi.js +++ b/client/src/modules/bdwebapi.js @@ -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 { diff --git a/client/src/ui/components/bd/ThemesView.vue b/client/src/ui/components/bd/ThemesView.vue index 5c45007a..042b6c99 100644 --- a/client/src/ui/components/bd/ThemesView.vue +++ b/client/src/ui/components/bd/ThemesView.vue @@ -33,6 +33,9 @@
+
+ Sort by: +
@@ -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 {