diff --git a/app/components/button-with-dialog.hbs b/app/components/button-with-dialog.hbs new file mode 100644 index 00000000000..2c7220fd7da --- /dev/null +++ b/app/components/button-with-dialog.hbs @@ -0,0 +1,19 @@ + + +
+ {{#if this.isOpen}} +
+ {{yield this.toggleDialog this.isOpen}} +
+ {{/if}} +
\ No newline at end of file diff --git a/app/components/button-with-dialog.js b/app/components/button-with-dialog.js new file mode 100644 index 00000000000..9d48244cd34 --- /dev/null +++ b/app/components/button-with-dialog.js @@ -0,0 +1,11 @@ +import { action } from '@ember/object'; +import Component from '@glimmer/component'; +import { tracked } from '@glimmer/tracking'; + +export default class ButtonWithConfirmationDialog extends Component { + @tracked isOpen = false; + + @action toggleDialog(state) { + this.isOpen = state === undefined ? !this.isOpen : !!state; + } +} diff --git a/app/components/button-with-dialog.module.css b/app/components/button-with-dialog.module.css new file mode 100644 index 00000000000..b896dbbfc9f --- /dev/null +++ b/app/components/button-with-dialog.module.css @@ -0,0 +1,24 @@ +.dialog { + inset: 0px; + overflow-y: auto; + display: flex; + justify-content: center; + z-index: 20; + transition: all var(--transition-fast) ease-in; + opacity: 0; + + &.open { + position: fixed; + opacity: 1; + } +} + +.dialog__content { + --shadow: 0 25px 50px light-dark(hsla(51, 50%, 44%, 0.35), #232321); + + height: min-content; + border-radius: var(--space-3xs); + box-shadow: var(--shadow); + outline: 1px solid var(--gray-border); + margin-top: 12.5vh; +} diff --git a/app/components/crate-report-form.hbs b/app/components/crate-report-form.hbs new file mode 100644 index 00000000000..73fd5ec94d2 --- /dev/null +++ b/app/components/crate-report-form.hbs @@ -0,0 +1,66 @@ +
+

Report Crate "{{@crate}}"

+ +
+
Reasons
+ + {{#if this.reasonsInvalid}} +
+ Please choose reasons to report. +
+ {{/if}} +
+ +
+ {{#let (unique-id) as |id|}} + +