Compare commits
No commits in common. "fa5e7cceb1e86ac2e10e6205ba77ad792fe6643c" and "f181bc6cb702555165cb4eb5b99bee0cf79f9873" have entirely different histories.
fa5e7cceb1
...
f181bc6cb7
5 changed files with 7 additions and 11 deletions
|
@ -262,7 +262,7 @@ function generateNewIdsForChildren(file, files) {
|
|||
export function cloneProject(id) {
|
||||
return (dispatch, getState) => {
|
||||
dispatch(setUnsavedChanges(false));
|
||||
return new Promise((resolve, reject) => {
|
||||
new Promise((resolve, reject) => {
|
||||
if (!id) {
|
||||
resolve(getState());
|
||||
} else {
|
||||
|
|
|
@ -58,14 +58,11 @@ class Toolbar extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const canEditProjectName = this.canEditProjectName();
|
||||
|
||||
const playButtonClass = classNames({
|
||||
'toolbar__play-button': true,
|
||||
'toolbar__play-button--selected': this.props.isPlaying,
|
||||
'toolbar__play-button--saved': this.props.isSaved,
|
||||
'toolbar__play-button--unsaved': !this.props.isSaved,
|
||||
'toolbar__play-button--clone': this.props.unsavedChanges && !canEditProjectName
|
||||
'toolbar__play-button--unsaved': !this.props.isSaved
|
||||
});
|
||||
const stopButtonClass = classNames({
|
||||
'toolbar__stop-button': true,
|
||||
|
@ -80,6 +77,8 @@ class Toolbar extends React.Component {
|
|||
'toolbar__project-name-container--editing': this.props.project.isEditingName
|
||||
});
|
||||
|
||||
const canEditProjectName = this.canEditProjectName();
|
||||
|
||||
return (
|
||||
<div className="toolbar">
|
||||
<button
|
||||
|
@ -179,7 +178,6 @@ class Toolbar extends React.Component {
|
|||
|
||||
Toolbar.propTypes = {
|
||||
isPlaying: PropTypes.bool.isRequired,
|
||||
unsavedChanges: PropTypes.bool.isRequired,
|
||||
isSaved: PropTypes.bool.isRequired,
|
||||
preferencesIsVisible: PropTypes.bool.isRequired,
|
||||
stopSketch: PropTypes.func.isRequired,
|
||||
|
@ -223,7 +221,6 @@ function mapStateToProps(state) {
|
|||
isSaved: state.project.updatedAt !== '',
|
||||
preferencesIsVisible: state.ide.preferencesIsVisible,
|
||||
project: state.project,
|
||||
unsavedChanges: state.ide.unsavedChanges,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -183,7 +183,6 @@ class IDEView extends React.Component {
|
|||
console.trace('project to save:', this.props.project);
|
||||
return this.props.saveProject(this.cmController.getContent());
|
||||
} else if (this.props.user.authenticated) {
|
||||
console.log('cloning!');
|
||||
return this.props.cloneProject();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.toolbar__play-button {
|
||||
&--unsaved, &--clone {
|
||||
&--unsaved {
|
||||
// for some reason, I cannot manage to have PreviewFrame save _and_ actuall yload the project (it stops the playback)
|
||||
// pressing twice works. So just show a floppy the first time around :-)
|
||||
svg {
|
||||
|
|
4
dist/static/assets/webcam.js
vendored
4
dist/static/assets/webcam.js
vendored
|
@ -135,9 +135,9 @@ function preload() {
|
|||
for(let id in data) {
|
||||
images[id] = loadImage(data[id]);
|
||||
}
|
||||
// console.log('images', data, images);
|
||||
console.log('images', data, images);
|
||||
});
|
||||
// console.log(images);
|
||||
console.log(images);
|
||||
}
|
||||
|
||||
function setup() {
|
||||
|
|
Loading…
Reference in a new issue