Display message on admin routes if non-admin tries to view
This commit is contained in:
parent
66f98fd194
commit
80a52bdcec
2 changed files with 30 additions and 17 deletions
|
@ -170,7 +170,8 @@
|
||||||
"loading": "Loading",
|
"loading": "Loading",
|
||||||
"noItemsConnection": "Please check your internet connection, or try again later.",
|
"noItemsConnection": "Please check your internet connection, or try again later.",
|
||||||
"noItemsStart": "There are no",
|
"noItemsStart": "There are no",
|
||||||
"noItemsEnd": "to display."
|
"noItemsEnd": "to display.",
|
||||||
|
"adminOnly": "Only users with admin are allowed to navigate to this route."
|
||||||
},
|
},
|
||||||
"relationships": {
|
"relationships": {
|
||||||
"pending": "Cancel Friend Request",
|
"pending": "Cancel Friend Request",
|
||||||
|
|
|
@ -1,20 +1,32 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="columns is-centered">
|
<main class="section">
|
||||||
<div class="column is-2">
|
<div class="columns is-centered" v-if="$store.state.user.admin">
|
||||||
<b-menu class="box">
|
<div class="column is-2">
|
||||||
<b-menu-list :label="$t('admin.title')">
|
<b-menu class="box">
|
||||||
<b-menu-item @click="$router.push('/admin/dashboard')" :label="$t('admin.dashboard')"></b-menu-item>
|
<b-menu-list :label="$t('admin.title')">
|
||||||
<b-menu-item @click="$router.push('/admin/item')" :label="$t('admin.uploadItem')"></b-menu-item>
|
<b-menu-item @click="$router.push('/admin/dashboard')" :label="$t('admin.dashboard')"></b-menu-item>
|
||||||
</b-menu-list>
|
<b-menu-item @click="$router.push('/admin/item')" :label="$t('admin.uploadItem')"></b-menu-item>
|
||||||
<b-menu-list :label="$t('admin.executive.title')">
|
</b-menu-list>
|
||||||
<b-menu-item :label="$t('admin.executive.soon')"></b-menu-item>
|
<b-menu-list :label="$t('admin.executive.title')">
|
||||||
</b-menu-list>
|
<b-menu-item :label="$t('admin.executive.soon')"></b-menu-item>
|
||||||
</b-menu>
|
</b-menu-list>
|
||||||
</div>
|
</b-menu>
|
||||||
<div class="column is-9">
|
</div>
|
||||||
<div class="box">
|
<div class="column is-9">
|
||||||
<router-view></router-view>
|
<div class="box">
|
||||||
|
<router-view></router-view>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="column" v-if="!$store.state.user.admin">
|
||||||
|
<div class="box">
|
||||||
|
<div class="is-vcentered has-text-centered columns">
|
||||||
|
<div class="column is-vcentered">
|
||||||
|
<i class="far fa-times-square large-icon"></i>
|
||||||
|
<h1 class="subtitle">{{$t('generic.adminOnly')}}</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
</template>
|
</template>
|
Loading…
Reference in a new issue