From c83b96f5c29718480e4e9a2a9166b13e6e60dc76 Mon Sep 17 00:00:00 2001 From: becca Date: Sun, 22 Mar 2020 20:41:51 +0100 Subject: [PATCH 1/9] fix logout --- frontend/src/api.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/api.js b/frontend/src/api.js index 767fb65..15bfd31 100644 --- a/frontend/src/api.js +++ b/frontend/src/api.js @@ -51,7 +51,10 @@ export default { }); }, logout() { - return get("/users/logout"); + return get("/users/logout").then(resp => { + store.set("user", null); + store.set("loggedIn", false); + }); }, register(user) { return post("/users/register", user); From 172a3732378485d6210e785295a9c4efbb3bc854 Mon Sep 17 00:00:00 2001 From: becca Date: Sun, 22 Mar 2020 20:56:09 +0100 Subject: [PATCH 2/9] add rooms page --- frontend/src/assets/rooms.svg | 1 + frontend/src/views/Help.vue | 2 +- frontend/src/views/Rooms.vue | 34 +++++++++++++++++++++++++++++++++- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 frontend/src/assets/rooms.svg diff --git a/frontend/src/assets/rooms.svg b/frontend/src/assets/rooms.svg new file mode 100644 index 0000000..84e21f8 --- /dev/null +++ b/frontend/src/assets/rooms.svg @@ -0,0 +1 @@ +exams \ No newline at end of file diff --git a/frontend/src/views/Help.vue b/frontend/src/views/Help.vue index d807f50..5a29831 100644 --- a/frontend/src/views/Help.vue +++ b/frontend/src/views/Help.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/views/Rooms.vue b/frontend/src/views/Rooms.vue index e84a539..41e0c26 100644 --- a/frontend/src/views/Rooms.vue +++ b/frontend/src/views/Rooms.vue @@ -1,5 +1,37 @@ + + From 96e726536ee30bf4680e5b7c54ed641d3e4995d7 Mon Sep 17 00:00:00 2001 From: becca Date: Sun, 22 Mar 2020 21:16:46 +0100 Subject: [PATCH 3/9] add potential room cards --- frontend/src/components/RoomCard.vue | 53 +++++++++++++++++++++++++++ frontend/src/components/TrackCard.vue | 6 --- frontend/src/views/Room.vue | 2 +- frontend/src/views/Rooms.vue | 45 +++++++++++++++++++++++ 4 files changed, 99 insertions(+), 7 deletions(-) create mode 100644 frontend/src/components/RoomCard.vue diff --git a/frontend/src/components/RoomCard.vue b/frontend/src/components/RoomCard.vue new file mode 100644 index 0000000..5ffd3d2 --- /dev/null +++ b/frontend/src/components/RoomCard.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/frontend/src/components/TrackCard.vue b/frontend/src/components/TrackCard.vue index 7477324..219b17b 100644 --- a/frontend/src/components/TrackCard.vue +++ b/frontend/src/components/TrackCard.vue @@ -1,12 +1,6 @@ + + From 01d279df42620daf8b3e41d5e06c7901e4929ce0 Mon Sep 17 00:00:00 2001 From: Lukas Ehnle Date: Sun, 22 Mar 2020 21:24:41 +0100 Subject: [PATCH 4/9] feat: real room data --- frontend/src/api.js | 11 ++++++ frontend/src/components/SideBar.vue | 8 ++-- frontend/src/components/SidebarList.vue | 20 +--------- frontend/src/store/index.js | 41 +++++++++++++++++++ frontend/src/views/Room.vue | 52 ++++++++++++++----------- 5 files changed, 87 insertions(+), 45 deletions(-) diff --git a/frontend/src/api.js b/frontend/src/api.js index 8dae6f2..33f28b9 100644 --- a/frontend/src/api.js +++ b/frontend/src/api.js @@ -58,5 +58,16 @@ export default { }, track(id) { return get("/track/" + id); + }, + rooms() { + return get("/rooms/"); + }, + room(id) { + return get("/rooms/" + id); + }, + roomMessages(id) { + return get(`/rooms/${id}/messages`).then(messages => { + return messages.error ? [] : messages; + }); } }; diff --git a/frontend/src/components/SideBar.vue b/frontend/src/components/SideBar.vue index e387270..da1f7b8 100644 --- a/frontend/src/components/SideBar.vue +++ b/frontend/src/components/SideBar.vue @@ -6,9 +6,9 @@ :type="'kurs'" >
-