feat(match-report): add clear button functionality to floating keyboard in MatchReportApiDialog

- Introduced a new button for clearing the current set input, enhancing user control during score entry.
- Updated the keyboard layout to include the clear button, improving the overall usability of the floating keyboard.
- Adjusted the logic to ensure proper handling of set clearing, maintaining data integrity in the match results.
This commit is contained in:
Torsten Schulz (local)
2026-02-26 16:42:53 +01:00
parent e5a0dfdddc
commit 00e058a665

View File

@@ -465,8 +465,9 @@
<button type="button" class="set-key" @click="setKeyboardKey(':')">:</button>
<button type="button" class="set-key" @click="setKeyboardKey('0')">0</button>
<button type="button" class="set-key" @click="setKeyboardKey('-')"></button>
<!-- <- OK -->
<!-- <- C OK -->
<button type="button" class="set-key set-key-backspace" @click="setKeyboardBackspace"></button>
<button type="button" class="set-key set-key-clear" @click="setKeyboardClear">C</button>
<button type="button" class="set-key set-key-ok" @click="setKeyboardOk">OK</button>
</div>
</div>
@@ -2281,6 +2282,14 @@ Wir wünschen den Spielen einen schönen, spannenden und fairen Verlauf und begr
const current = sets[setIndex] || '';
this.results[matchIndex].sets[setIndex] = current.slice(0, -1);
},
setKeyboardClear() {
if (!this.editingSetCell || !this.results[this.editingSetCell.matchIndex]) return;
const { matchIndex, setIndex } = this.editingSetCell;
if (!this.results[matchIndex].sets) {
this.$set(this.results[matchIndex], 'sets', ['', '', '', '', '']);
}
this.results[matchIndex].sets[setIndex] = '';
},
setKeyboardOk() {
if (!this.editingSetCell) return;
const { matchIndex, setIndex } = this.editingSetCell;
@@ -3960,11 +3969,17 @@ Wir wünschen den Spielen einen schönen, spannenden und fairen Verlauf und begr
.set-key:active {
background: #e0e0e0;
}
.set-key-backspace {
.set-key-backspace,
.set-key-clear {
font-size: 1.1rem;
color: #c62828;
border-color: #c62828;
}
.set-key-backspace:active,
.set-key-clear:active {
background: #ffebee;
}
.set-key-ok {
grid-column: span 2;
background: var(--primary-color, #1976d2);
color: #fff;
border-color: var(--primary-hover, #1565c0);