Fixed the bookmark manager for windowed mode
parent
fc2ea02955
commit
95f4a7bfb7
|
@ -16,6 +16,11 @@
|
|||
|
||||
@include user-select(none);
|
||||
|
||||
&.windowed {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.inputBoxed {
|
||||
height: 2em;
|
||||
}
|
||||
|
|
|
@ -774,11 +774,11 @@ class ModalBookmarks extends AbstractModal {
|
|||
this.variables.destroy();
|
||||
}
|
||||
|
||||
renderBody(): React.ReactElement {
|
||||
renderBody(renderBody): React.ReactElement {
|
||||
return (
|
||||
<EventContext.Provider value={this.events}>
|
||||
<VariableContext.Provider value={this.variables}>
|
||||
<div className={cssStyle.container}>
|
||||
<div className={cssStyle.container + " " + (renderBody.windowed ? cssStyle.windowed : "")}>
|
||||
<BookmarkListContainer />
|
||||
<ContextDivider id={"separator-bookmarks"} direction={"horizontal"} defaultValue={25} />
|
||||
<BookmarkInfoContainer />
|
||||
|
|
|
@ -57,6 +57,8 @@ export class ClientModalRenderer implements ModalRenderer {
|
|||
headerClass={cssStyle.header}
|
||||
headerTitleClass={cssStyle.title}
|
||||
bodyClass={cssStyle.body}
|
||||
|
||||
windowed={true}
|
||||
/>,
|
||||
this.container,
|
||||
() => {
|
||||
|
|
|
@ -48,7 +48,7 @@ class BodyRenderer {
|
|||
|
||||
this.modalInstance = instance;
|
||||
if(this.modalInstance) {
|
||||
ReactDOM.render(<>{this.modalInstance.renderBody()}</>, this.htmlContainer);
|
||||
ReactDOM.render(<>{this.modalInstance.renderBody({ windowed: true })}</>, this.htmlContainer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,9 +17,11 @@ export const InternalModalContentRenderer = React.memo((props: {
|
|||
headerTitleClass?: string,
|
||||
bodyClass?: string,
|
||||
|
||||
refContent?: React.Ref<HTMLDivElement>
|
||||
refContent?: React.Ref<HTMLDivElement>,
|
||||
|
||||
windowed: boolean,
|
||||
}) => {
|
||||
const body = useMemo(() => props.modal.renderBody(), [props.modal]);
|
||||
const body = useMemo(() => props.modal.renderBody({ windowed: props.windowed }), [props.modal]);
|
||||
const title = useMemo(() => props.modal.renderTitle(), [props.modal]);
|
||||
|
||||
return (
|
||||
|
@ -87,6 +89,8 @@ export class InternalModalRenderer extends React.PureComponent<{ modal: Abstract
|
|||
|
||||
containerClass={cssStyle.contentInternal}
|
||||
bodyClass={cssStyle.body + " " + cssStyle["modal-" + this.props.modal.color()]}
|
||||
|
||||
windowed={false}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -90,7 +90,7 @@ export interface ModalController {
|
|||
export abstract class AbstractModal {
|
||||
protected constructor() {}
|
||||
|
||||
abstract renderBody() : ReactElement;
|
||||
abstract renderBody(properties: { windowed: boolean }) : ReactElement;
|
||||
abstract renderTitle() : string | React.ReactElement;
|
||||
|
||||
/* only valid for the "inline" modals */
|
||||
|
|
Loading…
Reference in New Issue