logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/

flash.vue (1461B)


  1. <template>
  2. <div class="Flash">
  3. <div
  4. v-if="player === true || player === 'hidden'"
  5. ref="container"
  6. class="player"
  7. :class="{ hidden: player === 'hidden' }"
  8. />
  9. <button
  10. v-if="player !== true"
  11. class="button-unstyled placeholder"
  12. @click="openPlayer"
  13. >
  14. <span
  15. v-if="player === 'hidden'"
  16. class="label"
  17. >
  18. {{ $t('general.loading') }}
  19. </span>
  20. <span
  21. v-if="player === 'error'"
  22. class="label"
  23. >
  24. {{ $t('general.flash_fail') }}
  25. </span>
  26. <span
  27. v-else
  28. class="label"
  29. >
  30. <p>
  31. {{ $t('general.flash_content') }}
  32. </p>
  33. <p>
  34. <FAIcon icon="exclamation-triangle" />
  35. {{ $t('general.flash_security') }}
  36. </p>
  37. </span>
  38. </button>
  39. </div>
  40. </template>
  41. <script src="./flash.js"></script>
  42. <style lang="scss">
  43. .Flash {
  44. display: inline-block;
  45. width: 100%;
  46. height: 100%;
  47. position: relative;
  48. .player {
  49. height: 100%;
  50. width: 100%;
  51. }
  52. .placeholder {
  53. height: 100%;
  54. width: 100%;
  55. display: flex;
  56. align-items: center;
  57. justify-content: center;
  58. background: var(--bg);
  59. color: var(--link);
  60. }
  61. .hider {
  62. top: 0;
  63. }
  64. .label {
  65. text-align: center;
  66. flex: 1 1 0;
  67. line-height: 1.2;
  68. white-space: normal;
  69. word-wrap: normal;
  70. }
  71. .hidden {
  72. display: none;
  73. visibility: "hidden";
  74. }
  75. }
  76. </style>