Funktionen neu: Korrekturen aus den Gates (Hover des Knopfes bleibt #111, Ticket auch am Feature)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c87c87e76b
commit
b91ba1d5cb
3 files changed
+5
-2
No files matched your search
@@ -401,7 +401,8 @@ export async function navigiere(weg, ziel, { geheZu = geheZuStandard, speicher }
|
||||
/** Text nach dem Einschalten; antwort null heißt: war schon eingeschaltet. */
|
||||
export function erfolgText(name, antwort) {
|
||||
if (!antwort) return `${name} ist schon eingeschaltet.`
|
||||
const ticket = antwort.ticketWoid ? ` Ticket #${antwort.ticketWoid}.` : ''
|
||||
const woid = antwort.ticketWoid ?? antwort.feature?.ticketWoid // der Server nennt das Ticket an beiden Stellen
|
||||
const ticket = woid ? ` Ticket #${woid}.` : ''
|
||||
return `${name} ist eingeschaltet. Die Einrichtung läuft jetzt.${ticket}`
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
border: 0; border-radius: 6px; font-weight: 500; text-align: center; text-decoration: none; cursor: pointer;
|
||||
background: var(--kn-accent, #111); color: #fff;
|
||||
}
|
||||
.kn-fn-knopf:hover { background: var(--kn-accent-hover, #2b2b2b); }
|
||||
/* Hover: kein hellerer oder dunklerer Ton (die Fläche bleibt genau #111), nur etwas durchscheinend */
|
||||
.kn-fn-knopf:hover { opacity: .88; }
|
||||
.kn-fn-knopf:disabled, .kn-fn-knopf:disabled:hover {
|
||||
background: var(--kn-bg-subtle, #f8f9fb); color: var(--kn-text-3, #8a93a3); cursor: not-allowed; opacity: 1;
|
||||
box-shadow: var(--kn-ring, 0 0 0 1px rgba(60,66,87,.16), 0 1px 1px rgba(0,0,0,.06));
|
||||
|
||||
@@ -268,6 +268,7 @@ test('navigiere: Ziele je Weg; der Wechsel merkt die Funktion und geht auch ohne
|
||||
test('erfolgText und Meldung: eine Meldung, einmal gelesen', () => {
|
||||
assert.equal(erfolgText('News-Pinnwand', { ticketWoid: '100301' }), 'News-Pinnwand ist eingeschaltet. Die Einrichtung läuft jetzt. Ticket #100301.')
|
||||
assert.equal(erfolgText('News-Pinnwand', { ticketWoid: null }), 'News-Pinnwand ist eingeschaltet. Die Einrichtung läuft jetzt.')
|
||||
assert.equal(erfolgText('News-Pinnwand', { feature: { ticketWoid: '100300' } }), 'News-Pinnwand ist eingeschaltet. Die Einrichtung läuft jetzt. Ticket #100300.') // Ticket auch nur am Feature
|
||||
assert.equal(erfolgText('News-Pinnwand', null), 'News-Pinnwand ist schon eingeschaltet.')
|
||||
merkeMeldung('x'); assert.equal(nimmMeldung(), 'x'); assert.equal(nimmMeldung(), '')
|
||||
})
|
||||
Reference in new issue
Block a user