From dc9ec554427feb136d428ebbad831fbf073b49ab Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Wed, 30 Sep 2020 18:40:22 +0100 Subject: [PATCH] Flesh out the Board list view --- src/api/board.js | 18 +++++ src/components/BoardListItem.vue | 129 +++++++++++++++++++++++++++++++ src/views/BoardList.vue | 58 +++++++++++++- 3 files changed, 203 insertions(+), 2 deletions(-) create mode 100644 src/api/board.js create mode 100644 src/components/BoardListItem.vue diff --git a/src/api/board.js b/src/api/board.js new file mode 100644 index 0000000..3ad0c8c --- /dev/null +++ b/src/api/board.js @@ -0,0 +1,18 @@ +import Axios from 'axios' + +import base from './base.js' + +const BOARDS_URL = `${base.baseUrl}/boards` + +export default { + async get (boardId) { + const { data: board } = await Axios.get(`${BOARDS_URL}/${boardId}`) + return board + }, + + async browse (params) { + const query = base.buildQueryString(params) + const { data: boards } = await Axios.get(`${BOARDS_URL}?${query}`) + return boards + } +} diff --git a/src/components/BoardListItem.vue b/src/components/BoardListItem.vue new file mode 100644 index 0000000..8662541 --- /dev/null +++ b/src/components/BoardListItem.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/src/views/BoardList.vue b/src/views/BoardList.vue index e7209b1..7ee443a 100644 --- a/src/views/BoardList.vue +++ b/src/views/BoardList.vue @@ -1,5 +1,59 @@ + + + +