import { defineStore } from "pinia"; import { http } from "../serverCom"; export const useConfigurationStore = defineStore("configuration", { state: () => { return { clubName: "", clubImprint: "", clubPrivacy: "", clubWebsite: "", appCustom_login_message: "", appShow_link_to_calendar: "", }; }, actions: { configure() { http .get("/public/configuration") .then((res) => { this.clubName = res.data["club.name"]; this.clubImprint = res.data["club.imprint"]; this.clubPrivacy = res.data["club.privacy"]; this.clubWebsite = res.data["club.website"]; this.appCustom_login_message = res.data["app.custom_login_message"]; this.appShow_link_to_calendar = res.data["app.show_link_to_calendar"]; }) .catch(() => {}); }, }, });