Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup plus reduce notification duration #885

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var { Notyf } = require('../lib/notyf.min.js');

AFRAME.registerComponent('notify', {
schema: {
duration: { type: 'number', default: 6000 },
duration: { type: 'number', default: 3000 },
ripple: { type: 'boolean', default: false },
position: {
type: 'string',
Expand Down
14 changes: 4 additions & 10 deletions src/editor/components/scenegraph/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,17 +278,11 @@ export default class Toolbar extends Component {
// Change the hash URL without reloading
window.location.hash = `#/scenes/${currentSceneId}.json`;
if (this.state.savedNewDocument) {
STREET.notify.successMessage(
'Scene saved to 3DStreet Cloud as a new file.'
);
this.setState({ savedNewDocument: false }); // go back to default assumption of save overwrite
} else {
const notification = STREET.notify.successMessage(
'Scene saved to 3DStreet Cloud in existing file.'
);
this.setState({ notification });
console.log('message', notification);
}
const notification = STREET.notify.successMessage('Scene saved');
this.setState({ notification });

this.setState({ isAuthor: true });
sendMetric('SaveSceneAction', doSaveAs ? 'saveAs' : 'save');
} catch (error) {
Expand Down Expand Up @@ -317,7 +311,7 @@ export default class Toolbar extends Component {
}
this.cloudSaveHandler({ doSaveAs: false });
}
}, 500);
}, 1000);

handleRemixClick = () => {
posthog.capture('remix_scene_clicked');
Expand Down