Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
refactor: fix links + enforce closing the modal only with x button
Browse files Browse the repository at this point in the history
  • Loading branch information
tassiluca committed Feb 1, 2024
1 parent b362d1d commit d39038b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/vote/RequestCodeModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function sendCodeRequest(id: string) {
</script>

<template>
<div class="modal fade" tabindex="-1">
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import CreateElectionView from "@/views/CreateElectionView.vue";
import RegisterView from "@/views/RegisterView.vue";
import UserAreaView from "@/views/UserAreaView.vue";
import ElectionDetails from "@/views/ElectionDetails.vue";
import ElectionsTestView from '@/views/ElectionsTestView.vue';
import CodeInsertionView from '@/views/CodeInsertionView.vue';
import VoteView from "@/views/VoteView.vue";
import ElectionsView from "@/views/ElectionsView.vue";
Expand Down Expand Up @@ -72,11 +71,6 @@ const router = createRouter({
allowed: [Role.User, Role.Admin]
}
},
{
path: '/test-modal',
name: 'test-modal',
component: ElectionsTestView
},
{
path: '/insert-code/:id',
name: 'insert-code',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/ElectionDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async function getVotingDetails(id: string) {
</script>

<template>
<Breadcrumb :paths="[{name: 'Dashboard', link: '/dashboard'}, {name: 'Details', link: '/voting/details'}]" />
<Breadcrumb :paths="[{name: 'Dashboard', link: '/dashboard'}, {name: 'Details', link: '/elections/details'}]" />
<div v-if="election" class="container-sm col-md-7 text-center">
<PageTitle title="Voting details" />
<div class="row">
Expand Down
1 change: 1 addition & 0 deletions frontend/src/views/VoteView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
submitting.value = true;
try {
response.value = await useVotingStore().castVote(choosedOption.value);
setTimeout(async () => await router.replace(`/elections/${electionId}`), 2000);
} catch (e: any) {
response.value = {
success: false,
Expand Down

0 comments on commit d39038b

Please sign in to comment.