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 15 additions and 1 deletions
Showing only changes of commit 306ae7648d - Show all commits

View File

@ -7,6 +7,10 @@ export default boot<Store<StateInterface>>(({ router, store }) => {
router.beforeEach((to, from, next) => {
const session = store.state.session.currentSession;
if (to.path == from.path) {
return;
}
if (to.path.startsWith('/main')) {
// Secured area (LOGIN REQUIRED)
// Check login is ok

View File

@ -60,7 +60,7 @@ export default defineComponent({
})
.then(() => {
const x = root.$route.query['redirect'];
void root.$router.replace(
void root.$router.push(
typeof x === 'string' ? { path: x } : mainRoute
);
})

View File

@ -5,6 +5,7 @@ import { axios } from 'src/boot/axios';
import { AxiosError, AxiosResponse } from 'axios';
import { Router } from 'src/router';
import { LocalStorage } from 'quasar';
import { Notify } from 'quasar';
export interface SessionInterface {
currentSession?: FG.Session;
@ -66,6 +67,15 @@ const actions: ActionTree<SessionInterface, StateInterface> = {
commit('user/setCurrentPermissions', response.data.permissions, {
root: true
});
})
.catch(() => {
Notify.create({
type: 'negative',
message: 'Benutzername oder Passwort sind falsch.',
timeout: 10000,
progress: true,
actions: [{ icon: 'mdi-close', color: 'white' }]
});
});
},
/**