release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
3 changed files with 58 additions and 0 deletions
Showing only changes of commit 1ad39f386e - Show all commits

View File

@ -11,3 +11,5 @@ export default boot(({ Vue }) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
Vue.prototype.$axios = axios; Vue.prototype.$axios = axios;
}); });
export { axios };

View File

@ -0,0 +1,4 @@
export interface LoginData {
userid: string;
password: string;
}

View File

@ -0,0 +1,52 @@
import { Module, MutationTree, ActionTree, Commit } from 'vuex';
import { StateInterface } from 'src/store';
import { axios } from 'boot/axios';
import { LoginData } from 'src/plugins/user/models'
export interface Token {
browser: string;
expires: string;
lifetime: number;
platform: string;
token: string;
}
export interface User {
display_name: string | null;
firstname: string;
lastname: string;
mail: string;
roles: string[];
}
export interface UserStateInterface {
permissions: string[];
token: Token;
user: User;
userid: string;
}
const state: UserStateInterface = {
permissions: [],
token: { browser: '', expires: '', lifetime: -1, platform: '', token: '' },
user: {
display_name: '',
firstname: '',
lastname: '',
mail: '',
roles: []
},
userid: ''
};
const mutation: MutationTree<UserStateInterface> = {
setState(state: UserStateInterface, data: UserStateInterface) {
state = data;
}
};
const actions: ActionTree<UserStateInterface, StateInterface> = {
async = login({ commit: Commit }, data: LoginData) {
axios
}
};