-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b6164d
commit dd699dc
Showing
5 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2676432337f7cceab17a289a8cf656eb | ||
9033e10d7355cd19ee74ae19116cf9e3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,55 @@ | ||
<script lang="ts" setup> | ||
import MainNav from './components/MainNav.vue' | ||
import { storeToRefs } from 'pinia' | ||
import { ref, reactive, onMounted, watch } from 'vue' | ||
import { useProjectStore } from './project'; | ||
import { Modal } from 'bootstrap'; | ||
const project = useProjectStore() | ||
const { errMsg } = storeToRefs(project) | ||
const modalInstance = ref<Modal | null>(); | ||
onMounted(() => { | ||
modalInstance.value = new Modal(document.getElementById("errorModal") as Element); | ||
}) | ||
watch(errMsg, () => { | ||
if (errMsg != null) modalInstance.value?.show() | ||
}) | ||
function closeModal() { | ||
project.errMsg = null; | ||
modalInstance.value?.hide() | ||
} | ||
</script> | ||
|
||
<template> | ||
<MainNav /> | ||
<div class="container-fluid"> | ||
<router-view /> | ||
</div> | ||
|
||
<div class="modal fade" id="errorModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" | ||
aria-labelledby="staticBackdropLabel" aria-hidden="true"> | ||
<div class="modal-dialog modal-lg"> | ||
<div class="modal-content"> | ||
<div class="modal-header text-bg-danger"> | ||
<h1 class="modal-title fs-5" id="staticBackdropLabel">Error</h1> | ||
<button type="button" class="btn-close" @click="closeModal()" aria-label="Close"></button> | ||
</div> | ||
<div class="modal-body"> | ||
{{ project.errMsg }} | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-primary" @click="closeModal()">Close</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</template> | ||
|
||
<style></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters