2023-10-02 12:06:35 -04:00
|
|
|
import { App, Widget } from '../../imports.js';
|
2023-10-08 00:43:35 -04:00
|
|
|
const { Revealer, Box, Window } = Widget;
|
2023-10-02 12:06:35 -04:00
|
|
|
|
2023-09-21 20:01:14 -04:00
|
|
|
|
2023-10-08 00:43:35 -04:00
|
|
|
export const PopupWindow = ({
|
|
|
|
name,
|
|
|
|
child,
|
|
|
|
transition = 'slide_down',
|
|
|
|
...params
|
|
|
|
}) => Window({
|
|
|
|
name,
|
|
|
|
popup: true,
|
|
|
|
visible: false,
|
|
|
|
layer: 'overlay',
|
|
|
|
...params,
|
2023-09-22 01:34:36 -04:00
|
|
|
|
2023-10-08 00:43:35 -04:00
|
|
|
child: Box({
|
|
|
|
style: 'min-height:1px; min-width:1px',
|
|
|
|
child: Revealer({
|
|
|
|
transition,
|
|
|
|
transitionDuration: 500,
|
|
|
|
connections: [[App, (revealer, currentName, visible) => {
|
|
|
|
if (currentName === name) {
|
|
|
|
revealer.reveal_child = visible;
|
|
|
|
|
|
|
|
if (visible && name !== 'overview')
|
2023-10-14 13:54:45 -04:00
|
|
|
App.openWindow('closer');
|
2023-10-08 00:43:35 -04:00
|
|
|
}
|
|
|
|
}]],
|
|
|
|
child: child,
|
|
|
|
}),
|
2023-09-25 12:30:32 -04:00
|
|
|
}),
|
2023-09-21 20:01:14 -04:00
|
|
|
});
|