mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-01 20:36:21 -05:00
Adding Upload button to the FileBrowser. Adding ErrorBoundaries to prevent entire app from crashing.
This commit is contained in:
parent
166d6a47c3
commit
5c8f164c1a
7 changed files with 508 additions and 29 deletions
|
|
@ -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>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue