mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-04 02:39:14 +02:00
added frontend and updated backend with docker, wrote some initial instructions
This commit is contained in:
18
frontend/src/store/moduleStore.ts
Normal file
18
frontend/src/store/moduleStore.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Module } from "../model/module.ts";
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
const moduleStore = defineStore("moduleStore", {
|
||||
state: () => ({
|
||||
modules: [] as Module[],
|
||||
}),
|
||||
actions: {
|
||||
addModule(module: Module) {
|
||||
this.modules.push(module);
|
||||
},
|
||||
removeModule(module: Module) {
|
||||
this.modules.splice(this.modules.indexOf(module), 1);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default moduleStore;
|
17
frontend/src/store/tokenStore.ts
Normal file
17
frontend/src/store/tokenStore.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
const tokenStore = defineStore("tokenStore", {
|
||||
state: () => ({
|
||||
token: "",
|
||||
}),
|
||||
actions: {
|
||||
setToken(token: string) {
|
||||
this.token = token;
|
||||
},
|
||||
removeToken() {
|
||||
this.token = "";
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default tokenStore;
|
Reference in New Issue
Block a user