Commit 2a4ac3b1 authored by Jakob Moser's avatar Jakob Moser
Browse files

Draft up "don't show again feature"

parent 0208761d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -52,6 +52,10 @@ body.dialog-shown .overlay {
    margin-top: 0;
}

#copy-paste-dialog .actions button, #copy-paste-dialog .actions a.btn {
    margin-top: 10px;
}

.token-container {
    overflow-wrap: anywhere;
    background-color: #001220;
+4 −2
Original line number Diff line number Diff line
/**
 * Show (or hide) a dialog
 * Show (or hide) a dialog.
 * The dialog is not shown if the user has configured the dialog to not be shown again.
 * 
 * @param {string} id The id of the dialog
 * @param {boolean} shown If the dialog should be shown or hidden
 */
@@ -7,7 +9,7 @@ export function setDialogShown(id, shown) {
    const DIALOG_SHOWN = "dialog-shown";
    const dialog = document.querySelector(`#${id}`);

    if (shown) {
    if (shown && !dialog.querySelector(".dont-show-again")?.checked) {
        document.body.classList.add(DIALOG_SHOWN);
        dialog.classList.add(DIALOG_SHOWN);
    } else {
+4 −0
Original line number Diff line number Diff line
@@ -58,6 +58,10 @@
                </p>
            </div>
            <div class="actions">
                <label>
                    <input type="checkbox" class="dont-show-again" />
                    Nicht nochmal anzeigen
                </label>
                <button class="big" data-action="close">Verstanden</button>
            </div>
        </div>