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 48 additions and 40 deletions
Showing only changes of commit 1ce02a67a9 - Show all commits

View File

@ -8,13 +8,6 @@ export default boot<Store<StateInterface>>(({ router, store }) => {
const session = store.state.session.currentSession; const session = store.state.session.currentSession;
if (to.name != 'login') { if (to.name != 'login') {
if (!session || session.expires <= new Date()) {
store.dispatch('session/logout').catch(error => {
console.warn(error);
});
return;
}
if ( if (
to.matched.every((record: RouteRecord) => { to.matched.every((record: RouteRecord) => {
if (!('meta' in record) || !('permissions' in record.meta)) if (!('meta' in record) || !('permissions' in record.meta))
@ -30,6 +23,20 @@ export default boot<Store<StateInterface>>(({ router, store }) => {
} }
}) })
) { ) {
if (
!to.matched.every((record: RouteRecord) => {
if (!('meta' in record) || !('permissions' in record.meta))
return true;
else return false;
})
) {
if (!session || session.expires <= new Date()) {
store.dispatch('session/logout').catch(error => {
console.warn(error);
});
return;
}
}
next(); next();
} else { } else {
next({ name: 'login', query: { redirect: to.fullPath } }); next({ name: 'login', query: { redirect: to.fullPath } });

View File

@ -5,11 +5,11 @@
v-if="$route.name == 'about' || $route.name == 'about_out'" v-if="$route.name == 'about' || $route.name == 'about_out'"
> >
<div class="fit row justify-center content-center items-center"> <div class="fit row justify-center content-center items-center">
<q-img <q-img
:src="$q.dark.isActive? 'logo.svg' : 'logo-dark.svg'" :src="$q.dark.isActive? 'logo.svg' : 'logo-dark.svg'"
class="col-12 q-ma-md" class="col-12 q-ma-md"
style="min-width: 200px; max-width: 400px" style="min-width: 200px; max-width: 400px"
/> />
<div class="col-12 text-h4 text-center q-pa-sm"> <div class="col-12 text-h4 text-center q-pa-sm">
Flaschengeist Flaschengeist
<div class="text-caption"> <div class="text-caption">
@ -17,16 +17,16 @@
</div> </div>
</div> </div>
<div class="col-12 text-center q-ma-sm" style="max-width: 600px;"> <div class="col-12 text-center q-ma-sm" style="max-width: 600px;">
Flaschengeist ist ein dynamischen Managementsystem für Studentenclubs. Flaschengeist ist ein dynamischen Managementsystem für Studentenclubs.
Es ermöglicht unter anderem die Mitgliederverwaltung, Dienstverwaltung, Es ermöglicht unter anderem die Mitgliederverwaltung, Dienstverwaltung,
Arbeitsgruppenverwaltung und vieles meher. Es kann fast alles ermöglich Arbeitsgruppenverwaltung und vieles meher. Es kann fast alles ermöglich
werden, wenn ein Plugin dafür geschrieben wird. Jeder Club hat die werden, wenn ein Plugin dafür geschrieben wird. Jeder Club hat die
Möglichkeit sein eigenes Flaschengeist zu hosten. Ziel ist später Möglichkeit sein eigenes Flaschengeist zu hosten. Ziel ist später
Clubübergreifend dezentralisiert miteinander zu arbeiten. Clubübergreifend dezentralisiert miteinander zu arbeiten.
</div> </div>
<q-separator /> <q-separator/>
<div class="col-12 text-h6 q-pa-sm" v-if="$route.name == 'about'"> <div class="col-12 text-h6 q-pa-sm" v-if="$route.name == 'about'">
Geladene Plugins: Geladene Plugins:
</div> </div>
@ -44,32 +44,32 @@
</q-chip> </q-chip>
</q-chip> </q-chip>
</div> </div>
<q-separator /> <q-separator/>
<div class="col-12 text-h6 q-pa-sm"> <div class="col-12 text-h6 q-pa-sm">
Entwickler: Entwickler:
</div> </div>
<div <div
class="fit row inline wrap justify-around items-start content-start" class="fit row inline wrap justify-around items-start content-start"
> >
<developer <developer
v-for="(developer, index) in developers" v-for="(developer, index) in developers"
:key="'dev' + index" :key="'dev' + index"
class="col-xs-12 col-md-5 col-lg-3 q-ma-sm" class="col-xs-12 col-md-5 col-lg-3 q-ma-sm"
:firstname="developer.firstname" :firstname="developer.firstname"
:lastname="developer.lastname" :lastname="developer.lastname"
:job="developer.job" :job="developer.job"
:club="developer.club" :club="developer.club"
:description="developer.description" :description="developer.description"
:pic="developer.pic" :pic="developer.pic"
/> />
</div> </div>
</div> </div>
</q-page> </q-page>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from '@vue/composition-api'; import {defineComponent} from '@vue/composition-api';
import Developer from 'components/about/Developer.vue'; import Developer from 'components/about/Developer.vue';
const developers = [ const developers = [
@ -105,9 +105,9 @@ const developers = [
]; ];
export default defineComponent({ export default defineComponent({
// name: 'PageName' // name: 'PageName'
components: { Developer }, components: {Developer},
setup() { setup() {
return { developers }; return {developers};
} }
}); });
</script> </script>

View File

@ -22,17 +22,18 @@ const routes: RouteConfig[] = [
path: '/main', path: '/main',
redirect: 'dashboard', redirect: 'dashboard',
component: () => import('layouts/MainLayout.vue'), component: () => import('layouts/MainLayout.vue'),
meta: { permissions: ['user']},
children: [ children: [
{ {
name: 'dashboard', name: 'dashboard',
path: 'dashboard', path: 'dashboard',
meta: { permission: 'user' }, meta: { permissions: ['user'] },
component: () => import('pages/Dashboard.vue') component: () => import('pages/Dashboard.vue')
}, },
{ {
name: 'about', name: 'about',
path: 'about', path: 'about',
meta: { permission: 'user' }, meta: { permissions: ['user'] },
component: () => import('pages/about/About.vue') component: () => import('pages/about/About.vue')
} }
] ]