feat: nuxt basics
This commit is contained in:
5
front-nuxt/app/pages/about.vue
Normal file
5
front-nuxt/app/pages/about.vue
Normal file
@@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
About
|
||||
</div>
|
||||
</template>
|
||||
3
front-nuxt/app/pages/index.vue
Normal file
3
front-nuxt/app/pages/index.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>Main page</div>
|
||||
</template>
|
||||
26
front-nuxt/app/pages/login.vue
Normal file
26
front-nuxt/app/pages/login.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: "auth",
|
||||
middleware: "login",
|
||||
});
|
||||
|
||||
const userStore = useUserStore();
|
||||
const setUpUser = () => {
|
||||
userStore.update({
|
||||
id: "1",
|
||||
name: "My name",
|
||||
roles: ["user", "manager"],
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
Login form
|
||||
<div>
|
||||
User profile:
|
||||
{{ userStore.profile }}
|
||||
</div>
|
||||
<button @click="setUpUser">Login</button>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user