Skip to content

Commit

Permalink
Merge pull request #959 from 3DStreet/animated-save-button
Browse files Browse the repository at this point in the history
Less moving parts during the saved animation
  • Loading branch information
kfarr authored Jan 15, 2025
2 parents 7a074f6 + 9fa71ce commit 40ace74
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
20 changes: 12 additions & 8 deletions src/editor/components/components/Save/Save.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,23 @@ export const Save = ({ currentUser }) => {
return (
<div>
{currentUser ? (
<div className="saveButtonWrapper relative w-24">
<div className="saveButtonWrapper relative">
{isSavingScene ? (
<Button variant="filled">
<div>Saved</div>
<Button
leadingIcon={<Save24Icon />}
variant="filled"
className="min-w-[110px]"
>
<div className="grow">Saved</div>
</Button>
) : (
<Button
leadingIcon={<Save24Icon />}
onClick={toggleSaveActionState}
disabled={isSavingScene}
variant="toolbtn"
className="min-w-[110px]"
>
<div>Save</div>
<div className="grow">Save</div>
</Button>
)}
{isSaveActionActive && (
Expand All @@ -120,11 +124,11 @@ export const Save = ({ currentUser }) => {
) : (
<Button
leadingIcon={<Save24Icon />}
onClick={handleUnsignedSave}
disabled={isSavingScene}
onClick={!isSavingScene ? handleUnsignedSave : undefined}
variant="toolbtn"
className="min-w-[110px]"
>
<div>Save</div>
<div className="grow">Save</div>
</Button>
)}
</div>
Expand Down
3 changes: 1 addition & 2 deletions src/editor/components/scenegraph/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ function Toolbar({ currentUser }) {
<div className="col-span-2 flex items-center justify-end gap-2">
<Button
leadingIcon={<Edit24Icon />}
onClick={newHandler}
disabled={isSavingScene}
onClick={!isSavingScene ? newHandler : undefined}
variant="toolbtn"
>
<div>New</div>
Expand Down

0 comments on commit 40ace74

Please sign in to comment.