Verified Commit d1b57d5d authored by Jakob Moser's avatar Jakob Moser
Browse files

Add link to log in to GitLab, reload after person returns to tab

parent 0fb3e1f3
Loading
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -87,6 +87,27 @@ export const Fachschaftssitzung = {
                            name: "Beschlüsse als PDF herunterladen",
                        }),
                    ),
                !latestProtocol.meta &&
                    m(
                        "p",
                        m(ButtonAndTextLink, {
                            href: "https://gitlab.cl.uni-heidelberg.de/fachschaft/protokolle",
                            icon: "fa-brands fa-gitlab",
                            name: "Bei GitLab anmelden, um Protokolle herunterzuladen",
                            onclick: () => {
                                setTimeout(() => {
                                    document.addEventListener(
                                        "visibilitychange",
                                        () => {
                                            if (!document.hidden) {
                                                location.reload()
                                            }
                                        },
                                    )
                                }, 1000)
                            },
                        }),
                    ),
            ]),
        ])
    },
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ export const ButtonAndTextLink = {
            {
                href: vnode.attrs.href,
                target: vnode.attrs.sameTab ? "" : "_blank",
                onclick: vnode.attrs.onclick,
            },
            [
                m(