release v2.0.0 #4
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 24 KiB |
249
public/logo.svg
249
public/logo.svg
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 64 KiB |
|
@ -1,23 +1,44 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<q-page
|
<q-tabs v-model="tab" v-if="$q.screen.gt.sm">
|
||||||
padding
|
<q-tab v-for="(tabindex, index) in tabs" :key="'tab'+index" :name="tabindex.name" :label="tabindex.label"/>
|
||||||
class="fit row justify-center content-center items-center q-gutter-sm"
|
</q-tabs>
|
||||||
>
|
<div class="fit row justify-end" v-else>
|
||||||
<q-card class="col-12">
|
<q-btn flat round icon="mdi-menu" @click="showDrawer = !showDrawer"/>
|
||||||
<q-card-section
|
</div>
|
||||||
class="fit row justify-start content-center items-center"
|
<q-drawer side="right" v-model="showDrawer" @click="showDrawer = !showDrawer" behavior="mobile">
|
||||||
>
|
<q-list v-model="tab">
|
||||||
<div class="col-xs-12 col-sm-6 text-center text-h6">
|
<q-item v-for="(tabindex, index) in tabs" :key="'tab'+index" :active="tab == tabindex.name" clickable
|
||||||
Benutzereinstellungen
|
@click="tab = tabindex.name">
|
||||||
</div>
|
<q-item-label>{{ tabindex.label }}</q-item-label>
|
||||||
<div class="col-xs-12 col-sm-6 q-pa-sm">
|
</q-item>
|
||||||
<UserSelector :user="user" @update:user="userUpdated" />
|
</q-list>
|
||||||
</div>
|
</q-drawer>
|
||||||
</q-card-section>
|
<q-page padding
|
||||||
<MainUserSettings :user="user" />
|
class="fit row justify-center content-start items-start q-gutter-sm">
|
||||||
</q-card>
|
<q-tab-panels v-model="tab" style="background-color: transparent;" class="q-ma-none q-pa-none" animated>
|
||||||
<RoleSettings v-if="canEditRoles" />
|
<q-tab-panel name="user">
|
||||||
|
<q-card class="col-12">
|
||||||
|
<q-card-section
|
||||||
|
class="fit row justify-start content-center items-center"
|
||||||
|
>
|
||||||
|
<div class="col-xs-12 col-sm-6 text-center text-h6">
|
||||||
|
Benutzereinstellungen
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-6 q-pa-sm">
|
||||||
|
<UserSelector :user="user" @update:user="userUpdated"/>
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
<MainUserSettings :user="user"/>
|
||||||
|
</q-card>
|
||||||
|
</q-tab-panel>
|
||||||
|
<q-tab-panel name="newUser">
|
||||||
|
<h1>hier kommt noch was</h1>
|
||||||
|
</q-tab-panel>
|
||||||
|
<q-tab-panel name="roles">
|
||||||
|
<RoleSettings v-if="canEditRoles"/>
|
||||||
|
</q-tab-panel>
|
||||||
|
</q-tab-panels>
|
||||||
</q-page>
|
</q-page>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -32,15 +53,16 @@ import {
|
||||||
import UserSelector from '../components/UserSelector.vue';
|
import UserSelector from '../components/UserSelector.vue';
|
||||||
import MainUserSettings from '../components/settings/MainUserSettings.vue';
|
import MainUserSettings from '../components/settings/MainUserSettings.vue';
|
||||||
import RoleSettings from '../components/settings/RoleSettings.vue';
|
import RoleSettings from '../components/settings/RoleSettings.vue';
|
||||||
import { Store } from 'vuex';
|
import {Store} from 'vuex';
|
||||||
import { StateInterface } from 'src/store';
|
import {StateInterface} from 'src/store';
|
||||||
import { hasPermission } from 'src/components/permission';
|
import {hasPermission} from 'src/components/permission';
|
||||||
import { PERMISSIONS } from '../permissions';
|
import {PERMISSIONS} from '../permissions';
|
||||||
|
import {Screen} from 'quasar';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'AdminSettings',
|
name: 'AdminSettings',
|
||||||
components: { UserSelector, MainUserSettings, RoleSettings },
|
components: {UserSelector, MainUserSettings, RoleSettings},
|
||||||
setup(_, { root }) {
|
setup(_, {root}) {
|
||||||
const store = <Store<StateInterface>>root.$store;
|
const store = <Store<StateInterface>>root.$store;
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
|
@ -58,10 +80,37 @@ export default defineComponent({
|
||||||
console.log(value);
|
console.log(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
interface Tab {
|
||||||
|
name: string;
|
||||||
|
label: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const tabs: Tab[] = [
|
||||||
|
{name: 'user', label: 'Mitglieder'},
|
||||||
|
{name: 'newUser', label: 'Neues Mitglied'},
|
||||||
|
{name: 'roles', label: 'Rollen'}
|
||||||
|
]
|
||||||
|
|
||||||
|
const drawer = ref<boolean>(false)
|
||||||
|
|
||||||
|
const showDrawer = computed({
|
||||||
|
get: () => {
|
||||||
|
return !Screen.gt.sm && drawer.value
|
||||||
|
},
|
||||||
|
set: (val: boolean) => {
|
||||||
|
drawer.value = val
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const tab = ref<string>('user');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
user,
|
user,
|
||||||
userUpdated,
|
userUpdated,
|
||||||
canEditRoles
|
canEditRoles,
|
||||||
|
showDrawer,
|
||||||
|
tab,
|
||||||
|
tabs
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue