Commit 126a5a7b authored by Jakob Moser's avatar Jakob Moser
Browse files

Rename *-shown classes to *-dialog-shown

parent 3c38c746
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ body {
    grid-template-columns: 1fr 1fr;
}

body.welcome-shown, body.hand-in-shown {
body.welcome-dialog-shown, body.hand-in-dialog-shown {
    overflow: hidden;
}

@@ -21,7 +21,7 @@ body.welcome-shown, body.hand-in-shown {
    grid-template-columns: 1fr 2fr 1fr;
}

.welcome-shown .overlay, .hand-in-shown .overlay {
.welcome-dialog-shown .overlay, .hand-in-dialog-shown .overlay {
    display: grid;
}

@@ -43,7 +43,7 @@ body.welcome-shown, body.hand-in-shown {
    box-shadow: 4px 4px 4px black;
}

.welcome-shown #welcome-dialog, .hand-in-shown #hand-in-dialog  {
.welcome-dialog-shown #welcome-dialog, .hand-in-dialog-shown #hand-in-dialog  {
    display: block;
}

+6 −6
Original line number Diff line number Diff line
@@ -99,23 +99,23 @@ function initActionLinks() {
                const handInToken = currentTest.getHandInToken(currentState)
                navigator.clipboard.writeText(handInToken)
                document.querySelector("#hand-in-token").textContent = handInToken
                document.body.classList.add("hand-in-shown")
                document.body.classList.add("hand-in-dialog-shown")
            },
            "begin": function () {
                document.body.classList.remove("welcome-shown")
                document.body.classList.remove("welcome-dialog-shown")
                currentTest.markWelcomeAsRead(currentState)
            },
            "continue": function () {
                document.body.classList.remove("welcome-shown")
                document.body.classList.remove("welcome-dialog-shown")
            },
            "complete": function () {
                document.body.classList.remove("hand-in-shown")
                document.body.classList.remove("hand-in-dialog-shown")
                setAutoFocusEnabled(true)
            },
            "welcome-again": function () {
                document.querySelector("#welcome-dialog [data-action='begin']").style.display = "none"
                document.querySelector("#welcome-dialog [data-action='continue']").style.display = "block"
                document.body.classList.add("welcome-shown")
                document.body.classList.add("welcome-dialog-shown")
            },
            "reset": function () {
                const response = prompt("Möchtest du wirklich allen Fortschritt löschen und von vorne beginnen? Achtung: Die Seite verhält sich danach, als würdest du sie zum allerersten Mal besuchen (insbesondere: falls du schon angefangen hast, den Pooltest zu bearbeiten, ist dein Fortschritt komplett weg). Gib 'ZURÜCKSETZEN' (ohne Anführungszeichen) ein, falls du alles zurücksetzen willst. Ansonsten drücke einfach auf Abbrechen :)")
@@ -161,7 +161,7 @@ export async function main() {
        }

        if (!currentTest.wasWelcomeRead(currentState)) {
            document.body.classList.add("welcome-shown")
            document.body.classList.add("welcome-dialog-shown")
        }
    } else {
        // No welcome dialog exists, so we also don't want the user to be able to show it again