From 0e749b6eda8c6f1fc5838e8532c6138deb5f2ccc Mon Sep 17 00:00:00 2001 From: Luca Tassinari Date: Tue, 30 Jan 2024 22:55:45 +0100 Subject: [PATCH 01/10] refactor: inline function --- frontend/src/router/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 27aef0b6..b0e07787 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -134,10 +134,7 @@ const router = createRouter({ path: '/user/notifications', name: 'notifications', component: NotificationsView, - beforeEnter: async (to, from) => { - const notificationsStore = useNotificationsStore(); - await notificationsStore.getAllNotifications(); - }, + beforeEnter: async () => await useNotificationsStore().getAllNotifications(), meta: { allowed: [Role.User, Role.Admin] } From 8bbc907c804933f6b3dee3c61df496b9db4a2d3d Mon Sep 17 00:00:00 2001 From: Luca Tassinari Date: Tue, 30 Jan 2024 23:43:36 +0100 Subject: [PATCH 02/10] fix: fix bad url in link and remove not useful error, not authorized views --- frontend/src/components/ElectionComponent.vue | 2 +- frontend/src/router/index.ts | 14 -------------- frontend/src/views/ErrorView.vue | 18 ------------------ frontend/src/views/NoPermissionView.vue | 19 ------------------- frontend/src/views/NotFoundView.vue | 18 ------------------ 5 files changed, 1 insertion(+), 70 deletions(-) delete mode 100644 frontend/src/views/ErrorView.vue delete mode 100644 frontend/src/views/NoPermissionView.vue delete mode 100644 frontend/src/views/NotFoundView.vue diff --git a/frontend/src/components/ElectionComponent.vue b/frontend/src/components/ElectionComponent.vue index da206354..9d4b481e 100644 --- a/frontend/src/components/ElectionComponent.vue +++ b/frontend/src/components/ElectionComponent.vue @@ -4,7 +4,7 @@
  • End: {{ ("0" + election.end.getUTCDate()).slice(-2) }} {{ election.end.toLocaleString('default', { month: 'short' }) }} {{election.end.getFullYear() }} {{ election.end.getHours() }}:{{ ("0" + election.end.getMinutes()).slice(-2) }}
  • -
  • - -
  • +
    @@ -55,14 +47,16 @@ function isOpen(election: VotingWithStatus): boolean { text-decoration: none; } - div.links { - display: inline-block; - padding: 4%; + div.links a { + padding: 6px 0; + margin: 4px 0; + border-radius: 15px; + background-color: #edede9; } - .links ul { - margin-left: 0; - padding-left: 0; + div.links a:hover { + font-weight: bold; + box-shadow: 1px 2px 5px rgba(200, 200, 200, 0.82); } .card { diff --git a/frontend/src/views/DashboardView.vue b/frontend/src/views/DashboardView.vue index 014715cf..0aaea8c4 100644 --- a/frontend/src/views/DashboardView.vue +++ b/frontend/src/views/DashboardView.vue @@ -2,7 +2,7 @@
    - {{ capitalizeFirstLetter(qualifier) }} Elections +

    {{ capitalizeFirstLetter(qualifier) }} Elections


    @@ -104,9 +104,16 @@ function getData(qualifier: string) { diff --git a/frontend/src/views/UserAreaView.vue b/frontend/src/views/UserAreaView.vue index 36added8..5a5dc034 100644 --- a/frontend/src/views/UserAreaView.vue +++ b/frontend/src/views/UserAreaView.vue @@ -1,7 +1,7 @@