diff options
| author | Henry Jameson <me@hjkos.com> | 2019-06-16 20:24:03 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2019-06-16 20:24:03 +0300 |
| commit | b00da1778830853e0bed4cb1d0fa93ca09a82167 (patch) | |
| tree | 8072f743384b45dc2b4a62e619bb0b1db3e3ebf9 /src/components/dialog_modal/dialog_modal.vue | |
| parent | 6c7cf7d9b5f2faec03fe75881b5ec81e0ac851fd (diff) | |
| parent | 1db3c785d805bfe1e7bb09f2d85875448cb03f9a (diff) | |
Merge remote-tracking branch 'upstream/develop' into docs
* upstream/develop: (374 commits)
fix typo
rename mutations according to actual property names
fix
fix
fix logged out post-update
fix user banner
fix
AMERICA
comments
No longer sending extra data, renamed some properties
Revert "add TOTP/Recovery Form for mobile version"
Apply suggestion to src/services/entity_normalizer/entity_normalizer.service.js
i18n/Update Japanese translation
render modal at the root level using portal
install portal vue
Small improve of the who to follow panel layout
Fix/Small fix in the who to follow page
remove console spam
i18n
wire up user.description with masto api data
...
Diffstat (limited to 'src/components/dialog_modal/dialog_modal.vue')
| -rw-r--r-- | src/components/dialog_modal/dialog_modal.vue | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/src/components/dialog_modal/dialog_modal.vue b/src/components/dialog_modal/dialog_modal.vue new file mode 100644 index 00000000..3da543de --- /dev/null +++ b/src/components/dialog_modal/dialog_modal.vue @@ -0,0 +1,94 @@ +<template> + <span v-bind:class="{ 'dark-overlay': darkOverlay }" @click.self.stop='onCancel()'> + <div class="dialog-modal panel panel-default" @click.stop=''> + <div class="panel-heading dialog-modal-heading"> + <div class="title"> + <slot name="header"></slot> + </div> + </div> + <div class="dialog-modal-content"> + <slot name="default"></slot> + </div> + <div class="dialog-modal-footer user-interactions panel-footer"> + <slot name="footer"></slot> + </div> + </div> + </span> +</template> + +<script src="./dialog_modal.js"></script> + +<style lang="scss"> +@import '../../_variables.scss'; + +// TODO: unify with other modals. +.dark-overlay { + &::before { + bottom: 0; + content: " "; + display: block; + cursor: default; + left: 0; + position: fixed; + right: 0; + top: 0; + background: rgba(27,31,35,.5); + z-index: 99; + } +} + +.dialog-modal.panel { + top: 0; + left: 50%; + max-height: 80vh; + max-width: 90vw; + margin: 15vh auto; + position: fixed; + transform: translateX(-50%); + z-index: 999; + cursor: default; + display: block; + background-color: $fallback--bg; + background-color: var(--bg, $fallback--bg); + + .dialog-modal-heading { + padding: .5em .5em; + margin-right: auto; + margin-bottom: 0; + white-space: nowrap; + color: var(--panelText); + background-color: $fallback--fg; + background-color: var(--panel, $fallback--fg); + + .title { + margin-bottom: 0; + text-align: center; + } + } + + .dialog-modal-content { + margin: 0; + padding: 1rem 1rem; + background-color: $fallback--lightBg; + background-color: var(--lightBg, $fallback--lightBg); + white-space: normal; + } + + .dialog-modal-footer { + margin: 0; + padding: .5em .5em; + background-color: $fallback--lightBg; + background-color: var(--lightBg, $fallback--lightBg); + border-top: 1px solid $fallback--bg; + border-top: 1px solid var(--bg, $fallback--bg); + display: flex; + justify-content: flex-end; + + button { + width: auto; + margin-left: .5rem; + } + } +} + +</style> |
