by default show undo and check original button

This commit is contained in:
Sanster 2022-02-05 21:50:01 +08:00
parent 8eeb350f49
commit 8013fc554f

View File

@ -418,9 +418,9 @@ export default function Editor(props: EditorProps) {
value={brushSize}
onChange={setBrushSize}
/>
{renders.length ? (
<>
<div>
<Button
className="mr-2"
icon={
<svg
width="19"
@ -437,8 +437,10 @@ export default function Editor(props: EditorProps) {
</svg>
}
onClick={undo}
disabled={renders.length === 0}
/>
<Button
className="mr-2"
icon={<EyeIcon className="w-6 h-6" />}
onDown={ev => {
ev.preventDefault()
@ -449,13 +451,10 @@ export default function Editor(props: EditorProps) {
setShowOriginal(false)
setTimeout(() => setShowSeparator(false), 300)
}}
disabled={renders.length === 0}
>
{windowSize.width > 640 ? 'Original' : undefined}
{undefined}
</Button>
</>
) : (
<></>
)}
<Button
primary
@ -463,9 +462,10 @@ export default function Editor(props: EditorProps) {
disabled={!renders.length}
onClick={download}
>
{windowSize.width > 640 ? 'Download' : undefined}
{undefined}
</Button>
</div>
</div>
</div>
)
}