mirror of
https://github.com/creativetimofficial/vue-material-kit.git
synced 2025-06-13 10:54:21 +08:00
Выход есть!
This commit is contained in:
parent
6f725217e2
commit
49ddd38134
src
BIN
src/assets/img/ufo.jpg
Normal file
BIN
src/assets/img/ufo.jpg
Normal file
Binary file not shown.
After ![]() (image error) Size: 3.0 MiB |
@ -25,6 +25,7 @@ import ElToggles from "../layouts/sections/elements/toggles/TogglesView.vue";
|
||||
import ElTypography from "../layouts/sections/elements/typography/TypographyView.vue";
|
||||
import Project from "../views/LandingPages/Project/Project.vue";
|
||||
import Profile from "../views/LandingPages/Profile/Profile.vue";
|
||||
import TopSecretProject from "../views/LandingPages/Project/TopSecretProject.vue";
|
||||
|
||||
|
||||
const router = createRouter({
|
||||
@ -42,6 +43,12 @@ const router = createRouter({
|
||||
component: Project
|
||||
},
|
||||
|
||||
{
|
||||
path: '/TopSecret',
|
||||
name: 'topsecretproject',
|
||||
component: TopSecretProject
|
||||
},
|
||||
|
||||
{
|
||||
path: '/profile/:id',
|
||||
name: 'profile',
|
||||
|
30
src/views/LandingPages/Project/TopSecretProject.vue
Normal file
30
src/views/LandingPages/Project/TopSecretProject.vue
Normal file
@ -0,0 +1,30 @@
|
||||
<!-- Шаблон для страницы, содержимое которой видно только зарегистрированным пользователям -->
|
||||
|
||||
<script setup>
|
||||
|
||||
import { computed } from "vue";
|
||||
|
||||
// example components
|
||||
import DefaultNavbar from "@/examples/navbars/NavbarDefault.vue";
|
||||
import Header from "@/examples/Header.vue";
|
||||
|
||||
|
||||
const isAuthenticated = computed(() => !!sessionStorage.getItem('access_token')); // Computed property to check if the user is authenticated
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<template>
|
||||
<DefaultNavbar />
|
||||
|
||||
<Header>
|
||||
<div v-if="isAuthenticated">
|
||||
<p>Наш главный секрет</p>
|
||||
</div>
|
||||
<div v-else>
|
||||
<p>здесь ничего нет</p>
|
||||
</div>
|
||||
</Header>
|
||||
</template>
|
@ -118,6 +118,7 @@ export default {
|
||||
<div v-if="isAuthenticated">
|
||||
<!-- This will only be displayed if the user is authenticated -->
|
||||
<p>Опять Ты!</p>
|
||||
<button @click="logout">Выход</button>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
@ -146,7 +147,7 @@ export default {
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<button @click="logout">Logout</button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user