This commit is contained in:
team3
2026-06-17 13:30:09 +02:00
parent 0a96705453
commit f30c7a6456
3 changed files with 30 additions and 12 deletions

View File

@@ -322,15 +322,18 @@ function onWindowKey(e) {
onMounted(() => window.addEventListener('keydown', onWindowKey))
onUnmounted(() => window.removeEventListener('keydown', onWindowKey))
// ALT+1 Nachfragen/Nachhaken · ALT+2 primär (Antwort abgeben / Nächste Frage) · ALT+3 Gründlich prüfen.
// ALT+1 Nachfragen/Nachhaken · ALT+2 primär (Antwort abgeben / Nächste Frage)
// ALT+3 Verlauf bewerten (frage_offen, nach Diskussion) bzw. Gründlich prüfen (bewertet).
function onPruefKey(e) {
if (!e.altKey || e.repeat) return
if (e.key === '1') { e.preventDefault(); nachfragen() }
else if (e.key === '2') {
e.preventDefault()
pruefPhase.value === 'frage_offen' ? antwortAbgeben() : naechsteFrageZeigen()
} else if (e.key === '3' && pruefPhase.value === 'bewertet') {
e.preventDefault(); gruendlichPruefen()
} else if (e.key === '3') {
e.preventDefault()
if (pruefPhase.value === 'bewertet') gruendlichPruefen()
else if (pruefPhase.value === 'frage_offen' && hatDiskussion.value) verlaufBewerten()
}
}
</script>
@@ -422,7 +425,7 @@ function onPruefKey(e) {
<!-- Phase idle: Frage anfordern -->
<div v-if="pruefPhase === 'idle'" class="bp-actions">
<button v-if="pruefLoading" class="bp-action cancel" @click="pruefAbbrechen">Abbrechen</button>
<button v-if="pruefLoading" class="bp-action cancel" title="ESC" @click="pruefAbbrechen">Abbrechen</button>
<button v-else class="bp-action primary" @click="frageAnfordern">Frage anfordern</button>
</div>
@@ -437,16 +440,16 @@ function onPruefKey(e) {
></textarea>
</div>
<div class="bp-actions">
<button v-if="pruefLoading" class="bp-action cancel" @click="pruefAbbrechen">Abbrechen</button>
<button v-if="pruefLoading" class="bp-action cancel" title="ESC" @click="pruefAbbrechen">Abbrechen</button>
<template v-else-if="pruefPhase === 'frage_offen'">
<button class="bp-action" :disabled="!pruefInput.trim()" @click="nachfragen">Nachfragen</button>
<button v-if="hatDiskussion" class="bp-action" @click="verlaufBewerten">Verlauf bewerten</button>
<button class="bp-action primary" :disabled="!pruefInput.trim()" @click="antwortAbgeben">Antwort abgeben</button>
<button class="bp-action" title="Alt+1" :disabled="!pruefInput.trim()" @click="nachfragen"><span class="bp-kbd">1</span>Nachfragen</button>
<button class="bp-action primary" title="Alt+2" :disabled="!pruefInput.trim()" @click="antwortAbgeben"><span class="bp-kbd">2</span>Antwort abgeben</button>
<button v-if="hatDiskussion" class="bp-action" title="Alt+3" @click="verlaufBewerten"><span class="bp-kbd">3</span>Verlauf bewerten</button>
</template>
<template v-else>
<button class="bp-action" :disabled="!pruefInput.trim()" @click="nachfragen">Nachhaken</button>
<button class="bp-action" @click="gruendlichPruefen">Gründlich prüfen</button>
<button class="bp-action primary" @click="naechsteFrageZeigen">Nächste Frage</button>
<button class="bp-action" title="Alt+1" :disabled="!pruefInput.trim()" @click="nachfragen"><span class="bp-kbd">1</span>Nachhaken</button>
<button class="bp-action primary" title="Alt+2" @click="naechsteFrageZeigen"><span class="bp-kbd">2</span>Nächste Frage</button>
<button class="bp-action" title="Alt+3" @click="gruendlichPruefen"><span class="bp-kbd">3</span>Gründlich prüfen</button>
</template>
</div>
</template>
@@ -514,6 +517,14 @@ function onPruefKey(e) {
.bp-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.bp-actions .bp-action { margin-top: 0; }
.bp-kbd {
display: inline-flex; align-items: center; justify-content: center;
min-width: 1rem; height: 1rem; padding: 0 0.2rem; margin-right: 0.35rem;
font-size: 0.65rem; font-weight: 600; border-radius: 3px;
background: var(--panel); border: 1px solid var(--border); color: var(--text-muted);
}
.bp-action.primary .bp-kbd { background: color-mix(in srgb, var(--on-accent) 20%, transparent); border-color: transparent; color: var(--on-accent); }
.bp-messages { display: flex; flex-direction: column; gap: 0.4rem; max-height: 320px; overflow-y: auto; }
.bp-msg {
max-width: 88%;