+
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
+
-
-
diff --git a/webui/src/main.js b/webui/src/main.js
index 1dfbdb0..6527108 100644
--- a/webui/src/main.js
+++ b/webui/src/main.js
@@ -2,6 +2,7 @@ import {createApp, reactive} from 'vue'
import App from './App.vue'
import router from './router'
import { axios, updateToken as axiosUpdate } from './services/axios.js';
+import getCurrentSession from './services/authentication';
import ErrorMsg from './components/ErrorMsg.vue'
import LoadingSpinner from './components/LoadingSpinner.vue'
import PostCard from './components/PostCard.vue'
@@ -12,13 +13,18 @@ import 'bootstrap-icons/font/bootstrap-icons.css'
import './assets/dashboard.css'
import './assets/main.css'
+// Create the Vue SPA
const app = createApp(App)
app.config.globalProperties.$axios = axios;
app.config.globalProperties.$axiosUpdate = axiosUpdate;
+app.config.globalProperties.$currentSession = getCurrentSession;
+
+// Register the components
app.component("ErrorMsg", ErrorMsg);
app.component("LoadingSpinner", LoadingSpinner);
app.component("PostCard", PostCard);
app.component("UserCard", UserCard);
app.component("Modal", Modal);
+
app.use(router)
app.mount('#app')
\ No newline at end of file
diff --git a/webui/src/views/HomeView.vue b/webui/src/views/HomeView.vue
index ae4859b..018b269 100644
--- a/webui/src/views/HomeView.vue
+++ b/webui/src/views/HomeView.vue
@@ -1,5 +1,4 @@
@@ -87,9 +83,5 @@ export default {
-
-
-
-
+
\ No newline at end of file
diff --git a/webui/src/views/LoginView.vue b/webui/src/views/LoginView.vue
index b39a68a..5489cea 100644
--- a/webui/src/views/LoginView.vue
+++ b/webui/src/views/LoginView.vue
@@ -1,6 +1,4 @@
diff --git a/webui/src/views/ProfileView.vue b/webui/src/views/ProfileView.vue
index dc5ee1c..51f7640 100644
--- a/webui/src/views/ProfileView.vue
+++ b/webui/src/views/ProfileView.vue
@@ -1,5 +1,4 @@
@@ -90,7 +85,7 @@ export default {
:name = "user_data['name']"
:followed = "user_data['followed']"
:banned = "user_data['banned']"
- :my_id = "getCurrentSession"
+ :my_id = "this.$currentSession"
:show_new_post = "true"
@updateInfo = "getMainData"
@updatePosts = "refresh" />
@@ -128,9 +123,7 @@ export default {