2021-04-09 16:09:22 +00:00
|
|
|
<template>
|
2021-04-11 21:00:23 +00:00
|
|
|
<div class="Flash">
|
|
|
|
<div
|
2021-04-12 21:08:17 +00:00
|
|
|
v-if="player === true || player === 'hidden'"
|
2021-04-11 21:52:16 +00:00
|
|
|
ref="container"
|
2021-04-11 21:00:23 +00:00
|
|
|
class="player"
|
|
|
|
:class="{ hidden: player === 'hidden' }"
|
|
|
|
/>
|
|
|
|
<button
|
2021-04-12 21:08:17 +00:00
|
|
|
v-if="player !== true"
|
2021-04-11 21:00:23 +00:00
|
|
|
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-12 21:08:17 +00:00
|
|
|
<span
|
|
|
|
v-if="player === 'error'"
|
|
|
|
class="label"
|
|
|
|
>
|
|
|
|
{{ $t('general.flash_fail') }}
|
|
|
|
</span>
|
2021-04-11 21:07:28 +00:00
|
|
|
<span
|
|
|
|
v-else
|
|
|
|
class="label"
|
|
|
|
>
|
2021-04-12 21:08:17 +00:00
|
|
|
<p>
|
|
|
|
{{ $t('general.flash_content') }}
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<FAIcon icon="exclamation-triangle" />
|
|
|
|
{{ $t('general.flash_security') }}
|
|
|
|
</p>
|
2021-04-11 21:00:23 +00:00
|
|
|
</span>
|
|
|
|
</button>
|
2021-04-11 21:07:28 +00:00
|
|
|
</div>
|
2021-04-09 16:09:22 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./flash.js"></script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
.Flash {
|
2021-06-17 23:01:37 +00:00
|
|
|
display: inline-block;
|
2021-04-11 21:00:23 +00:00
|
|
|
width: 100%;
|
2021-06-17 23:01:37 +00:00
|
|
|
height: 100%;
|
2021-04-11 21:00:23 +00:00
|
|
|
position: relative;
|
|
|
|
|
|
|
|
.player {
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
2021-06-17 23:01:37 +00:00
|
|
|
.placeholder {
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
background: var(--bg);
|
|
|
|
color: var(--link);
|
|
|
|
}
|
|
|
|
|
2021-04-11 21:00:23 +00:00
|
|
|
.hider {
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
|
2021-04-12 21:08:17 +00:00
|
|
|
.label {
|
|
|
|
text-align: center;
|
|
|
|
flex: 1 1 0;
|
|
|
|
line-height: 1.2;
|
|
|
|
white-space: normal;
|
|
|
|
word-wrap: normal;
|
|
|
|
}
|
|
|
|
|
2021-04-11 21:00:23 +00:00
|
|
|
.hidden {
|
|
|
|
display: none;
|
|
|
|
visibility: 'hidden';
|
|
|
|
}
|
2021-04-09 16:09:22 +00:00
|
|
|
}
|
|
|
|
</style>
|