Compare commits

..

No commits in common. "a6fce60d0486784017bc5a6aff485df8ed59a163" and "80ecc8a17518ec19594321bbf361275dfd4e0f11" have entirely different histories.

10 changed files with 12 additions and 74 deletions

View File

@ -341,7 +341,6 @@ const ControlPrinter = ({ slicerIntegration = false }) => {
createdAt: false,
updatedAt: false,
state: !slicerIntegration,
pendingSlicerUploads: false,
name: !slicerIntegration
}}
objectPropertyProps={{

View File

@ -53,8 +53,7 @@ const NewPrinter = ({ onOk, defaultValues }) => {
'currentJob._id': false,
currentSubJob: false,
'currentSubJob._id': false,
alerts: false,
queue: false
alerts: false
}}
/>
)
@ -81,10 +80,7 @@ const NewPrinter = ({ onOk, defaultValues }) => {
'currentJob._id': false,
currentSubJob: false,
'currentSubJob._id': false,
alerts: false,
pendingSlicerUploads: false,
online: false,
queue: false
alerts: false
}}
isEditing={false}
objectData={objectData}

View File

@ -171,8 +171,7 @@ const PrinterInfo = () => {
'currentJob._id': false,
currentSubJob: false,
'currentSubJob._id': false,
alerts: false,
pendingSlicerUploads: false
alerts: false
}}
/>
)}

View File

@ -67,22 +67,14 @@ const FileList = ({
<Flex
vertical
gap='10px'
style={{
maxWidth: '100%',
minWidth: 0,
width: card ? '100%' : 'fit-content'
}}
style={{ maxWidth: '100%', minWidth: 0, width: card ? '100%' : 'fit-content' }}
>
<Flex
justify={card ? 'space-between' : 'start'}
align='center'
gap='small'
wrap={false}
style={{
maxWidth: '100%',
minWidth: 0,
width: card ? '100%' : 'fit-content'
}}
style={{ maxWidth: '100%', minWidth: 0, width: card ? '100%' : 'fit-content' }}
>
<Flex
gap={'small'}

View File

@ -35,8 +35,7 @@ const FileUpload = ({
multiple = true,
defaultPreviewOpen = false,
showPreview = true,
showInfo,
masterFilter = []
showInfo
}) => {
const { uploadFile } = useContext(ApiServerContext)
const [uploading, setUploading] = useState(false)
@ -139,17 +138,11 @@ const FileUpload = ({
<Flex gap={'small'} vertical>
{hasNoItems && uploading == false ? (
<Flex gap={'small'} align='center' wrap>
<Space.Compact style={{ flexGrow: 1, minWidth: 0 }}>
<Space.Compact style={{ flexGrow: 1 }}>
<ObjectSelect
type={'file'}
value={selectedFile}
onChange={setSelectedFile}
style={{ width: '100%', minWidth: 0 }}
masterFilter={
masterFilter.length > 0
? { extension: { $in: masterFilter } }
: {}
}
/>
<Button
icon={<PlusIcon />}
@ -164,9 +157,6 @@ const FileUpload = ({
beforeUpload={handleFileUpload}
showUploadList={false}
multiple={multiple}
accept={
masterFilter.length > 0 ? masterFilter.join(',') : undefined
}
>
<Button style={{ width: '100%' }} icon={<UploadIcon />}>
Upload
@ -219,8 +209,7 @@ FileUpload.propTypes = {
showPreview: PropTypes.bool,
showInfo: PropTypes.bool,
defaultPreviewOpen: PropTypes.bool,
minimal: PropTypes.bool,
masterFilter: PropTypes.array
minimal: PropTypes.bool
}
export default FileUpload

View File

@ -621,7 +621,6 @@ const ObjectProperty = ({
showPreview={showPreview}
showInfo={showHyperlink}
showDownload={showDownload}
masterFilter={masterFilter}
/>
)
}
@ -636,7 +635,6 @@ const ObjectProperty = ({
defaultPreviewOpen={previewOpen}
showPreview={showPreview}
showInfo={showHyperlink}
masterFilter={masterFilter}
/>
)
}
@ -949,7 +947,6 @@ const ObjectProperty = ({
defaultPreviewOpen={previewOpen}
showPreview={showPreview}
showInfo={showHyperlink}
masterFilter={masterFilter}
{...inputProps}
/>
)
@ -961,7 +958,6 @@ const ObjectProperty = ({
defaultPreviewOpen={previewOpen}
showPreview={showPreview}
showInfo={showHyperlink}
masterFilter={masterFilter}
{...inputProps}
/>
)

View File

@ -46,7 +46,6 @@ const ObjectSelect = ({
value,
onChange,
disabled = false,
style = {},
...rest
}) => {
const { fetchObjectsByProperty, fetchObject, connected, searchObjects } =
@ -720,7 +719,7 @@ const ObjectSelect = ({
// --- Main TreeSelect UI ---
return (
<div style={style}>
<div>
<TreeSelect
key={treeVersion}
treeDataSimpleMode={false}
@ -774,8 +773,7 @@ ObjectSelect.propTypes = {
multiple: PropTypes.bool,
treeSelectProps: PropTypes.object,
type: PropTypes.string.isRequired,
disabled: PropTypes.bool,
style: PropTypes.object
disabled: PropTypes.bool
}
export default ObjectSelect

View File

@ -161,7 +161,7 @@ export const GCodeFile = {
required: true,
showPreview: false,
showHyperlink: true,
masterFilter: ['.gcode', '.g'],
filter: ['.gcode', '.g'],
columnWidth: 200
},
{

View File

@ -406,36 +406,6 @@ export const Printer = {
required: false,
readOnly: true,
columnWidth: 200
},
{
name: 'pendingSlicerUploads',
type: 'objectChildren',
label: 'Pending Slicer Uploads',
properties: [
{
name: 'file',
label: 'File',
type: 'object',
objectType: 'file',
required: true,
showHyperlink: true
},
{
name: 'shouldPrint',
label: 'Should Print',
type: 'bool',
required: true,
columnWidth: 125
},
{
name: 'job',
label: 'Job',
type: 'object',
objectType: 'job',
required: false,
showHyperlink: true
}
]
}
],
stats: [

View File

@ -116,8 +116,7 @@ export const User = {
fileType: 'image',
previewOpen: true,
showPreview: false,
columnWidth: 150,
masterFilter: ['.png', '.jpg', '.jpeg']
columnWidth: 150
}
]
}