logo

pleroma-fe

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

dialog_modal.vue (1508B)


  1. <template>
  2. <span
  3. :class="{ 'dark-overlay': darkOverlay }"
  4. @click.self.stop="onCancel()"
  5. >
  6. <div
  7. class="dialog-modal panel panel-default"
  8. @click.stop=""
  9. >
  10. <div class="panel-heading dialog-modal-heading">
  11. <div class="title">
  12. <slot name="header" />
  13. </div>
  14. </div>
  15. <div class="panel-body dialog-modal-content">
  16. <slot name="default" />
  17. </div>
  18. <div class="dialog-modal-footer user-interactions panel-footer">
  19. <slot name="footer" />
  20. </div>
  21. </div>
  22. </span>
  23. </template>
  24. <script src="./dialog_modal.js"></script>
  25. <style lang="scss">
  26. // TODO: unify with other modals.
  27. .dark-overlay {
  28. &::before {
  29. bottom: 0;
  30. content: " ";
  31. display: block;
  32. cursor: default;
  33. left: 0;
  34. position: fixed;
  35. right: 0;
  36. top: 0;
  37. background: rgb(27 31 35 / 50%);
  38. z-index: 2000;
  39. }
  40. }
  41. .dialog-modal.panel {
  42. top: 0;
  43. left: 50%;
  44. max-height: 80vh;
  45. max-width: 90vw;
  46. margin: 15vh auto;
  47. position: fixed;
  48. transform: translateX(-50%);
  49. z-index: 2001;
  50. cursor: default;
  51. display: block;
  52. .dialog-modal-heading {
  53. .title {
  54. text-align: center;
  55. }
  56. }
  57. .dialog-modal-content {
  58. margin: 0;
  59. padding: 1rem;
  60. white-space: normal;
  61. }
  62. .dialog-modal-footer {
  63. margin: 0;
  64. padding: 0.5em;
  65. border-top: 1px solid var(--border);
  66. display: flex;
  67. justify-content: flex-end;
  68. button {
  69. width: auto;
  70. margin-left: 0.5rem;
  71. }
  72. }
  73. }
  74. </style>