diff --git a/frontend/src/Apps/Forums.vue b/frontend/src/Apps/Forums.vue index 50e17f6..0effc5c 100644 --- a/frontend/src/Apps/Forums.vue +++ b/frontend/src/Apps/Forums.vue @@ -18,7 +18,6 @@ const selectedCourse = ref(); const selectedForum = ref(); const Role = (await getSelf()).role; -const addForum = ref(false); const addForumName = ref(""); const addPost = ref(false); const addPostSubject = ref(""); @@ -33,10 +32,10 @@ const addPostContent = ref(""); {{course.title}} - + {{forum.name}} + Create Forum - + {{ post.subject }} @@ -49,14 +48,14 @@ const addPostContent = ref(""); {{msg.author.firtName}} {{msg.author.lastName}} - {{msg.content}} - + - + - + New Forum: @@ -64,9 +63,9 @@ const addPostContent = ref(""); New Post: - + - + @@ -139,11 +138,15 @@ const addPostContent = ref(""); text-align: center; } -#ForumSelector button{ +#PostSelector button{ background-color: green; + color: white; border: none; - border-radius: 25%; - margin: 10px; + height: 4vh; + margin: 5px; + border-radius: 0 30px 30px 0; + align-items: center; + justify-content: center; } #PostSelector{ @@ -187,7 +190,12 @@ const addPostContent = ref(""); #Post{ padding: 25px; + color: white; +} +#Post > h1{ + text-align: center; + text-decoration: underline; } #Messages{ diff --git a/frontend/src/rest/forum.js b/frontend/src/rest/forum.js index 5aa49a0..637245f 100644 --- a/frontend/src/rest/forum.js +++ b/frontend/src/rest/forum.js @@ -25,7 +25,9 @@ export function createForum(id, name){ * List post of a specified forum */ export async function getPostsOfForum(id){ - PostsOfCurrentForum.value = await restGet("/forum/" + id); + if(id != null){ + PostsOfCurrentForum.value = await restGet("/forum/" + id); + } } export function createPost(id, subject, content){
{{msg.author.firtName}} {{msg.author.lastName}} - {{msg.content}}