You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.3 KiB

  1. <template lang='pug'>
  2. v-dialog(v-model='value', persistent, max-width='350')
  3. v-card.loader-dialog.radius-7(:color='color', dark)
  4. v-card-text.text-xs-center.py-4
  5. atom-spinner.is-inline(
  6. v-if='mode === `loading`'
  7. :animation-duration='1000'
  8. :size='60'
  9. color='#FFF'
  10. )
  11. img(v-else-if='mode === `icon`', :src='`/svg/icon-` + icon + `.svg`', :alt='icon')
  12. .subheading {{ title }}
  13. .caption {{ subtitle }}
  14. </template>
  15. <script>
  16. import { AtomSpinner } from 'epic-spinners'
  17. export default {
  18. components: {
  19. AtomSpinner
  20. },
  21. props: {
  22. value: {
  23. type: Boolean,
  24. default: false
  25. },
  26. color: {
  27. type: String,
  28. default: 'blue darken-3'
  29. },
  30. title: {
  31. type: String,
  32. default: 'Working...'
  33. },
  34. subtitle: {
  35. type: String,
  36. default: 'Please wait'
  37. },
  38. mode: {
  39. type: String,
  40. default: 'loading'
  41. },
  42. icon: {
  43. type: String,
  44. default: 'checkmark'
  45. }
  46. }
  47. }
  48. </script>
  49. <style lang='scss'>
  50. .loader-dialog {
  51. transition: all .4s ease;
  52. .atom-spinner.is-inline {
  53. display: inline-block;
  54. }
  55. .caption {
  56. color: rgba(255,255,255,.7);
  57. }
  58. img {
  59. width: 80px;
  60. }
  61. }
  62. </style>