generated from VLADIMIR/template_frontend
add pages
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<HeaderMenu :add-logout="true"/>
|
||||||
|
|
||||||
|
Игры
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@@ -66,16 +66,16 @@ const goToLogout = () => {
|
|||||||
<template>
|
<template>
|
||||||
<div class="menu-block">
|
<div class="menu-block">
|
||||||
<div class="left-group">
|
<div class="left-group">
|
||||||
<div class="menu-item-block">
|
<div class="menu-item-block" v-if="authStore.hasRole('user')" @click="router.push('/office')">
|
||||||
Кабинет
|
Кабинет
|
||||||
</div>
|
</div>
|
||||||
<div class="menu-item-block" v-if="hasPermission('games_page')">
|
<div class="menu-item-block" v-if="hasPermission('games_page')" @click="router.push('/games')">
|
||||||
Игры
|
Игры
|
||||||
</div>
|
</div>
|
||||||
<div class="menu-item-block" v-if="hasPermission('scenarios_page')">
|
<div class="menu-item-block" v-if="hasPermission('scenarios_page')" @click="router.push('/scenarios')">
|
||||||
Мои сценарии
|
Мои сценарии
|
||||||
</div>
|
</div>
|
||||||
<div class="menu-item-block" v-if="hasPermission('users_page')">
|
<div class="menu-item-block" v-if="hasPermission('users_page')" @click="router.push('/users')">
|
||||||
Пользователи
|
Пользователи
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ getPermissions()
|
|||||||
<p>
|
<p>
|
||||||
Доброго времени суток, {{ authStore.username }}.
|
Доброго времени суток, {{ authStore.username }}.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<!-- <p>
|
||||||
{{ authStore.userRoles }}
|
{{ authStore.userRoles }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{{ permissions }}
|
{{ permissions }} -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<HeaderMenu :add-logout="true"/>
|
||||||
|
|
||||||
|
Сценарии
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<HeaderMenu :add-logout="true"/>
|
||||||
|
|
||||||
|
Пользователи
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@@ -4,6 +4,9 @@ import LoginView from '../views/LoginView.vue'
|
|||||||
import OfficeView from '../views/OfficeView.vue'
|
import OfficeView from '../views/OfficeView.vue'
|
||||||
import UserAgreementView from '../views/UserAgreementView.vue'
|
import UserAgreementView from '../views/UserAgreementView.vue'
|
||||||
import PrivacyPolicyView from '../views/PrivacyPolicyView.vue'
|
import PrivacyPolicyView from '../views/PrivacyPolicyView.vue'
|
||||||
|
import GamesView from '../views/GamesView.vue'
|
||||||
|
import ScenariosView from '../views/ScenariosView.vue'
|
||||||
|
import UsersView from '../views/UsersView.vue'
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(import.meta.env.BASE_URL),
|
history: createWebHistory(import.meta.env.BASE_URL),
|
||||||
@@ -33,6 +36,21 @@ const router = createRouter({
|
|||||||
name: 'privacy-policy',
|
name: 'privacy-policy',
|
||||||
component: PrivacyPolicyView,
|
component: PrivacyPolicyView,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/games',
|
||||||
|
name: 'games',
|
||||||
|
component: GamesView,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/scenarios',
|
||||||
|
name: 'scenarios',
|
||||||
|
component: ScenariosView,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/users',
|
||||||
|
name: 'users',
|
||||||
|
component: UsersView,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import GamesPage from '@/components/GamesPage.vue';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<main>
|
||||||
|
<GamesPage />
|
||||||
|
</main>
|
||||||
|
</template>
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
import LoginPage from '@/components/LoginPage.vue';
|
import LoginPage from '@/components/LoginPage.vue';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Страница авторизации -->
|
|
||||||
<template>
|
<template>
|
||||||
<main>
|
<main>
|
||||||
<LoginPage />
|
<LoginPage />
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
import OfficePage from '@/components/OfficePage.vue';
|
import OfficePage from '@/components/OfficePage.vue';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Страница авторизации -->
|
|
||||||
<template>
|
<template>
|
||||||
<main>
|
<main>
|
||||||
<OfficePage />
|
<OfficePage />
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import ScenariosPage from '@/components/ScenariosPage.vue';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<main>
|
||||||
|
<ScenariosPage />
|
||||||
|
</main>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import UsersPage from '@/components/UsersPage.vue';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<main>
|
||||||
|
<UsersPage />
|
||||||
|
</main>
|
||||||
|
</template>
|
||||||
Reference in New Issue
Block a user