feat(calc-02): reorder keypad actions for safer input flow

This commit is contained in:
2026-05-15 21:18:47 +02:00
parent 75fe72412e
commit 39659745a6
3 changed files with 15 additions and 5 deletions
+3 -3
View File
@@ -23,9 +23,9 @@ const calculatorEl = document.querySelector('.calculator');
const statusLine = document.getElementById('statusLine');
const keypadKeys = [
{ label: '±', action: 'neg', className: 'key-default' },
{ label: 'Enter', action: 'enter', className: 'key-enter' },
{ label: '⎋', action: 'escape', className: 'key-escape' },
{ label: 'C', action: 'clear', className: 'key-danger' },
{ label: '⎋', action: 'escape', className: 'key-danger' },
{ label: '⌫', action: 'backspace', className: 'key-danger' },
{ label: '7', input: '7', className: 'key-default' },
{ label: '8', input: '8', className: 'key-default' },
@@ -41,7 +41,7 @@ const keypadKeys = [
{ label: '-', action: 'sub', className: 'key-accent' },
{ label: '0', input: '0', className: 'key-default' },
{ label: '.', input: '.', className: 'key-default' },
{ label: 'Enter', action: 'enter', className: 'key-enter' },
{ label: '±', action: 'neg', className: 'key-default' },
{ label: '+', action: 'add', className: 'key-accent' },
];