Commit d5260dcc authored by Jakob Moser's avatar Jakob Moser
Browse files

Draft copy/paste popup

See #36
parent 6d02f473
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ import { State } from "./state.mjs"
import * as tests from "./exercises.mjs"
import { createExerciseCard, displayAsSolved, displayAsNonCurrent, displayAsCurrent, displayAsVerifying, displayAsNonVerifying, displayAsUnusuallyLongVerifying } from "./exercises.cards.mjs"
import { Exercise } from "./exercises.api.mjs"
import { isVmLoading, setAutoFocusEnabled } from "./jslinux.api.mjs"
import { isVmLoading, onCopyOrPasteHotkey, setAutoFocusEnabled } from "./jslinux.api.mjs"
import { findParent, waitFor } from "./util.mjs"

const testId = new URLSearchParams(location.search).get("id")
@@ -192,6 +192,9 @@ export async function main() {
    }

    setAutoFocusEnabled(true)
    onCopyOrPasteHotkey(()=>{
        setDialogShown("copy-paste-dialog", true)
    })
    initExerciseList()
    setExerciseActionButtonsEnabled(false)
    initActionLinks()
+11 −0
Original line number Diff line number Diff line
@@ -40,6 +40,17 @@
                <button class="primary big" data-action="complete">Fertig.</button>
            </div>
        </div>
        <div class="dialog" id="copy-paste-dialog">
            <div class="message">
                <h1>Kopieren und Einfügen im Terminal</h1>
                <p>
                    In einem Linux-Terminal kann man leider mit <kbd>Strg</kbd>+<kbd>C</kbd> und <kbd>Strg</kbd>+<kbd>V</kbd> nicht kopieren und einfügen wie sonst überall (das hat historische Gründe).
                </p>
            </div>
            <div class="actions">
                <button class="big" data-action="close">Verstanden</button>
            </div>
        </div>
    </div>

    <div id="term_wrap">