Skip to content

Commit 42860e7

Browse files
committed
Merge branch 'develop' into new-gke-cluster
2 parents c54f4fc + 5f96139 commit 42860e7

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

client/modules/IDE/components/Toolbar.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class Toolbar extends React.Component {
135135
onClick={() => {
136136
if (canEditProjectName) {
137137
this.props.showEditProjectName();
138-
setTimeout(() => this.projectNameInput.focus(), 100);
138+
setTimeout(() => this.projectNameInput.focus(), 140);
139139
}
140140
}}
141141
disabled={!canEditProjectName}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { useEffect } from 'react';
2+
import Cookies from 'js-cookie';
3+
import { useDispatch } from 'react-redux';
4+
import { showToast, setToastText } from '../../IDE/actions/toast';
5+
6+
function Notification() {
7+
const dispatch = useDispatch();
8+
useEffect(() => {
9+
const notification = Cookies.get('p5-notification');
10+
if (!notification) {
11+
// show the toast
12+
dispatch(showToast(30000));
13+
const text = `There is a scheduled outage on Sunday, April 9 3AM - 5AM UTC.
14+
The entire site will be down, so please plan accordingly.`;
15+
dispatch(setToastText(text));
16+
Cookies.set('p5-notification', true, { expires: 365 });
17+
}
18+
});
19+
return null;
20+
}
21+
22+
export default Notification;

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "p5.js-web-editor",
3-
"version": "2.1.6",
3+
"version": "2.2.1",
44
"description": "The web editor for p5.js.",
55
"scripts": {
66
"clean": "rimraf dist",

0 commit comments

Comments
 (0)