diff --git a/.gitignore b/.gitignore index 7d68e31..7f91610 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ node_modules/ dist/ backups/ backup/ +test-reports/ +test-results/ +playwright-report/ docs/prototype/ .env .env.* diff --git a/apps/web/src/components/QuickEntryDrawer.vue b/apps/web/src/components/QuickEntryDrawer.vue index beb4ee1..7041cf1 100644 --- a/apps/web/src/components/QuickEntryDrawer.vue +++ b/apps/web/src/components/QuickEntryDrawer.vue @@ -58,6 +58,14 @@ const displayAmount = computed(() => maximumFractionDigits: minorUnits.value, }).format(calculatedAmount.value), ); +const amountSizeClass = computed(() => { + const length = displayAmount.value.length; + if (length <= 8) return "amount-normal"; + if (length <= 10) return "amount-compact"; + if (length <= 13) return "amount-small"; + return "amount-tiny"; +}); +const amountNeedsFullRow = computed(() => displayAmount.value.length > 10); const currencySymbol = computed(() => currencies[currency.value].symbol); const selectedLedgerLabel = computed(() => { const visibleNames = props.ledgerOptions @@ -179,6 +187,13 @@ function startNoteEditing() { noteEditing.value = true; } +function finishNoteEditing(event: KeyboardEvent) { + if (event.isComposing) return; + event.preventDefault(); + noteEditing.value = false; + (event.currentTarget as HTMLInputElement).blur(); +} + function openLedgerPicker() { confirmCategory(); noteEditing.value = false; @@ -224,13 +239,13 @@ function saveEntry() {
-