From 28f4f9c0296388901002ea3d0b3aab0e86424d47 Mon Sep 17 00:00:00 2001 From: Bram Reyniers <55666730+reyniersbram@users.noreply.github.com> Date: Fri, 19 Apr 2024 13:45:34 +0200 Subject: [PATCH] Release 2 (some additional fixes) (#148) * adminpanel tabel met mock data * only require certificates when running during development * quick fix * run formatter * finalize ui * i18n * use live data * toggle admin * toggle teacher * sort isTeacher and isAdmin with true first * Update frontend/src/components/project/submit/SubmitCard.vue Co-authored-by: Pieter Janin * Update frontend/src/components/project/submit/SubmitCard.vue Co-authored-by: Pieter Janin --------- Co-authored-by: Marieke Co-authored-by: Pieter Janin --- .../components/project/submit/SubmitCard.vue | 15 ++- frontend/src/i18n/locales/en.ts | 10 ++ frontend/src/i18n/locales/nl.ts | 11 +- frontend/src/queries/User.ts | 71 ++++++++-- frontend/src/services/user.ts | 12 +- frontend/src/views/AdminView.vue | 126 +++++++++++++++++- frontend/vite.config.ts | 4 +- 7 files changed, 228 insertions(+), 21 deletions(-) diff --git a/frontend/src/components/project/submit/SubmitCard.vue b/frontend/src/components/project/submit/SubmitCard.vue index 024042e0..7c01e15f 100644 --- a/frontend/src/components/project/submit/SubmitCard.vue +++ b/frontend/src/components/project/submit/SubmitCard.vue @@ -3,10 +3,13 @@ {{ $t("submit.submit_title") }} - +

Error

+ - + + + @@ -30,10 +33,16 @@ diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 39603e6d..f73aa5fb 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -6,7 +6,7 @@ import vue from "@vitejs/plugin-vue"; import fs from "fs"; import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite"; -const isTesting = process.env.NODE_ENV === 'test' +const needsCertificate = process.env.NODE_ENV === 'development' export default defineConfig({ plugins: [ @@ -22,7 +22,7 @@ export default defineConfig({ }, }, server: { - https: isTesting ? undefined : { + https: !needsCertificate ? undefined : { key: fs.readFileSync('./local-cert/localhost-key.pem'), cert: fs.readFileSync('./local-cert/localhost.pem') },