update
This commit is contained in:
4
definition-web-ui
Normal file
4
definition-web-ui
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"schemaVersion": 2,
|
||||
"dockerfilePath": "./src/Managing.WebApp/Dockerfile-web-ui-dev"
|
||||
}
|
||||
2
src/Managing.WebApp/.gitignore
vendored
2
src/Managing.WebApp/.gitignore
vendored
@@ -3,3 +3,5 @@ node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
.env
|
||||
32
src/Managing.WebApp/Dockerfile-web-ui-dev
Normal file
32
src/Managing.WebApp/Dockerfile-web-ui-dev
Normal file
@@ -0,0 +1,32 @@
|
||||
# Stage 1: Build the Vite application
|
||||
FROM node:20 AS builder
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the package.json and package-lock.json first to leverage Docker's cache
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci --only=production
|
||||
|
||||
# Copy the application code
|
||||
COPY . .
|
||||
|
||||
# Build the Vite application
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Create the runtime image
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copy the built Vite application from the builder stage
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
# Copy a custom Nginx configuration file (if you need one)
|
||||
# COPY nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Start the Nginx server
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@@ -18,13 +18,14 @@
|
||||
"dependencies": {
|
||||
"@heroicons/react": "^1.0.6",
|
||||
"@microsoft/signalr": "^6.0.5",
|
||||
"@tanstack/react-query": "^4.33.0",
|
||||
"@tanstack/react-query": "^5.0.0",
|
||||
"@wagmi/chains": "^0.2.9",
|
||||
"@wagmi/core": "^1.3.9",
|
||||
"@wagmi/connectors": "^4.3.2",
|
||||
"@wagmi/core": "^2.9.0",
|
||||
"@walletconnect/universal-provider": "^2.8.6",
|
||||
"axios": "^0.27.2",
|
||||
"classnames": "^2.3.1",
|
||||
"connectkit": "^1.1.3",
|
||||
"connectkit": "^1.7.3",
|
||||
"date-fns": "^2.30.0",
|
||||
"jotai": "^1.6.7",
|
||||
"lightweight-charts": "git+https://github.com/ntf/lightweight-charts.git",
|
||||
@@ -44,8 +45,8 @@
|
||||
"react-table": "^7.8.0",
|
||||
"react-toastify": "^9.0.1",
|
||||
"reactflow": "^11.8.3",
|
||||
"viem": "^1.4.2",
|
||||
"wagmi": "^1.3.10",
|
||||
"viem": "^2.0.6",
|
||||
"wagmi": "^2.2.1",
|
||||
"web3": "^4.0.2",
|
||||
"zustand": "^4.4.1"
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Suspense, lazy } from 'react'
|
||||
import { Route, Routes } from 'react-router-dom'
|
||||
|
||||
import LayoutMain from '../../layouts'
|
||||
import Desk from '../../pages/desk/desk'
|
||||
import Desk from '../../pages/desk/Desk'
|
||||
import Scenario from '../../pages/scenarioPage/scenario'
|
||||
import Tools from '../../pages/toolsPage/tools'
|
||||
import Workflows from '../../pages/workflow/workflows'
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
import { useConnect } from 'wagmi'
|
||||
|
||||
export function Profile() {
|
||||
const { connect, connectors, error, isLoading, pendingConnector } =
|
||||
useConnect()
|
||||
// export function Profile() {
|
||||
// const { connect, connectors, error, isLoading, pendingConnector } =
|
||||
// useConnect()
|
||||
|
||||
return (
|
||||
<div>
|
||||
{connectors.map((connector) => (
|
||||
<button
|
||||
disabled={!connector.ready}
|
||||
key={connector.id}
|
||||
onClick={() => connect({ connector })}
|
||||
>
|
||||
{connector.name}
|
||||
{!connector.ready && ' (unsupported)'}
|
||||
{isLoading &&
|
||||
connector.id === pendingConnector?.id &&
|
||||
' (connecting)'}
|
||||
</button>
|
||||
))}
|
||||
// return (
|
||||
// <div>
|
||||
// {connectors.map((connector) => (
|
||||
// <button
|
||||
// disabled={!connector.ready}
|
||||
// key={connector.id}
|
||||
// onClick={() => connect({ connector })}
|
||||
// >
|
||||
// {connector.name}
|
||||
// {!connector.ready && ' (unsupported)'}
|
||||
// {isLoading &&
|
||||
// connector.id === pendingConnector?.id &&
|
||||
// ' (connecting)'}
|
||||
// </button>
|
||||
// ))}
|
||||
|
||||
{error && <div>{error.message}</div>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
// {error && <div>{error.message}</div>}
|
||||
// </div>
|
||||
// )
|
||||
// }
|
||||
|
||||
@@ -6,7 +6,7 @@ const loadWidget = (component: any) => {
|
||||
return React.lazy(() => import(`./widgets/${component}.tsx`))
|
||||
}
|
||||
|
||||
export const DeskWidget = React.forwardRef((props: any, ref) => {
|
||||
const DeskWidget = React.forwardRef((props: any, ref) => {
|
||||
const widget = props
|
||||
const widgetProperties = widget['data-properties'] as IWidgetProperties
|
||||
const WidgetComponent = loadWidget(widgetProperties.id)
|
||||
@@ -19,3 +19,5 @@ export const DeskWidget = React.forwardRef((props: any, ref) => {
|
||||
</div>
|
||||
)
|
||||
})
|
||||
|
||||
export default DeskWidget
|
||||
Reference in New Issue
Block a user