Skip to content

Commit 6676359

Browse files
authored
Merge branch 'develop' into Harshit-7373/#-issue-3241
2 parents a2e6c77 + e2e62e6 commit 6676359

File tree

11 files changed

+35
-38
lines changed

11 files changed

+35
-38
lines changed

client/modules/IDE/actions/files.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import {
1111
import { setProjectSavedTime } from './project';
1212
import { createError } from './ide';
1313

14-
function appendToFilename(filename, string) {
14+
export function appendToFilename(filename, string) {
1515
const dotIndex = filename.lastIndexOf('.');
1616
if (dotIndex === -1) return filename + string;
1717
return (
1818
filename.substring(0, dotIndex) + string + filename.substring(dotIndex)
1919
);
2020
}
2121

22-
function createUniqueName(name, parentId, files) {
22+
export function createUniqueName(name, parentId, files) {
2323
const siblingFiles = files
2424
.find((file) => file.id === parentId)
2525
.children.map((childFileId) =>

client/modules/IDE/components/About.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function About(props) {
6363
</p>
6464
<p className="about__content-column-list">
6565
<a
66-
href="https://p5js.org/learn/"
66+
href="https://p5js.org/tutorials/"
6767
target="_blank"
6868
rel="noopener noreferrer"
6969
>
@@ -164,7 +164,7 @@ function About(props) {
164164
</p>
165165
<p className="about__content-column-list">
166166
<a
167-
href="https://p5js.org/download/support.html"
167+
href="https://p5js.org/donate/"
168168
target="_blank"
169169
rel="noopener noreferrer"
170170
>

client/modules/IDE/components/FileNode.jsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import PropTypes from 'prop-types';
22
import classNames from 'classnames';
33
import React, { useState, useRef } from 'react';
44
import { connect } from 'react-redux';
5-
import { bindActionCreators } from 'redux';
65
import { useTranslation } from 'react-i18next';
6+
77
import * as IDEActions from '../actions/ide';
88
import * as FileActions from '../actions/files';
99
import DownArrowIcon from '../../../images/down-filled-triangle.svg';
@@ -353,7 +353,12 @@ const FileNode = ({
353353
<ul className="file-item__children">
354354
{children.map((childId) => (
355355
<li key={childId}>
356-
<ConnectedFileNode id={childId} parentId={id} />
356+
<ConnectedFileNode
357+
id={childId}
358+
parentId={id}
359+
canEdit={canEdit}
360+
onClickFile={onClickFile}
361+
/>
357362
</li>
358363
))}
359364
</ul>
@@ -402,13 +407,12 @@ function mapStateToProps(state, ownProps) {
402407
});
403408
}
404409

405-
function mapDispatchToProps(dispatch) {
406-
return bindActionCreators(Object.assign(FileActions, IDEActions), dispatch);
407-
}
410+
const mapDispatchToProps = { ...FileActions, ...IDEActions };
408411

409412
const ConnectedFileNode = connect(
410413
mapStateToProps,
411414
mapDispatchToProps
412415
)(FileNode);
413416

414-
export { FileNode, ConnectedFileNode as default };
417+
export { FileNode };
418+
export default ConnectedFileNode;

client/modules/Preview/previewIndex.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const App = () => {
5555
function addCacheBustingToAssets(files) {
5656
const timestamp = new Date().getTime();
5757
return files.map((file) => {
58-
if (file.url) {
58+
if (file.url && !file.url.endsWith('obj') && !file.url.endsWith('stl')) {
5959
return {
6060
...file,
6161
url: `${file.url}?v=${timestamp}`

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "p5.js-web-editor",
3-
"version": "2.14.7",
3+
"version": "2.15.0",
44
"description": "The web editor for p5.js.",
55
"scripts": {
66
"clean": "rimraf dist",

server/migrations/emailConsolidation.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ const mongoConnectionString = process.env.MONGO_URL;
1414
const { ObjectId } = mongoose.Types;
1515
// Connect to MongoDB
1616
mongoose.Promise = global.Promise;
17-
mongoose.connect(mongoConnectionString, {
18-
useNewUrlParser: true,
19-
useUnifiedTopology: true
20-
});
17+
mongoose.connect(mongoConnectionString);
2118
mongoose.set('strictQuery', true);
2219
mongoose.connection.on('error', () => {
2320
console.error(

server/previewServer.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ const connectToMongoDB = async () => {
2222
mongoose.set('strictQuery', true);
2323

2424
await mongoose.connect(mongoConnectionString, {
25-
useNewUrlParser: true,
26-
useUnifiedTopology: true,
2725
serverSelectionTimeoutMS: 30000, // 30 seconds timeout
2826
socketTimeoutMS: 45000 // 45 seconds timeout
2927
});

server/scripts/examples-gg-latest.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' };
5959

6060
const mongoConnectionString = process.env.MONGO_URL;
6161

62-
mongoose.connect(mongoConnectionString, {
63-
useNewUrlParser: true,
64-
useUnifiedTopology: true
65-
});
62+
mongoose.connect(mongoConnectionString);
6663
mongoose.set('strictQuery', true);
6764
mongoose.connection.on('error', () => {
6865
console.error(

server/scripts/examples.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' };
1414

1515
const mongoConnectionString = process.env.MONGO_URL;
1616

17-
mongoose.connect(mongoConnectionString, {
18-
useNewUrlParser: true,
19-
useUnifiedTopology: true
20-
});
17+
mongoose.connect(mongoConnectionString);
2118
mongoose.set('strictQuery', true);
2219
mongoose.connection.on('error', () => {
2320
console.error(

0 commit comments

Comments
 (0)