Adding Upload button to the FileBrowser. Adding ErrorBoundaries to prevent entire app from crashing.

This commit is contained in:
Roland 2025-12-25 09:14:00 -07:00
parent 166d6a47c3
commit 5c8f164c1a
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
7 changed files with 508 additions and 29 deletions

View file

@ -11,6 +11,7 @@ import {toast} from "react-semantic-toasts-2";
import {useOneQuery} from "../hooks/customHooks";
import {ShareButton} from "./Share";
import {pathDirectory} from "./FileBrowser";
import {InlineErrorBoundary} from "./ErrorBoundary";
function getMediaPathURL(previewFile) {
if (previewFile['primary_path']) {
@ -116,11 +117,13 @@ function getSTLPreviewModal(previewFile) {
return <React.Fragment>
<Modal.Header>{name}</Modal.Header>
<Modal.Content>
<StlViewer orbitControls shadows
url={url}
style={{height: '80vw', width: '80vw'}}
modelProps={{color: '#7353a8'}}
/>
<InlineErrorBoundary>
<StlViewer orbitControls shadows
url={url}
style={{height: '80vw', width: '80vw'}}
modelProps={{color: '#7353a8'}}
/>
</InlineErrorBoundary>
</Modal.Content>
</React.Fragment>
}