easter-egg

This commit is contained in:
2025-11-16 20:55:10 +01:00
parent 51ddbe15a2
commit 4fb31f567a
+13 -2
View File
@@ -306,10 +306,10 @@
</p>
<div class="d-flex gap-2 mb-3">
<button id="commitYes" class="btn flex-fill"
:class="{'btn-success': !committed, 'btn-success disabled': committed == 'YES', 'btn-outline-success opacity-75' : committed == 'NO', 'disabled': working}"
:class="{'btn-success': committed != 'NO', 'btn-outline-success opacity-75' : committed == 'NO', 'disabled': working}"
@click="submitCommit('YES')" :autofocus="committed == 'YES'" :tabindex="committed == 'NO' ? -1 : 0">Ja, ich bin dabei!</button>
<button id="commitNo" class="btn flex-fill"
:class="{'btn-danger': !committed, 'btn-danger disabled': committed == 'NO', 'btn-outline-danger opacity-75' : committed == 'YES', 'disabled': working}"
:class="{'btn-danger': committed != 'YES', 'btn-outline-danger opacity-75' : committed == 'YES', 'disabled': working}"
@click="submitCommit('NO')" :autofocus="committed == 'NO'" :tabindex="committed == 'YES' ? -1 : 1">Nein, ich bin nicht dabei</button>
</div>
@@ -530,6 +530,7 @@
editingContactData: { email: '', phone: '' },
committed: '[[${committed}]]',
shareMsg: '',
easterEgg: 0,
init() {
const isDarkApplied = document.documentElement.getAttribute('data-bs-theme') === 'dark';
@@ -798,6 +799,16 @@
},
async submitCommit(committed) {
if (committed == this.committed) {
this.easterEgg += 1;
if (this.easterEgg >= 10) {
this.stepMsg = 'Ja, nee is klar!';
this.stepMsgType = 'info';
}
return;
}
this.easterEgg = 0;
this.stepMsg = '';
this.working = true;
this.committed = committed;
try {