Multiple fixes for CSS, added proper auth checking

This commit is contained in:
Henry Jameson 2020-05-24 02:06:55 +03:00
parent bcebec478e
commit ab74cd4972
8 changed files with 263 additions and 193 deletions

View file

@ -1,9 +1,9 @@
<template>
<div
v-show="isOpen"
v-body-scroll-lock="isOpen"
v-body-scroll-lock="isOpen && !noBackground"
class="modal-view"
:class="{ 'modal-background': !noBackground }"
:class="classes"
@click.self="$emit('backdropClicked')"
>
<slot />
@ -21,6 +21,14 @@ export default {
type: Boolean,
default: false
}
},
computed: {
classes () {
return {
'modal-background': !this.noBackground,
'open': this.isOpen
}
}
}
}
</script>
@ -40,6 +48,7 @@ export default {
pointer-events: none;
animation-duration: 0.2s;
animation-name: modal-background-fadein;
opacity: 0;
> * {
pointer-events: initial;
@ -50,8 +59,8 @@ export default {
background-color: rgba(0, 0, 0, 0.5);
}
body:not(.scroll-locked) & {
opacity: 0;
&.open {
opacity: 1;
}
}