pinafore/routes/_components/LoadingMask.html
Nolan Lawson 42be854521
upgrade to svelte 2.0 (#251)
* upgrade to svelte 2.0

* update svelte-loader to 2.9.0
2018-05-01 17:05:36 -07:00

46 lines
983 B
HTML

<div class="loading-mask-container {shown ? 'loading-mask-container-shown' : ''}">
{#if shown}
<div class="loading-mask">
<LoadingSpinner maskStyle="true"/>
</div>
{/if}
</div>
<style>
.loading-mask-container {
left: 0;
right: 0;
top: 0;
bottom: 0;
position: fixed;
z-index: 100;
pointer-events: none;
opacity: 0;
transition: opacity 333ms linear;
}
.loading-mask-container.loading-mask-container-shown {
pointer-events: auto;
opacity: 0.6;
}
.loading-mask {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: var(--mask-bg);
}
</style>
<script>
import LoadingSpinner from './LoadingSpinner.html'
import { store } from '../_store/store'
export default {
store: () => store,
computed: {
shown: ({ $logInToInstanceLoading }) => $logInToInstanceLoading
},
components: {
LoadingSpinner
}
}
</script>