akkoma-fe/src/components/flash/flash.vue

69 lines
1.1 KiB
Vue
Raw Normal View History

<template>
2021-04-11 21:00:23 +00:00
<div class="Flash">
<div
v-if="player"
ref="cunt"
class="player"
:class="{ hidden: player === 'hidden' }"
/>
<button
v-if="player === false || player === 'hidden'"
class="button-unstyled placeholder"
2021-04-11 21:07:28 +00:00
@click="openPlayer"
2021-04-11 21:00:23 +00:00
>
2021-04-11 21:07:28 +00:00
<span
v-if="player === 'hidden'"
class="label"
>
2021-04-11 21:00:23 +00:00
{{ $t('general.loading') }}
</span>
2021-04-11 21:07:28 +00:00
<span
v-else
class="label"
>
2021-04-11 21:00:23 +00:00
{{ $t('general.flash_content') }}
</span>
</button>
<button
v-if="player"
class="button-unstyled hider"
@click="closePlayer"
>
<FAIcon icon="stop" />
2021-04-11 21:07:28 +00:00
</button>
</div>
</template>
<script src="./flash.js"></script>
<style lang="scss">
@import '../../_variables.scss';
.Flash {
2021-04-11 21:00:23 +00:00
width: 100%;
height: 260px;
position: relative;
.player {
height: 100%;
width: 100%;
}
.hider {
top: 0;
}
.hidden {
display: none;
visibility: 'hidden';
}
.placeholder {
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
}
</style>