0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-30 15:22:41 +00:00

Move the Toolbar component out of the iframe

The website UI should stay out of the iframe if possible.  Otherwise, users can style the UI on their brew which may or may not be a pain, and it's simple enough to avoid it.
This commit is contained in:
Gazook89
2024-08-18 18:50:36 -05:00
parent 5a11b7918e
commit 499c640a11

View File

@@ -231,10 +231,10 @@ const BrewRenderer = (props)=>{
}));
};
const handlePageChange = (pageNumber) => {
// Scroll to the desired page
scrollToPage(pageNumber);
};
// const handlePageChange = (pageNumber) => {
// // Scroll to the desired page
// scrollToPage(pageNumber);
// };
return (
<>
@@ -253,13 +253,15 @@ const BrewRenderer = (props)=>{
<NotificationPopup />
</div>
<ToolBar onZoomChange={handleZoom} currentPage={state.currentPageNumber} onPageChange={scrollToPage} totalPages={rawPages.length}/>
{/*render in iFrame so broken code doesn't crash the site.*/}
<Frame id='BrewRenderer' initialContent={INITIAL_CONTENT}
style={{ width: '100%', height: '100%', visibility: state.visibility }}
contentDidMount={frameDidMount}
onClick={()=>{emitClick();}}
>
<ToolBar onZoomChange={handleZoom} currentPage={state.currentPageNumber} onPageChange={handlePageChange} totalPages={rawPages.length}/>
<div className={'brewRenderer'}
onScroll={handleScroll}
onKeyDown={handleControlKeys}