diff --git a/components/base/SideNav.vue b/components/base/SideNav.vue index 19e0e53..98bc6b7 100644 --- a/components/base/SideNav.vue +++ b/components/base/SideNav.vue @@ -5,14 +5,15 @@ const emit = defineEmits([ 'state' ]) const store = useAuthStore(); -const account = ref({}); const dashboardState = ref(0); +const account = ref({}); + try { account.value = await $fetch('http://127.0.0.1:3890/v1/account/identity', { headers: { Authorization: `Bearer ${store.token}` } - }) + }); } catch (error) { if (error.response && error.response.status === 401) { store.logout() @@ -21,6 +22,7 @@ try { console.error(error); } } + function changeDashboardState(state: number) { switch (state) { case 0: @@ -29,6 +31,9 @@ function changeDashboardState(state: number) { case 1: emit('state', 1) break; + case 2: + emit('state', 2) + break; } } function getPermsLevel(perm: number) { @@ -37,6 +42,8 @@ function getPermsLevel(perm: number) { return 'User'; case 1: return 'Moderator' + case 2: + return 'SAdmin' } } @@ -101,8 +108,8 @@ function getPermsLevel(perm: number) { Projects diff --git a/components/card.vue b/components/card.vue index 306818c..ea08a1e 100644 --- a/components/card.vue +++ b/components/card.vue @@ -33,7 +33,11 @@ export default { } }, mounted() { - this.image += this.project.image + if (this.project.image !== undefined) { + this.image += this.project.image + } else { + this.image += 'default.png' + } } } diff --git a/components/dashboard/CRUD/CategoryCreation.vue b/components/dashboard/CRUD/CategoryCreation.vue new file mode 100644 index 0000000..41fdfd7 --- /dev/null +++ b/components/dashboard/CRUD/CategoryCreation.vue @@ -0,0 +1,129 @@ + + +
+
+

Add a new game

+
+
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+ + + diff --git a/components/dashboard/DevCard.vue b/components/dashboard/DevCard.vue new file mode 100644 index 0000000..84691ac --- /dev/null +++ b/components/dashboard/DevCard.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/components/dashboard/DevProjectCard.vue b/components/dashboard/DevProjectCard.vue index c578e02..ffde5ba 100644 --- a/components/dashboard/DevProjectCard.vue +++ b/components/dashboard/DevProjectCard.vue @@ -16,7 +16,7 @@ function check() {