DigitalConsumer.FixMyGlass/src/common-components/loading-modal/loading-modal.vue
2022-05-19 09:34:59 -04:00

91 lines
No EOL
1.9 KiB
Vue

<template>
<div v-if="isModalVisible" class="loading-modal-backdrop">
<div class="loading-modal">
<section class="loading-modal-body">
<div class="modal-icon-container text-center">
<object type="image/svg+xml" :data="fmgAnimatedTransition"/>
</div>
</section>
</div>
<div class="gif-test">
<img src="@/assets/img/wiper-loader.gif">
</div>
</div>
</template>
<script>
// load the path like this - <object> data attribute doesn't load the relative path correctly
const FMGAnimatedTransition = require("@/assets/img/FMGTransitionAnimation.svg");
export default {
name: 'Modal',
data() {
return {
isModalVisible: false,
fmgAnimatedTransition: FMGAnimatedTransition,
};
},
methods: {
showModal() {
this.isModalVisible = true;
},
},
};
</script>
<style lang="scss">
.loading-modal-backdrop {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: #e5e5e5;
display: flex;
justify-content: center;
align-items: center;
z-index: 1050;
width: 100vw;
height: 100vh;
}
.loading-modal {
position: absolute;
background: #ffffff;
padding: 0 0 32px 0;
box-shadow: 2px 2px 20px 1px;
overflow: hidden;
display: flex;
flex-direction: column;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
border-radius: 4px;
top: 48px;
height: 186px;
width: 327px;
}
.loading-modal-text {
padding: 0 24px 0 24px;
}
.modal-icon-container {
margin: 15px auto;
padding-bottom: 26px;
}
.modal-icon-container img {
position: absolute;
vertical-align: middle;
border: 0;
width: 327px;
height: 186px;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.loader-gif {
width: 75px;
height: 75px;
}
</style>