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

Add loading message while loading

parent 9ab0fdef
Loading
Loading
Loading
Loading
+3 −3
Changes for portal/static/js/components/pages/Fachschaftssitzung.mjs: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -2,9 +2,9 @@ import { Base } from "./Base.mjs"
import { Agenda } from "../pieces/Agenda.mjs"

const Items = {
    data: [],
    all: null,
    async fetch() {
        this.data = await m.request("/api/v0/agendas/-/items")
        this.all = await m.request("/api/v0/agendas/-/items")
    },
}

@@ -18,7 +18,7 @@ export const Fachschaftssitzung = {
    view() {
        return m(Base, [
            m(Agenda, {
                items: Items.data.map(item => item.name),
                items: Items.all?.map(item => item.name),
            }),
        ])
    },
+2 −2
Changes for portal/static/js/components/pieces/Agenda.mjs: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -4,10 +4,10 @@ export const Agenda = {
            "section.agenda.box",
            m("section.content", [
                m("h2", "Tagesordnung"),
                m(
                vnode.attrs.items ? m(
                    "ol",
                    vnode.attrs.items.map(item => m("li", item)),
                ),
                ) : m("span.message", "Wird geladen..."),
            ]),
            m(
                "a.edit",