2019-06-20 16:04:08 +00:00
|
|
|
<template>
|
|
|
|
<v-navigation-drawer
|
|
|
|
absolute
|
2019-11-22 11:06:33 +00:00
|
|
|
temporary
|
2019-06-20 16:04:08 +00:00
|
|
|
v-model="$store.state.sideMenu"
|
|
|
|
>
|
|
|
|
<v-list>
|
2019-11-22 11:06:33 +00:00
|
|
|
<v-list-item>
|
2019-06-20 16:04:08 +00:00
|
|
|
|
2019-11-22 11:06:33 +00:00
|
|
|
<v-list-item-content>
|
|
|
|
<v-list-item-title>Keks Account</v-list-item-title>
|
|
|
|
</v-list-item-content>
|
|
|
|
</v-list-item>
|
2019-07-17 12:44:05 +00:00
|
|
|
|
2019-11-22 11:06:33 +00:00
|
|
|
<v-divider></v-divider>
|
|
|
|
|
|
|
|
<v-list-item
|
|
|
|
link
|
2019-11-22 12:25:23 +00:00
|
|
|
:to="{path: '/login'}"
|
|
|
|
v-if="!this.$store.state.loggedIn"
|
|
|
|
>
|
|
|
|
<v-list-item-icon>
|
|
|
|
<v-icon>mdi-login</v-icon>
|
|
|
|
</v-list-item-icon>
|
|
|
|
|
|
|
|
<v-list-item-content>
|
|
|
|
<v-list-item-title>Login</v-list-item-title>
|
|
|
|
</v-list-item-content>
|
|
|
|
</v-list-item>
|
|
|
|
|
|
|
|
<v-list-item
|
|
|
|
link
|
|
|
|
:to="{path: '/invited'}"
|
|
|
|
v-if="!this.$store.state.loggedIn && this.$store.getters.getSettingValue('invites')"
|
|
|
|
>
|
|
|
|
<v-list-item-icon>
|
|
|
|
<v-icon>mdi-account-plus</v-icon>
|
|
|
|
</v-list-item-icon>
|
|
|
|
|
|
|
|
<v-list-item-content>
|
|
|
|
<v-list-item-title>Invited</v-list-item-title>
|
|
|
|
</v-list-item-content>
|
|
|
|
</v-list-item>
|
|
|
|
|
|
|
|
<v-list-item
|
|
|
|
link
|
|
|
|
:to="{path: '/register'}"
|
|
|
|
v-if="!this.$store.state.loggedIn && this.$store.getters.getSettingValue('registration_possible')"
|
|
|
|
>
|
|
|
|
<v-list-item-icon>
|
|
|
|
<v-icon>mdi-account-plus</v-icon>
|
|
|
|
</v-list-item-icon>
|
|
|
|
|
|
|
|
<v-list-item-content>
|
|
|
|
<v-list-item-title>Register</v-list-item-title>
|
|
|
|
</v-list-item-content>
|
|
|
|
</v-list-item>
|
|
|
|
|
|
|
|
<v-list-item
|
|
|
|
link
|
|
|
|
v-if="this.$store.state.loggedIn"
|
2019-11-22 11:06:33 +00:00
|
|
|
:to="{path: '/dashboard'}"
|
2019-07-17 12:44:05 +00:00
|
|
|
>
|
2019-11-22 11:06:33 +00:00
|
|
|
<v-list-item-icon>
|
|
|
|
<v-icon>mdi-view-dashboard</v-icon>
|
|
|
|
</v-list-item-icon>
|
2019-07-17 12:44:05 +00:00
|
|
|
|
2019-11-22 11:06:33 +00:00
|
|
|
<v-list-item-content>
|
|
|
|
<v-list-item-title>Dashboard</v-list-item-title>
|
|
|
|
</v-list-item-content>
|
|
|
|
</v-list-item>
|
2019-07-17 12:44:05 +00:00
|
|
|
|
2019-11-22 11:06:33 +00:00
|
|
|
<v-list-item
|
|
|
|
link
|
2019-11-22 12:25:23 +00:00
|
|
|
v-if="this.$store.state.loggedIn && this.$store.getters.getMe.developer"
|
2019-11-22 11:06:33 +00:00
|
|
|
:to="{path: '/apps'}"
|
|
|
|
>
|
|
|
|
<v-list-item-icon>
|
|
|
|
<v-icon>mdi-code-tags</v-icon>
|
|
|
|
</v-list-item-icon>
|
2019-07-17 12:44:05 +00:00
|
|
|
|
2019-11-22 11:06:33 +00:00
|
|
|
<v-list-item-content>
|
|
|
|
<v-list-item-title>Developer</v-list-item-title>
|
|
|
|
</v-list-item-content>
|
|
|
|
</v-list-item>
|
2019-07-17 12:44:05 +00:00
|
|
|
|
2019-06-20 16:04:08 +00:00
|
|
|
<v-list-group
|
2019-11-22 11:06:33 +00:00
|
|
|
no-action
|
2019-11-22 12:25:23 +00:00
|
|
|
v-if="this.$store.state.loggedIn"
|
2019-06-20 16:04:08 +00:00
|
|
|
>
|
|
|
|
<template v-slot:activator>
|
2019-11-22 11:06:33 +00:00
|
|
|
<v-list-item-icon>
|
|
|
|
<v-icon>mdi-account</v-icon>
|
|
|
|
</v-list-item-icon>
|
2019-06-20 16:04:08 +00:00
|
|
|
|
2019-11-22 11:06:33 +00:00
|
|
|
<v-list-item-content>
|
|
|
|
<v-list-item-title>Kekskurse</v-list-item-title>
|
|
|
|
</v-list-item-content>
|
|
|
|
</template>
|
2019-06-20 16:04:08 +00:00
|
|
|
|
2019-11-22 11:06:33 +00:00
|
|
|
<v-list-item
|
|
|
|
link
|
|
|
|
:to="{path: '/profile'}"
|
|
|
|
>
|
|
|
|
<v-list-item-content>
|
|
|
|
<v-list-item-title>Profile</v-list-item-title>
|
|
|
|
</v-list-item-content>
|
|
|
|
</v-list-item>
|
|
|
|
<v-list-item
|
|
|
|
link
|
|
|
|
:to="{path: '/access'}"
|
2019-06-20 16:04:08 +00:00
|
|
|
>
|
2019-11-22 11:06:33 +00:00
|
|
|
<v-list-item-content>
|
|
|
|
<v-list-item-title>App Access</v-list-item-title>
|
|
|
|
</v-list-item-content>
|
|
|
|
</v-list-item>
|
|
|
|
<v-list-item
|
|
|
|
link
|
|
|
|
:to="{path: '/logout'}"
|
|
|
|
>
|
|
|
|
<v-list-item-content>
|
|
|
|
<v-list-item-title>Logout</v-list-item-title>
|
|
|
|
</v-list-item-content>
|
|
|
|
</v-list-item>
|
2019-06-20 16:04:08 +00:00
|
|
|
</v-list-group>
|
2019-11-22 11:06:33 +00:00
|
|
|
|
|
|
|
|
2019-06-20 16:04:08 +00:00
|
|
|
</v-list>
|
|
|
|
</v-navigation-drawer>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'MenuMobile',
|
|
|
|
components: {
|
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
big: true,
|
|
|
|
bgcolor: "transparent",
|
|
|
|
flat: true,
|
|
|
|
nameBig: '',
|
|
|
|
nameSmall: '',
|
|
|
|
sideMenu: this.$store.state.sideMenu,
|
|
|
|
menu: [
|
|
|
|
{ icon: 'home', title: 'Login' , link: "Login" },
|
|
|
|
{ icon: 'info', title: 'Invited' },
|
|
|
|
{ icon: 'warning', title: 'Register' }
|
|
|
|
],
|
|
|
|
menu2: [
|
|
|
|
{ icon: 'home', title: 'Apps' },
|
|
|
|
{ icon: 'info', title: 'Admin' },
|
|
|
|
{ icon: 'warning', title: 'Account' }
|
|
|
|
],
|
|
|
|
menu3: []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
setting: (name) => {
|
|
|
|
//this.$store.getters.getSettingValue(this.$store.state, name);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
generateMenu: function () {
|
|
|
|
this.menu = [];
|
|
|
|
if(!this.$store.state.loggedIn) {
|
|
|
|
this.menu.push({ icon: 'home', title: 'Login' , link: "Login" });
|
|
|
|
if(this.$store.getters.getSettingValue("invites")) {
|
|
|
|
this.menu.push({ icon: 'home', title: 'Invited' , link: "Invited" });
|
|
|
|
}
|
|
|
|
if(this.$store.getters.getSettingValue("registration_possible")) {
|
|
|
|
this.menu.push({ icon: 'home', title: 'Register' , link: "Register" });
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if(this.$store.getters.getMe.developer) {
|
|
|
|
this.menu.push({ icon: 'home', title: 'Apps' , link: "Apps" });
|
|
|
|
}
|
|
|
|
if(this.$store.getters.getMe.admin) {
|
|
|
|
this.menu.push({ icon: 'home', title: 'Admin' , link: "Admin" });
|
|
|
|
}
|
|
|
|
this.menu.push({ icon: 'home', title: 'Profile' , link: "profile", submenu: true, menu: [
|
|
|
|
{ icon: 'home', title: 'Logout' , link: "Logout" }
|
|
|
|
] });
|
|
|
|
}
|
|
|
|
},
|
|
|
|
handleScroll: function (evt, el) {
|
|
|
|
if(evt.pageY > 100) {
|
|
|
|
this.big = false;
|
|
|
|
this.bgcolor = "#fff";
|
|
|
|
this.flat = false;
|
|
|
|
} else {
|
|
|
|
this.big = true;
|
|
|
|
this.bgcolor = "transparent";
|
|
|
|
this.flat = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted: function () {
|
|
|
|
this.nameBig = this.$store.getters.getSettingValue("name_big");
|
|
|
|
this.nameSmall = this.$store.getters.getSettingValue("name_small");
|
|
|
|
this.generateMenu();
|
|
|
|
}
|
|
|
|
}
|
2019-11-22 11:06:33 +00:00
|
|
|
</script>
|