Old changes
parent
74a68fb6b4
commit
03f8d7292e
|
|
@ -1,3 +1,2 @@
|
|||
node_modules/
|
||||
.cache/
|
||||
public/
|
||||
|
|
|
|||
14
Dockerfile
14
Dockerfile
|
|
@ -1,12 +1,8 @@
|
|||
FROM node:14.4.0
|
||||
FROM nginx:1.19.0-alpine
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
COPY ./public /app/public
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
RUN mkdir -p /var/www/work_front/html && \
|
||||
cp -r /app/public/* /var/www/work_front/html/
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm install -g gatsby-cli
|
||||
|
||||
CMD ['gatsby', 'develop', '-H', '0.0.0.0:8000']
|
||||
COPY ./default.conf /etc/nginx/conf.d/default.conf
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
root /var/www/work_front/html;
|
||||
index index.html index.htm index.nginx-debian.html;
|
||||
|
||||
server_name work_front www.work_front;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
|
|
@ -56,6 +56,12 @@ const ModelUploadForm = () => {
|
|||
refList={ [] }
|
||||
action={ handleModelUpload }
|
||||
/>
|
||||
<p>
|
||||
{ 'info' in upload_blend_file_status
|
||||
? upload_blend_file_status.info
|
||||
: ''
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 958 KiB |
|
|
@ -30,7 +30,7 @@ const CanvasBackgroundAnimation = () => {
|
|||
line_linked: {
|
||||
enable: true,
|
||||
distance: 150,
|
||||
color: menuColor,
|
||||
color: darkGreen,
|
||||
opacity: 0.4,
|
||||
width: 1
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import React from 'react';
|
||||
// import ReactDOM from 'react-dom';
|
||||
import '../styles/general.scss'
|
||||
|
||||
import { Provider } from 'react-redux';
|
||||
|
|
@ -11,11 +10,17 @@ import Root from './func_group/root';
|
|||
// echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
|
||||
const IndexPage = () => {
|
||||
if (typeof window !== `undefined` && store !== 0)
|
||||
return (
|
||||
<Provider store={ store }>
|
||||
<Root />
|
||||
</Provider>
|
||||
)
|
||||
else
|
||||
return (
|
||||
<>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default IndexPage
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
let API = 'localhost:9090'
|
||||
// let API = 'localhost:9090'
|
||||
let API = 'render_app_backend:9090'
|
||||
export const GeneralAddress = 'http://' + API
|
||||
export const GeneralAddressWS = 'ws://' + API + '/render'
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
export const loadState = () => {
|
||||
if ( typeof window !== 'undefined' ) {
|
||||
try {
|
||||
const serializedState = localStorage.getItem('state')
|
||||
|
||||
|
|
@ -13,9 +14,11 @@ export const loadState = () => {
|
|||
console.log(err)
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const saveState = (state) => {
|
||||
if ( typeof window !== 'undefined' ) {
|
||||
try {
|
||||
|
||||
const serializedState = JSON.stringify(state)
|
||||
|
|
@ -29,4 +32,5 @@ export const saveState = (state) => {
|
|||
} catch (err) {
|
||||
console.log('save in local storage error')
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -10,9 +10,14 @@ import { userAuthReducer } from './slices/userAuthSlice'
|
|||
import { userCrudReducer } from './slices/userCrudSlice'
|
||||
|
||||
|
||||
let persistedState = loadState()
|
||||
let persistedState = null
|
||||
|
||||
export const store = configureStore({
|
||||
if (typeof window !== `undefined`) {
|
||||
persistedState = loadState()
|
||||
}
|
||||
|
||||
export const store = typeof window !== `undefined`
|
||||
? configureStore({
|
||||
reducer: {
|
||||
modelCrudReducer,
|
||||
renderCrudReducer,
|
||||
|
|
@ -22,6 +27,9 @@ export const store = configureStore({
|
|||
},
|
||||
preloadedState: persistedState
|
||||
})
|
||||
: 0
|
||||
|
||||
if (typeof window !== `undefined`) {
|
||||
|
||||
store.subscribe(() => {
|
||||
saveState(store.getState());
|
||||
|
|
@ -30,3 +38,5 @@ store.subscribe(() => {
|
|||
store.subscribe(lodash.throttle(() => {
|
||||
saveState(store.getState())
|
||||
}, 100))
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@
|
|||
body {
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
background-color: rgba(0,128,0,1);
|
||||
// background-color: rgba(0,128,0,1);
|
||||
background:
|
||||
url("../images/background.jpg")
|
||||
rgba(0,128,0,1) 100%;
|
||||
background-size: 100% auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue