Migration to Vite.
This commit is contained in:
parent
e7fe26f2da
commit
4c3d37a7d0
@ -1,31 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:prettier/recommended",
|
||||
"plugin:react/recommended",
|
||||
"plugin:react-hooks/recommended"
|
||||
],
|
||||
"env": {
|
||||
"browser": true, // Allows access to browser globals like `localStorage`
|
||||
"node": true, // If you're also using Node.js
|
||||
"es2021": true // Use ECMAScript 2021 features
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest",
|
||||
"sourceType": "module",
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "detect" // Automatically detect the React version
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"camelcase": ["error", { "properties": "always" }],
|
||||
"multiline-ternary": ["error", "never"],
|
||||
"no-debugger": "off",
|
||||
"no-console": "warn"
|
||||
}
|
||||
}
|
||||
38
eslint.config.js
Normal file
38
eslint.config.js
Normal file
@ -0,0 +1,38 @@
|
||||
import js from '@eslint/js'
|
||||
import globals from 'globals'
|
||||
import react from 'eslint-plugin-react'
|
||||
import reactHooks from 'eslint-plugin-react-hooks'
|
||||
import reactRefresh from 'eslint-plugin-react-refresh'
|
||||
|
||||
export default [
|
||||
{ ignores: ['dist'] },
|
||||
{
|
||||
files: ['**/*.{js,jsx}'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2020,
|
||||
globals: globals.browser,
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
ecmaFeatures: { jsx: true },
|
||||
sourceType: 'module'
|
||||
}
|
||||
},
|
||||
settings: { react: { version: '18.3' } },
|
||||
plugins: {
|
||||
react,
|
||||
'react-hooks': reactHooks,
|
||||
'react-refresh': reactRefresh
|
||||
},
|
||||
rules: {
|
||||
...js.configs.recommended.rules,
|
||||
...react.configs.recommended.rules,
|
||||
...react.configs['jsx-runtime'].rules,
|
||||
...reactHooks.configs.recommended.rules,
|
||||
'react/jsx-no-target-blank': 'off',
|
||||
'react-refresh/only-export-components': [
|
||||
'warn',
|
||||
{ allowConstantExport: true }
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
22
index.html
Normal file
22
index.html
Normal file
@ -0,0 +1,22 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta
|
||||
name="description"
|
||||
content="Web site created using create-react-app"
|
||||
/>
|
||||
<link rel="apple-touch-icon" href="/logo192.png" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link rel="stylesheet" href="/fonts/fonts.css" />
|
||||
<script type="module" src="/src/index.jsx"></script>
|
||||
<title>Farm Control</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
13729
package-lock.json
generated
13729
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
21
package.json
21
package.json
@ -40,6 +40,7 @@
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.20",
|
||||
"gcode-preview": "^2.18.0",
|
||||
"keycloak-js": "^26.2.0",
|
||||
"loglevel": "^1.9.2",
|
||||
@ -53,7 +54,6 @@
|
||||
"react-markdown": "^10.1.0",
|
||||
"react-responsive": "^10.0.1",
|
||||
"react-router-dom": "^7.8.0",
|
||||
"react-scripts": "^5.0.1",
|
||||
"react-stl-viewer": "^2.5.0",
|
||||
"remark-gfm": "^4.0.1",
|
||||
"socket.io-client": "*",
|
||||
@ -63,27 +63,22 @@
|
||||
"svgo-loader": "^4.0.0",
|
||||
"three": "^0.179.1",
|
||||
"tsparticles": "^3.9.1",
|
||||
"web-vitals": "^5.1.0",
|
||||
"webpack": "^5.101.1",
|
||||
"webpack-cli": "^6.0.1"
|
||||
"web-vitals": "^5.1.0"
|
||||
},
|
||||
"main": "build/electron.js",
|
||||
"description": "3D Printer ERP and Control Software.",
|
||||
"scripts": {
|
||||
"dev": "react-scripts start",
|
||||
"dev": "vite",
|
||||
"electron": "ELECTRON_START_URL=http://192.168.68.53:3000 electron .",
|
||||
"start": "serve -s build",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject",
|
||||
"build": "vite build",
|
||||
"minify-svgs": "node scripts/minify-svgs.js",
|
||||
"dev:electron": "concurrently \"react-scripts start\" \"ELECTRON_START_URL=http://192.168.68.53:3000 electron public/electron.js\"",
|
||||
"build:electron": "npm run build && electron-builder"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app",
|
||||
"react-app/jest"
|
||||
"react-app"
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
@ -100,6 +95,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
||||
"@vitejs/plugin-react": "^5.0.1",
|
||||
"concurrently": "^9.2.0",
|
||||
"electron": "^37.2.6",
|
||||
"electron-builder": "^26.0.12",
|
||||
@ -115,8 +111,9 @@
|
||||
"standard": "^17.1.2",
|
||||
"svgo": "^4.0.0",
|
||||
"svgo-loader": "^4.0.0",
|
||||
"webpack": "^5.101.1",
|
||||
"webpack-cli": "^6.0.1"
|
||||
"vite": "^7.1.3",
|
||||
"vite-plugin-eslint": "^1.8.1",
|
||||
"vite-plugin-svgr": "^4.3.0"
|
||||
},
|
||||
"build": {
|
||||
"appId": "com.tombutcher.farmcontrol",
|
||||
|
||||
@ -17,8 +17,8 @@ function createWindow() {
|
||||
})
|
||||
|
||||
// For development, load from localhost; for production, load the built index.html
|
||||
if (process.env.ELECTRON_START_URL) {
|
||||
win.loadURL(process.env.ELECTRON_START_URL)
|
||||
if (import.meta.env.ELECTRON_START_URL) {
|
||||
win.loadURL(import.meta.env.ELECTRON_START_URL)
|
||||
} else {
|
||||
win.loadFile(path.join(__dirname, '../build/index.html'))
|
||||
}
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta
|
||||
name="description"
|
||||
content="Web site created using create-react-app"
|
||||
/>
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is installed on a
|
||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<link rel="stylesheet" href="%PUBLIC_URL%/fonts/fonts.css" />
|
||||
<title>Farm Control</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
You can add webfonts, meta tags, or analytics to this file.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
11
src/App.jsx
11
src/App.jsx
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import {
|
||||
HashRouter,
|
||||
BrowserRouter,
|
||||
@ -11,17 +10,17 @@ import { App, ConfigProvider } from 'antd'
|
||||
import Dashboard from './components/Dashboard/Dashboard.jsx'
|
||||
import PrivateRoute from './components/PrivateRoute'
|
||||
import './assets/stylesheets/App.css'
|
||||
import { PrintServerProvider } from './components/Dashboard/context/PrintServerContext.js'
|
||||
import { AuthProvider } from './components/Dashboard/context/AuthContext.js'
|
||||
import { SpotlightProvider } from './components/Dashboard/context/SpotlightContext.js'
|
||||
import { PrintServerProvider } from './components/Dashboard/context/PrintServerContext.jsx'
|
||||
import { AuthProvider } from './components/Dashboard/context/AuthContext.jsx'
|
||||
import { SpotlightProvider } from './components/Dashboard/context/SpotlightContext.jsx'
|
||||
|
||||
import {
|
||||
ThemeProvider,
|
||||
useThemeContext
|
||||
} from './components/Dashboard/context/ThemeContext'
|
||||
import AppError from './components/App/AppError'
|
||||
import { ApiServerProvider } from './components/Dashboard/context/ApiServerContext.js'
|
||||
import { ElectronProvider } from './components/Dashboard/context/ElectronContext.js'
|
||||
import { ApiServerProvider } from './components/Dashboard/context/ApiServerContext.jsx'
|
||||
import { ElectronProvider } from './components/Dashboard/context/ElectronContext.jsx'
|
||||
import AuthCallback from './components/App/AuthCallback.jsx'
|
||||
|
||||
import {
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { Flex, Card, Alert, Button } from 'antd'
|
||||
import AuthParticles from './AppParticles'
|
||||
import FarmControlLogo from '../Logos/FarmControlLogo'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { useState, useEffect } from 'react'
|
||||
import { Flex, Card, Alert } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
import AuthParticles from './AppParticles'
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useState, useEffect, useMemo, useCallback } from 'react'
|
||||
import { useState, useEffect, useMemo, useCallback, memo } from 'react'
|
||||
import Particles, { initParticlesEngine } from '@tsparticles/react'
|
||||
import { loadSlim } from '@tsparticles/slim'
|
||||
import { useThemeContext } from '../Dashboard/context/ThemeContext'
|
||||
|
||||
const ParticlesComponent = React.memo(({ options, particlesLoaded }) => {
|
||||
const ParticlesComponent = memo(({ options, particlesLoaded }) => {
|
||||
return (
|
||||
<Particles
|
||||
id='tsparticles'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect, useContext, useCallback } from 'react'
|
||||
import { useState, useEffect, useContext, useCallback } from 'react'
|
||||
import { Flex, Card, Alert } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
import AuthParticles from './AppParticles'
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
// Dashboard.js
|
||||
import React from 'react'
|
||||
import Layout from './Layout'
|
||||
import { Outlet } from 'react-router-dom'
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import {
|
||||
Descriptions,
|
||||
Button,
|
||||
@ -9,7 +9,7 @@ import {
|
||||
message
|
||||
} from 'antd'
|
||||
import ReloadIcon from '../../Icons/ReloadIcon.jsx'
|
||||
import { AuthContext } from '../context/AuthContext.js'
|
||||
import { AuthContext } from '../context/AuthContext.jsx'
|
||||
import BoolDisplay from '../common/BoolDisplay.jsx'
|
||||
|
||||
const { Text, Paragraph } = Typography
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import DashboardSidebar from '../common/DashboardSidebar'
|
||||
import { Typography } from 'antd'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import {
|
||||
Descriptions,
|
||||
Button,
|
||||
@ -9,7 +9,7 @@ import {
|
||||
message
|
||||
} from 'antd'
|
||||
import ReloadIcon from '../../Icons/ReloadIcon.jsx'
|
||||
import { PrintServerContext } from '../context/PrintServerContext.js'
|
||||
import { PrintServerContext } from '../context/PrintServerContext.jsx'
|
||||
import BoolDisplay from '../common/BoolDisplay.jsx'
|
||||
|
||||
const { Text, Paragraph } = Typography
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { Descriptions, Button, Typography, Flex, Space, Dropdown } from 'antd'
|
||||
import ReloadIcon from '../../Icons/ReloadIcon'
|
||||
import BoolDisplay from '../common/BoolDisplay'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// src/filamentStocks.js
|
||||
|
||||
import React, { useState, useRef } from 'react'
|
||||
import { useState, useRef } from 'react'
|
||||
|
||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card } from 'antd'
|
||||
import useCollapseState from '../../hooks/useCollapseState'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useContext, useEffect } from 'react'
|
||||
import { useState, useContext, useEffect } from 'react'
|
||||
import {
|
||||
Form,
|
||||
Button,
|
||||
@ -103,7 +103,7 @@ const LoadFilamentStock = ({
|
||||
}
|
||||
}, [printServer, loadFilamentStockFormValues.printer])
|
||||
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
loadFilamentStockForm
|
||||
.validateFields({
|
||||
validateOnly: true
|
||||
@ -158,7 +158,7 @@ const LoadFilamentStock = ({
|
||||
}
|
||||
]
|
||||
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
if (reset) {
|
||||
loadFilamentStockForm.resetFields()
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { useMediaQuery } from 'react-responsive'
|
||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useContext, useEffect } from 'react'
|
||||
import { useState, useContext, useEffect } from 'react'
|
||||
import { Form, Button, Typography, Flex, Steps, Divider, Alert } from 'antd'
|
||||
import { useMediaQuery } from 'react-responsive'
|
||||
import PropTypes from 'prop-types'
|
||||
@ -77,13 +77,13 @@ const UnloadFilamentStock = ({ onOk, reset, printer = null }) => {
|
||||
}
|
||||
}, [printServer, unloadFilamentStockFormValues.printer])
|
||||
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
if (reset) {
|
||||
unloadFilamentStockForm.resetFields()
|
||||
}
|
||||
}, [reset, unloadFilamentStockForm])
|
||||
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
unloadFilamentStockForm
|
||||
.validateFields({
|
||||
validateOnly: true
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import DashboardSidebar from '../common/DashboardSidebar'
|
||||
import { DashboardOutlined } from '@ant-design/icons'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// src/partStocks.js
|
||||
|
||||
import React, { useState, useContext, useRef } from 'react'
|
||||
import { useState, useContext, useRef } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { Button, Flex, Space, Modal, message, Dropdown, Typography } from 'antd'
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { useState, useEffect } from 'react'
|
||||
import { Form, Input, Button, Space, Select, InputNumber } from 'antd'
|
||||
import axios from 'axios'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useContext, useRef } from 'react'
|
||||
import { useState, useContext, useRef, useEffect } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { Button, Flex, Space, message, Dropdown, Typography } from 'antd'
|
||||
|
||||
@ -26,7 +26,7 @@ const StockAudits = () => {
|
||||
|
||||
const { authenticated } = useContext(AuthContext)
|
||||
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
if (printServer && !initialized) {
|
||||
setInitialized(true)
|
||||
printServer.on('notify_stockaudit_update', (updateData) => {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useState, useContext } from 'react'
|
||||
import { useEffect, useState, useContext } from 'react'
|
||||
import { useLocation, useNavigate } from 'react-router-dom'
|
||||
import axios from 'axios'
|
||||
import {
|
||||
@ -59,6 +59,7 @@ const StockAuditInfo = () => {
|
||||
setStockAudit(response.data)
|
||||
setLoading(false)
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
messageApi.error('Failed to fetch stock audit details')
|
||||
navigate('/dashboard/inventory/stockaudits')
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useRef } from 'react'
|
||||
import { useRef } from 'react'
|
||||
import { Button, Flex, Space, Dropdown } from 'antd'
|
||||
import useColumnVisibility from '../hooks/useColumnVisibility'
|
||||
import ObjectTable from '../common/ObjectTable'
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
// DashboardLayout.js
|
||||
import PropTypes from 'prop-types'
|
||||
import React from 'react'
|
||||
import { Layout, Flex } from 'antd'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import ProductionSidebar from './Production/ProductionSidebar'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useRef } from 'react'
|
||||
import { useRef } from 'react'
|
||||
import { Button, Flex, Space, Dropdown } from 'antd'
|
||||
|
||||
import ReloadIcon from '../../Icons/ReloadIcon'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useRef } from 'react'
|
||||
import { useRef } from 'react'
|
||||
import { Button, Flex, Space, Dropdown } from 'antd'
|
||||
import ObjectTable from '../common/ObjectTable'
|
||||
import ReloadIcon from '../../Icons/ReloadIcon'
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useRef } from 'react'
|
||||
import { useState, useRef } from 'react'
|
||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||
import NewDocumentSize from './DocumentSizes/NewDocumentSize'
|
||||
import ObjectTable from '../common/ObjectTable'
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { useMediaQuery } from 'react-responsive'
|
||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useRef } from 'react'
|
||||
import { useState, useRef } from 'react'
|
||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||
import NewDocumentTemplate from './DocumentTemplates/NewDocumentTemplate'
|
||||
import ObjectTable from '../common/ObjectTable'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useRef } from 'react'
|
||||
import { useState, useRef } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card } from 'antd'
|
||||
import loglevel from 'loglevel'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useRef, useState } from 'react'
|
||||
import { useRef, useState } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { useMediaQuery } from 'react-responsive'
|
||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// src/filaments.js
|
||||
|
||||
import React, { useRef, useState } from 'react'
|
||||
import { useRef, useState } from 'react'
|
||||
import { Button, Flex, Space, Modal, message, Dropdown } from 'antd'
|
||||
|
||||
import NewFilament from './Filaments/NewFilament'
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { useMediaQuery } from 'react-responsive'
|
||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// src/hosts.js
|
||||
|
||||
import React, { useRef, useState } from 'react'
|
||||
import { useRef, useState } from 'react'
|
||||
import { Button, Flex, Space, Modal, message, Dropdown } from 'antd'
|
||||
|
||||
import NewHost from './Hosts/NewHost'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useRef, useState } from 'react'
|
||||
import { useRef, useState } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card, Modal } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useContext, useEffect, useState, useRef } from 'react'
|
||||
import { useContext, useEffect, useState, useRef } from 'react'
|
||||
import { Input, Result, Typography, Flex, Progress, Button } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
import { ApiServerContext } from '../../context/ApiServerContext'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { useMediaQuery } from 'react-responsive'
|
||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import DashboardSidebar from '../common/DashboardSidebar'
|
||||
import FilamentIcon from '../../Icons/FilamentIcon'
|
||||
@ -107,7 +106,7 @@ const items = [
|
||||
}
|
||||
]
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
if (import.meta.env.MODE === 'development') {
|
||||
items.push(
|
||||
{ type: 'divider' },
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// src/materials.js
|
||||
|
||||
import React, { useEffect, useState, useContext, useCallback } from 'react'
|
||||
import { useEffect, useState, useContext, useCallback } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import axios from 'axios'
|
||||
import {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useState } from 'react'
|
||||
import { useState, useEffect } from 'react'
|
||||
import axios from 'axios'
|
||||
import {
|
||||
Form,
|
||||
@ -43,7 +43,7 @@ const NewMaterial = ({ onSuccess }) => {
|
||||
|
||||
const newMaterialFormUpdateValues = Form.useWatch([], newMaterialForm)
|
||||
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
newMaterialForm
|
||||
.validateFields({
|
||||
validateOnly: true
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useRef } from 'react'
|
||||
import { useState, useRef } from 'react'
|
||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||
import NewNoteType from './NoteTypes/NewNoteType'
|
||||
import ObjectTable from '../common/ObjectTable'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { useMediaQuery } from 'react-responsive'
|
||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// src/gcodefiles.js
|
||||
|
||||
import React, { useState, useRef } from 'react'
|
||||
import { useState, useRef } from 'react'
|
||||
|
||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||
import ObjectTable from '../common/ObjectTable'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card } from 'antd'
|
||||
import useCollapseState from '../../hooks/useCollapseState'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// src/gcodefiles.js
|
||||
|
||||
import React, { useState, useRef } from 'react'
|
||||
import { useState, useRef } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import {
|
||||
Button,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useState, useContext, useEffect, useRef } from 'react'
|
||||
import { useState, useContext, useEffect, useRef } from 'react'
|
||||
import axios from 'axios'
|
||||
import { useMediaQuery } from 'react-responsive'
|
||||
import {
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card } from 'antd'
|
||||
import useCollapseState from '../../hooks/useCollapseState'
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { Select, Typography, Descriptions, Collapse, Flex } from 'antd'
|
||||
import { CaretLeftOutlined } from '@ant-design/icons'
|
||||
import { useThemeContext } from '../context/ThemeContext'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useRef } from 'react'
|
||||
import { useRef } from 'react'
|
||||
import { Button, Flex, Space, Dropdown } from 'antd'
|
||||
import ObjectTable from '../common/ObjectTable'
|
||||
import ReloadIcon from '../../Icons/ReloadIcon'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import axios from 'axios'
|
||||
import { useMediaQuery } from 'react-responsive'
|
||||
import {
|
||||
@ -37,7 +37,7 @@ const NewUser = ({ onOk, reset }) => {
|
||||
|
||||
const newUserFormUpdateValues = Form.useWatch([], newUserForm)
|
||||
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
newUserForm
|
||||
.validateFields({
|
||||
validateOnly: true
|
||||
@ -74,7 +74,7 @@ const NewUser = ({ onOk, reset }) => {
|
||||
}
|
||||
]
|
||||
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
if (reset) {
|
||||
newUserForm.resetFields()
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useRef } from 'react'
|
||||
import { useState, useRef } from 'react'
|
||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||
import NewVendor from './Vendors/NewVendor'
|
||||
import ObjectTable from '../common/ObjectTable'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { useMediaQuery } from 'react-responsive'
|
||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card } from 'antd'
|
||||
import loglevel from 'loglevel'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// src/gcodefiles.js
|
||||
|
||||
import React, { useState, useRef } from 'react'
|
||||
import { useState, useRef } from 'react'
|
||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||
import NewGCodeFile from './GCodeFiles/NewGCodeFile'
|
||||
import useColumnVisibility from '../hooks/useColumnVisibility'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card, Typography } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useState, useContext, useEffect } from 'react'
|
||||
import { useState, useContext, useEffect } from 'react'
|
||||
import axios from 'axios'
|
||||
import { useMediaQuery } from 'react-responsive'
|
||||
import {
|
||||
@ -24,7 +24,7 @@ import {
|
||||
} from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
|
||||
import { AuthContext } from '../../context/AuthContext.js'
|
||||
import { AuthContext } from '../../context/AuthContext.jsx'
|
||||
|
||||
import GCodeFileIcon from '../../../Icons/GCodeFileIcon'
|
||||
|
||||
@ -121,7 +121,7 @@ const NewGCodeFile = ({ onOk, reset }) => {
|
||||
}
|
||||
}
|
||||
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
newGCodeFileForm
|
||||
.validateFields({
|
||||
validateOnly: true
|
||||
@ -140,14 +140,17 @@ const NewGCodeFile = ({ onOk, reset }) => {
|
||||
key: 'filament',
|
||||
label: 'Filament',
|
||||
children:
|
||||
newGCodeFileFormValues?.filament != null ??
|
||||
(<>
|
||||
newGCodeFileFormValues?.filament != null ? (
|
||||
<>
|
||||
{newGCodeFileFormValues.filament}
|
||||
<Badge
|
||||
text={newGCodeFileFormValues.filament.name}
|
||||
color={newGCodeFileFormValues.filament.color}
|
||||
/>
|
||||
</>)('n/a')
|
||||
</>
|
||||
) : (
|
||||
'n/a'
|
||||
)
|
||||
},
|
||||
{
|
||||
key: 'cost',
|
||||
@ -205,7 +208,7 @@ const NewGCodeFile = ({ onOk, reset }) => {
|
||||
}
|
||||
]
|
||||
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
if (reset) {
|
||||
setCurrentStep(0)
|
||||
newGCodeFileForm.resetFields()
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// src/Jobs.js
|
||||
|
||||
import React, { useState, useRef } from 'react'
|
||||
import { useState, useRef } from 'react'
|
||||
import { Button, Flex, Space, Modal, Dropdown, message } from 'antd'
|
||||
import NewJob from './Jobs/NewJob.jsx'
|
||||
import useColumnVisibility from '../hooks/useColumnVisibility.js'
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react'
|
||||
import { useState } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { useMediaQuery } from 'react-responsive'
|
||||
import { Typography, Flex, Steps, Divider } from 'antd'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// src/Printers.js
|
||||
|
||||
import React, { useState, useRef } from 'react'
|
||||
import { useState, useRef } from 'react'
|
||||
import { Button, message, Dropdown, Space, Flex, Modal } from 'antd'
|
||||
import NewPrinter from './Printers/NewPrinter'
|
||||
import PlusIcon from '../../Icons/PlusIcon'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useContext, useCallback, useEffect } from 'react'
|
||||
import { useState, useContext, useCallback, useEffect } from 'react'
|
||||
import axios from 'axios'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { useMediaQuery } from 'react-responsive'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useContext, useEffect, useCallback } from 'react'
|
||||
import { useState, useContext, useEffect, useCallback } from 'react'
|
||||
import axios from 'axios'
|
||||
import {
|
||||
Form,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useRef, useState } from 'react'
|
||||
import { useRef, useState } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { Space, Flex, Card } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useState, useCallback, useContext } from 'react'
|
||||
import { useEffect, useState, useCallback, useContext } from 'react'
|
||||
import {
|
||||
Descriptions,
|
||||
Space,
|
||||
@ -78,6 +78,7 @@ const ProductionOverview = () => {
|
||||
setStats((prev) => ({ ...prev, printers: printStats }))
|
||||
setError(null)
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
setError('Failed to fetch printer details')
|
||||
messageApi.error('Failed to fetch printer details')
|
||||
} finally {
|
||||
@ -98,6 +99,7 @@ const ProductionOverview = () => {
|
||||
setStats((prev) => ({ ...prev, jobs: jobstats }))
|
||||
setError(null)
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
setError('Failed to fetch printer details')
|
||||
messageApi.error('Failed to fetch printer details')
|
||||
} finally {
|
||||
@ -115,6 +117,7 @@ const ProductionOverview = () => {
|
||||
})
|
||||
setChartData(response.data)
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
console.error('Failed to fetch chart data:', err)
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import DashboardSidebar from '../common/DashboardSidebar'
|
||||
import ProductionIcon from '../../Icons/ProductionIcon'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// src/SubJobs.js
|
||||
|
||||
import React, { useRef } from 'react'
|
||||
import { useRef } from 'react'
|
||||
import { Button, Flex, Space, Dropdown } from 'antd'
|
||||
import useColumnVisibility from '../hooks/useColumnVisibility.js'
|
||||
import ReloadIcon from '../../Icons/ReloadIcon.jsx'
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Space, Tag } from 'antd'
|
||||
import CheckIcon from '../../Icons/CheckIcon'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useMemo, useState } from 'react'
|
||||
import { useMemo, useState } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import CodeMirror from '@uiw/react-codemirror'
|
||||
import { javascript } from '@codemirror/lang-javascript'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { useState, useEffect } from 'react'
|
||||
import { ColorPicker, Checkbox, Flex } from 'antd'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import ViewButton from './ViewButton'
|
||||
import { getModelByName } from '../../../database/ObjectModels'
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Button, Tooltip, message } from 'antd'
|
||||
import CopyIcon from '../../Icons/CopyIcon'
|
||||
@ -37,6 +36,8 @@ const CopyButton = ({
|
||||
document.execCommand('copy')
|
||||
messageApi.success('Copied to clipboard')
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
console.error(err)
|
||||
messageApi.error('Failed to copy')
|
||||
}
|
||||
document.body.removeChild(textarea)
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Flex, Typography } from 'antd'
|
||||
import Flag from './Flag'
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { Select, Flex, Typography } from 'antd'
|
||||
import PropTypes from 'prop-types'
|
||||
import Flag from './Flag'
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
// DashboardBreadcrumb.js
|
||||
import React from 'react'
|
||||
import { Breadcrumb, Button, Flex, Space } from 'antd'
|
||||
import { Link, useLocation, useNavigate } from 'react-router-dom'
|
||||
import ArrowLeftIcon from '../../Icons/ArrowLeftIcon'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// DashboardNavigation.js
|
||||
import React, { useContext, useEffect, useState } from 'react'
|
||||
import { useContext, useEffect, useState } from 'react'
|
||||
import {
|
||||
Menu,
|
||||
Flex,
|
||||
@ -176,7 +176,7 @@ const DashboardNavigation = () => {
|
||||
</Badge>
|
||||
</Space>
|
||||
|
||||
{process.env.NODE_ENV === 'development' && (
|
||||
{import.meta.env.MODE === 'development' && (
|
||||
<Space>
|
||||
{apiServerState === 'connected' ? (
|
||||
<Tooltip title='Connected to api server' arrow={false}>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect, useContext } from 'react'
|
||||
import { useState, useEffect, useContext } from 'react'
|
||||
import { Layout, Menu, Flex, Button } from 'antd'
|
||||
import { CaretDownFilled } from '@ant-design/icons'
|
||||
import CollapseSidebarIcon from '../../Icons/CollapseSidebarIcon'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useContext } from 'react'
|
||||
import { useContext } from 'react'
|
||||
import { Flex, Button } from 'antd'
|
||||
import { ElectronContext } from '../context/ElectronContext'
|
||||
import XMarkIcon from '../../Icons/XMarkIcon'
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Modal, Button, Space, Typography } from 'antd'
|
||||
import { getModelByName } from '../../../database/ObjectModels'
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { Button, Space } from 'antd'
|
||||
import CheckIcon from '../../Icons/CheckIcon.jsx'
|
||||
import XMarkIcon from '../../Icons/XMarkIcon.jsx'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, {
|
||||
import {
|
||||
useState,
|
||||
useEffect,
|
||||
useContext,
|
||||
@ -90,6 +90,7 @@ const EditObjectForm = forwardRef(
|
||||
setFetchLoading(false)
|
||||
onStateChange({ loading: false })
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
messageApi.error('Failed to fetch object info')
|
||||
showError(
|
||||
`Failed to fetch object information. Message: ${err.message}. Code: ${err.code}`,
|
||||
@ -172,6 +173,7 @@ const EditObjectForm = forwardRef(
|
||||
onStateChange({ isEditing: false })
|
||||
messageApi.success('Information updated successfully')
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
if (err.errorFields) {
|
||||
return
|
||||
}
|
||||
@ -199,6 +201,7 @@ const EditObjectForm = forwardRef(
|
||||
messageApi.success('Deleted successfully')
|
||||
// Optionally: trigger a callback to parent to remove this object from view
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
messageApi.error('Failed to delete')
|
||||
showError(
|
||||
`Failed to delete. Message: ${err.message}. Code: ${err.code}`,
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Typography, Flex, Button, Tooltip } from 'antd'
|
||||
import NewMailIcon from '../../Icons/NewMailIcon'
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
// FilamentSelect.js
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import config from '../../../config'
|
||||
import ObjectSelect from './ObjectSelect'
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { Flex, Typography, Badge } from 'antd'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import config from '../../../config'
|
||||
import ObjectSelect from './ObjectSelect'
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import { Progress, Flex, Space } from 'antd'
|
||||
import React from 'react'
|
||||
import StateTag from './StateTag'
|
||||
|
||||
const getProgressColor = (percent) => {
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Flex } from 'antd'
|
||||
const Flag = ({
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
// GCodeFileSelect.js
|
||||
import PropTypes from 'prop-types'
|
||||
import React from 'react'
|
||||
import config from '../../../config'
|
||||
import ObjectSelect from './ObjectSelect'
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
// PrinterSelect.js
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Flex, Typography, Popover } from 'antd'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { Collapse, Flex, Typography } from 'antd'
|
||||
import { CaretLeftOutlined } from '@ant-design/icons'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user