mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
9d67980a7e
refs #5798, closes #5018 - adds new `gh-fullscreen-modal` component - modals are now specified in-context so that they can have deeper interaction with their surrounding components/controller/route, i.e. a modal component can be a thin confirm/deny wrapper over the underlying controller action keeping all context-sensitive logic in one place - adds spin-buttons to all modals with async behaviour - adds/improves behaviour of inline-validation in modals - improves re-authenticate modal to properly handle validation and authentication errors
12 lines
421 B
JavaScript
12 lines
421 B
JavaScript
import { target } from 'liquid-tether';
|
|
|
|
export default function () {
|
|
this.transition(
|
|
target('fullscreen-modal'),
|
|
this.toValue(({isVisible}) => isVisible),
|
|
// this.use('tether', [modal options], [background options])
|
|
this.use('tether', ['fade', {duration: 150}], ['fade', {duration: 150}]),
|
|
this.reverse('tether', ['fade', {duration: 80}], ['fade', {duration: 150}])
|
|
);
|
|
}
|