Skip to content

Commit f061bcb

Browse files
authored
Merge branch 'dev' into update-reftext
2 parents c974597 + 7a6a8fe commit f061bcb

24 files changed

Lines changed: 33665 additions & 44337 deletions

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#The client ID should NOT start with http or https! This will cause authentication failure!
2-
REACT_APP_GOOGLE_CLIENTID=<Required for authenticting with the backend, get this from a team member>
2+
REACT_APP_GOOGLE_CLIENTID=<Required for authenticting with the backend, get this from a team member>

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"curly": "warn",
4444
"no-lonely-if": "warn",
4545
"no-console": [
46-
"error",
46+
"warn",
4747
{
4848
"allow": [
4949
"warn",

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
ci-checks:
77
runs-on: ubuntu-latest
88
container:
9-
image: node:10.13
9+
image: node:12.18
1010

1111
steps:
1212
- uses: actions/checkout@v1
@@ -15,6 +15,10 @@ jobs:
1515
with:
1616
path: node_modules
1717
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
18+
- name: Reconfigure git to use HTTP authentication
19+
run: >
20+
git config --global url."https://github.com/".insteadOf
21+
ssh://git@github.com/
1822
- name: Fetch packages
1923
run: npm install
2024
- name: Run Linter

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.13
1+
10.13

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:10.13
1+
FROM node:12.18
22

33
WORKDIR /app
44
COPY . /app
@@ -8,4 +8,4 @@ ENV REACT_APP_GOOGLE_CLIENTID ${REACT_APP_GOOGLE_CLIENTID}
88

99
RUN npm install
1010
RUN npm run build
11-
RUN npm run doc
11+
RUN npm run doc

package-lock.json

Lines changed: 33362 additions & 43318 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
"version": "2.4.0",
44
"private": false,
55
"engines": {
6-
"node": "12.18.2"
6+
"node": "^12.18.2"
77
},
88
"devDependencies": {
9-
"babel-eslint": "^9.0.0",
9+
"@babel/core": "^7.9.0",
1010
"enzyme": "^3.3.0",
1111
"enzyme-adapter-react-16": "^1.1.1",
1212
"esdoc": "^1.1.0",
1313
"esdoc-standard-plugin": "^1.0.0",
1414
"eslint-plugin-react": "^7.13.0",
15-
"react-scripts": "2.1.1",
15+
"react-scripts": "^4.0.0",
1616
"redux-devtools": "^3.4.1"
1717
},
1818
"dependencies": {
@@ -26,16 +26,15 @@
2626
"bootstrap": "^4.6.0",
2727
"browserslist": "^4.6.2",
2828
"cannon": "^0.6.2",
29-
"create-react-app": "^3.0.1",
29+
"create-react-app": "^4.0.1",
3030
"esdoc-ecmascript-proposal-plugin": "^1.0.0",
3131
"esdoc-jsx-plugin": "^1.0.0",
3232
"esdoc-react-plugin": "^1.0.1",
33-
"eslint": "5.6.0",
3433
"jquery": "^3.3.1",
3534
"qrcode": "^1.2.0",
36-
"qrcode.react": "^0.8.0",
35+
"qrcode.react": "^1.0.1",
3736
"react": "^16.8.4",
38-
"react-ace": "^5.9.0",
37+
"react-ace": "^6.0.0",
3938
"react-color": "^2.17.0",
4039
"react-dom": "^16.2.0",
4140
"react-google-login": "^5.1.19",
@@ -46,10 +45,10 @@
4645
"reactour": "^1.9.1",
4746
"redux": "^3.7.2",
4847
"redux-thunk": "^2.3.0",
49-
"socket.io-client": "^2.3.0",
50-
"source-map-explorer": "^1.6.0",
51-
"styled-components": "^4.0.3",
52-
"three": "^0.98.0",
48+
"socket.io-client": "^4.0.0",
49+
"source-map-explorer": "^2.0.0",
50+
"styled-components": "^5.0.0",
51+
"three": "^0.126.1",
5352
"ua-parser-js": "^0.7.24"
5453
},
5554
"scripts": {
@@ -64,10 +63,17 @@
6463
"doc": "./node_modules/.bin/esdoc"
6564
},
6665
"proxy": "http://localhost:1337/",
67-
"browserslist": [
68-
">0.2%",
69-
"not dead",
70-
"not ie <= 11",
71-
"not op_mini all"
72-
]
66+
"browserslist": {
67+
"production": [
68+
">0.2%",
69+
"not dead",
70+
"not ie <= 11",
71+
"not op_mini all"
72+
],
73+
"development": [
74+
"last 5 chrome version",
75+
"last 5 firefox version",
76+
"last 5 safari version"
77+
]
78+
}
7379
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React from "react";
22
import Header from "../structural/header/Header";
33
import Footer from "../structural/Footer";
4-
import ModelReferencePage from "../reference/ModelReferencePage";
4+
import AssetReferencePage from "../reference/AssetReferencePage";
55

66
import * as layoutTypes from "../../constants/LayoutTypes.js";
77

8-
export const ModelReference = ({ editor, editorActions, user, authActions, scene, sceneActions, projectActions, courseActions, projects, courses, match, collectionActions, collections }) => (
8+
export const AssetReference = ({ editor, editorActions, user, authActions, scene, sceneActions, projectActions, courseActions, projects, courses, match, collectionActions, collections }) => (
99
<div className="App">
1010
<Header
1111
logging={authActions}
@@ -23,13 +23,13 @@ export const ModelReference = ({ editor, editorActions, user, authActions, scene
2323
courses={courses}
2424
collectionActions={collectionActions}
2525
collections={collections}
26-
layoutType={layoutTypes.MODEL_REFERENCE}
26+
layoutType={layoutTypes.REFERENCE}
2727
/>
2828
<div className="row no-gutters">
29-
<ModelReferencePage />
29+
<AssetReferencePage />
3030
</div>
3131
<Footer />
3232
</div>
3333
);
3434

35-
export default ModelReference;
35+
export default AssetReference;

src/components/layouts/TextureReference.js

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import React from "react";
2+
import ModelTab from "./ModelReferenceTab";
3+
import TextureTab from "./TextureReferenceTab";
4+
5+
import {
6+
Tabs,
7+
Tab,
8+
Icon,
9+
Hidden,
10+
} from "@material-ui/core";
11+
12+
import "../../css/ModelReferencePage.css";
13+
14+
export default class AssetReference extends React.Component {
15+
16+
constructor(props) {
17+
super(props);
18+
this.state = {
19+
value: "a",
20+
};
21+
}
22+
23+
handleChange = (event, value) => {
24+
this.setState({ value });
25+
};
26+
27+
componentDidMount() {
28+
const qsa = new URLSearchParams(window.location.search);
29+
if (qsa.has("tab") && qsa.get("tab").toLowerCase() === "textures") {
30+
this.setState({ value: "b" });
31+
}
32+
}
33+
34+
render() {
35+
document.title = "Asset | MYR";
36+
return (
37+
<div id="modelReference-page">
38+
<Tabs
39+
id="modelReference-tabs"
40+
variant="fullWidth"
41+
value={this.state.value}
42+
onChange={this.handleChange} >
43+
<Tab
44+
icon={<Icon className="material-icons model">model</Icon>}
45+
label={
46+
<Hidden xsDown>
47+
<div>MODEL</div>
48+
</Hidden>
49+
}
50+
value='a' />
51+
<Tab
52+
icon={<Icon className="material-icons texture">texture</Icon>}
53+
label={
54+
<Hidden xsDown>
55+
<div>TEXTURE</div>
56+
</Hidden>
57+
}
58+
value='b' />
59+
</Tabs>
60+
{this.state.value === "a" &&
61+
<div style={{ marginTop: 0 }}>
62+
<ModelTab />
63+
</div>}
64+
{this.state.value === "b" &&
65+
<div style={{ marginTop: 0 }}>
66+
<TextureTab />
67+
</div>}
68+
</div>
69+
);
70+
}
71+
}

0 commit comments

Comments
 (0)