2020-06-27 01:06:51 +00:00
|
|
|
import {UIElement} from "./UIElement";
|
2020-10-02 17:00:24 +00:00
|
|
|
import State from "../State";
|
2020-09-03 14:44:48 +00:00
|
|
|
import Combine from "./Base/Combine";
|
2020-06-27 01:06:51 +00:00
|
|
|
|
2020-07-21 00:55:28 +00:00
|
|
|
/**
|
|
|
|
* Handles the full screen popup on mobile
|
|
|
|
*/
|
2021-01-04 03:06:21 +00:00
|
|
|
export default class FullScreenMessageBox extends UIElement {
|
2020-07-30 23:45:54 +00:00
|
|
|
|
2020-11-15 13:56:20 +00:00
|
|
|
private _content: UIElement;
|
2020-06-27 01:06:51 +00:00
|
|
|
|
2021-01-07 03:50:12 +00:00
|
|
|
constructor() {
|
2020-11-16 00:59:30 +00:00
|
|
|
super(State.state.fullScreenMessage);
|
2020-09-03 14:44:48 +00:00
|
|
|
this.HideOnEmpty(true);
|
2020-06-27 01:06:51 +00:00
|
|
|
}
|
|
|
|
|
2020-06-29 01:12:44 +00:00
|
|
|
|
2020-09-03 14:44:48 +00:00
|
|
|
InnerRender(): string {
|
2020-09-12 21:15:17 +00:00
|
|
|
if (State.state.fullScreenMessage.data === undefined) {
|
2020-09-03 14:44:48 +00:00
|
|
|
return "";
|
2020-06-27 01:06:51 +00:00
|
|
|
}
|
2021-01-08 17:02:07 +00:00
|
|
|
this._content = State.state.fullScreenMessage.data.content;
|
2021-01-21 04:05:10 +00:00
|
|
|
return new Combine([this._content]).SetClass("block max-h-screen h-screen overflow-x-hidden overflow-y-auto bg-white p-2").Render();
|
2020-06-27 01:06:51 +00:00
|
|
|
}
|
|
|
|
|
2020-11-23 01:55:18 +00:00
|
|
|
protected InnerUpdate(htmlElement: HTMLElement) {
|
|
|
|
super.InnerUpdate(htmlElement);
|
|
|
|
}
|
|
|
|
|
2020-09-03 14:44:48 +00:00
|
|
|
|
2020-06-27 01:06:51 +00:00
|
|
|
}
|