Files
discourse/app/assets/javascripts/discourse/app/components/modal-container.hbs
David Taylor 80b77b2e65 DEV: Convert modal wrapper from named outlet to component (#21932)
This removes the modal container named-outlet/controller/template and replaces it with a component. Named outlets will be removed in Ember 4.x, so this change is part of that upgrade project.

Smaller changes include:
- update some of the computed values to be getters rather than calculated during `show()`.
- update tests which were previously depending on the modal class persisting after the modal was closed

Much of the logic in the service will be deprecated once we introduce component-based modals.

This work is split out from https://github.com/discourse/discourse/pull/21304
2023-06-06 10:14:07 +01:00

17 lines
483 B
Handlebars

<DModal
@modalClass={{concat-class
this.modal.modalClass
(if this.modal.opts.panels "has-tabs")
}}
@title={{this.modal.title}}
@titleAriaElementId={{this.modal.opts.titleAriaElementId}}
@panels={{this.modal.opts.panels}}
@selectedPanel={{this.modal.selectedPanel}}
@onSelectPanel={{this.modal.onSelectPanel}}
@hidden={{this.modal.hidden}}
@class="hidden"
@errors={{this.modal.errors}}
@closeModal={{this.closeModal}}
>
{{outlet "modalBody"}}
</DModal>