Compare commits
No commits in common. "7a7c44c0bfb110bcf98198e6979d41fbdac010e1" and "69b4134ab91b443a96667f371869ca459ac0aa5c" have entirely different histories.
7a7c44c0bf
...
69b4134ab9
6 changed files with 2 additions and 198 deletions
|
@ -15,13 +15,11 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@primeuix/themes": "^1.0.1",
|
||||
"@primevue/forms": "^4.3.3",
|
||||
"lucide-vue-next": "^0.487.0",
|
||||
"pinia": "^3.0.1",
|
||||
"primevue": "^4.3.3",
|
||||
"vue": "^3.5.13",
|
||||
"vue-router": "^4.5.0",
|
||||
"zod": "^3.24.2"
|
||||
"vue-router": "^4.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/node22": "^22.0.0",
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
<template>
|
||||
<div class="card">
|
||||
<Menubar :model="items">
|
||||
<template #item="{ item, props, hasSubmenu }">
|
||||
<router-link v-if="item.route" v-slot="{ href, navigate }" :to="item.route" custom>
|
||||
<a v-ripple :href="href" v-bind="props.action" @click="navigate">
|
||||
<span :class="item.icon" />
|
||||
<span>{{ item.label }}</span>
|
||||
</a>
|
||||
</router-link>
|
||||
<a v-else v-ripple :href="item.url" :target="item.target" v-bind="props.action">
|
||||
<span :class="item.icon" />
|
||||
<span> n/A {{ item.label }}</span>
|
||||
<span v-if="hasSubmenu" class="pi pi-fw pi-angle-down" />
|
||||
</a>
|
||||
</template>
|
||||
</Menubar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Menubar from 'primevue/menubar';
|
||||
|
||||
import { ref } from "vue";
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const items = ref([
|
||||
{
|
||||
label: 'Home',
|
||||
icon: 'pi pi-home',
|
||||
route: '/'
|
||||
},
|
||||
{
|
||||
label: 'Student',
|
||||
icon: 'pi pi-graduation-cap',
|
||||
route: '/Student'
|
||||
},
|
||||
{
|
||||
label: 'Login',
|
||||
icon: 'pi pi-graduation-cap',
|
||||
route: '/Login'
|
||||
},
|
||||
{
|
||||
label: 'Projects',
|
||||
icon: 'pi pi-search',
|
||||
items: [
|
||||
{
|
||||
label: 'Components',
|
||||
icon: 'pi pi-bolt'
|
||||
},
|
||||
{
|
||||
label: 'Blocks',
|
||||
icon: 'pi pi-server'
|
||||
},
|
||||
{
|
||||
label: 'UI Kit',
|
||||
icon: 'pi pi-pencil'
|
||||
},
|
||||
{
|
||||
label: 'Templates',
|
||||
icon: 'pi pi-palette',
|
||||
items: [
|
||||
{
|
||||
label: 'Apollo',
|
||||
icon: 'pi pi-palette'
|
||||
},
|
||||
{
|
||||
label: 'Ultima',
|
||||
icon: 'pi pi-palette'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Contact',
|
||||
icon: 'pi pi-envelope'
|
||||
}
|
||||
]);
|
||||
</script>
|
|
@ -5,7 +5,7 @@ import { createPinia } from 'pinia'
|
|||
import PrimeVue from 'primevue/config'
|
||||
import Aura from '@primeuix/themes/aura'
|
||||
import Ripple from 'primevue/ripple'
|
||||
import ToastService from 'primevue/toastservice';
|
||||
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
|
||||
|
@ -18,8 +18,6 @@ app.use(PrimeVue, {
|
|||
},
|
||||
})
|
||||
app.use(pinia)
|
||||
app.use(ToastService);
|
||||
app.use(createPinia())
|
||||
app.use(router)
|
||||
app.directive('ripple', Ripple)
|
||||
|
||||
|
|
|
@ -23,13 +23,6 @@ const router = createRouter({
|
|||
|
||||
component: () => import('../views/StudentView.vue'),
|
||||
},
|
||||
{
|
||||
path: '/Login',
|
||||
name: 'Login',
|
||||
|
||||
component: () => import('../views/LoginView.vue'),
|
||||
},
|
||||
|
||||
],
|
||||
})
|
||||
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
<template>
|
||||
<div class="Login">
|
||||
<h1>This is the Login Page</h1>
|
||||
</div>
|
||||
<div class="card flex justify-center">
|
||||
<Form :resolver @submit="onFormSubmit" class="flex flex-col gap-4 w-full sm:w-56">
|
||||
<FormField v-slot="$field" as="section" name="username" initialValue="" class="flex flex-col gap-2">
|
||||
<InputText type="text" placeholder="Username" />
|
||||
<Message v-if="$field?.invalid" severity="error" size="small" variant="simple">{{ $field.error?.message }}</Message>
|
||||
</FormField>
|
||||
<FormField v-slot="$field" asChild name="password" initialValue="">
|
||||
<section class="flex flex-col gap-2">
|
||||
<Password type="text" placeholder="Password" :feedback="false" toggleMask fluid />
|
||||
<Message v-if="$field?.invalid" severity="error" size="small" variant="simple">{{ $field.error?.message }}</Message>
|
||||
</section>
|
||||
</FormField>
|
||||
<Button type="submit" severity="secondary" label="Submit" />
|
||||
|
||||
</Form>
|
||||
<div class="flex items-center gap-2">
|
||||
<Checkbox v-model="remember" inputId="rememberme" binary/>
|
||||
<label for="rememberme"> Rememberme </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import InputText from 'primevue/inputtext';
|
||||
import Button from 'primevue/button';
|
||||
import Message from 'primevue/message';
|
||||
import Password from 'primevue/password';
|
||||
import Checkbox from 'primevue/checkbox';
|
||||
|
||||
import { FormField } from '@primevue/forms';
|
||||
import { Form } from '@primevue/forms';
|
||||
import { zodResolver } from '@primevue/forms/resolvers/zod';
|
||||
import { z } from 'zod';
|
||||
import { useToast } from 'primevue/usetoast';
|
||||
import { ref } from "vue";
|
||||
|
||||
const remember = ref(false);
|
||||
|
||||
const toast = useToast();
|
||||
|
||||
const resolver = zodResolver(
|
||||
z.object({
|
||||
username: z.string().min(1, { message: 'Username is required.' }),
|
||||
password: z.string().min(1, { message: 'Password is required.' })
|
||||
})
|
||||
);
|
||||
|
||||
const onFormSubmit = ({ valid }) => {
|
||||
if (valid) {
|
||||
toast.add({ severity: 'success', summary: 'Form is submitted.', life: 3000 });
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@media (min-width: 1024px) {
|
||||
.about {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
37
pnpm-lock.yaml
generated
37
pnpm-lock.yaml
generated
|
@ -13,9 +13,6 @@ importers:
|
|||
'@primeuix/themes':
|
||||
specifier: ^1.0.1
|
||||
version: 1.0.1
|
||||
'@primevue/forms':
|
||||
specifier: ^4.3.3
|
||||
version: 4.3.3(vue@3.5.13(typescript@5.8.2))
|
||||
lucide-vue-next:
|
||||
specifier: ^0.487.0
|
||||
version: 0.487.0(vue@3.5.13(typescript@5.8.2))
|
||||
|
@ -31,9 +28,6 @@ importers:
|
|||
vue-router:
|
||||
specifier: ^4.5.0
|
||||
version: 4.5.0(vue@3.5.13(typescript@5.8.2))
|
||||
zod:
|
||||
specifier: ^3.24.2
|
||||
version: 3.24.2
|
||||
devDependencies:
|
||||
'@tsconfig/node22':
|
||||
specifier: ^22.0.0
|
||||
|
@ -531,10 +525,6 @@ packages:
|
|||
'@polka/url@1.0.0-next.28':
|
||||
resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==}
|
||||
|
||||
'@primeuix/forms@0.0.4':
|
||||
resolution: {integrity: sha512-WKrxZPM9fPAEsM0xcTrOOJn86MbfOEzPwSwpO94Y7RtguWw+1nrvqYNzCcmVqO6zBi0BVMihoWxMKFIRzTOuZg==}
|
||||
engines: {node: '>=12.11.0'}
|
||||
|
||||
'@primeuix/styled@0.5.1':
|
||||
resolution: {integrity: sha512-5Ftw/KSauDPClQ8F2qCyCUF7cIUEY4yLNikf0rKV7Vsb8zGYNK0dahQe7CChaR6M2Kn+NA2DSBSk76ZXqj6Uog==}
|
||||
engines: {node: '>=12.11.0'}
|
||||
|
@ -545,10 +535,6 @@ packages:
|
|||
'@primeuix/themes@1.0.1':
|
||||
resolution: {integrity: sha512-RllttI3oGTZa66UQDCIA2lPnJvO/xqtNpy+0eNql6fIxdS2AUg5n7L81jTZrHNZ+31T5OBzL/SGFCDycmHTz2g==}
|
||||
|
||||
'@primeuix/utils@0.4.1':
|
||||
resolution: {integrity: sha512-5+1NLfyna+gLRPeFTo+xlR0tfPVLuVdidbeahAMLkQga5Rw0LxyUBCyD2/Zv2JkV69o2T+hpEDyddl3VdnYoBw==}
|
||||
engines: {node: '>=12.11.0'}
|
||||
|
||||
'@primeuix/utils@0.5.3':
|
||||
resolution: {integrity: sha512-7SGh7734wcF1/uK6RzO6Z6CBjGQ97GDHfpyl2F1G/c7R0z9hkT/V72ypDo82AWcCS7Ta07oIjDpOCTkSVZuEGQ==}
|
||||
engines: {node: '>=12.11.0'}
|
||||
|
@ -559,10 +545,6 @@ packages:
|
|||
peerDependencies:
|
||||
vue: ^3.5.0
|
||||
|
||||
'@primevue/forms@4.3.3':
|
||||
resolution: {integrity: sha512-GZYMd8wp+7/4DVMoGGUtRkAHw352peT3pgwgzaFYQqNIjxxGw9eI253XTxrppRCowrGJ2jEe80p9WfHi087B1g==}
|
||||
engines: {node: '>=12.11.0'}
|
||||
|
||||
'@primevue/icons@4.3.3':
|
||||
resolution: {integrity: sha512-ouQaxHyeFB6MSfEGGbjaK5Qv9efS1xZGetZoU5jcPm090MSYLFtroP1CuK3lZZAQals06TZ6T6qcoNukSHpK5w==}
|
||||
engines: {node: '>=12.11.0'}
|
||||
|
@ -2205,9 +2187,6 @@ packages:
|
|||
resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
zod@3.24.2:
|
||||
resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==}
|
||||
|
||||
snapshots:
|
||||
|
||||
'@ampproject/remapping@2.3.0':
|
||||
|
@ -2613,10 +2592,6 @@ snapshots:
|
|||
|
||||
'@polka/url@1.0.0-next.28': {}
|
||||
|
||||
'@primeuix/forms@0.0.4':
|
||||
dependencies:
|
||||
'@primeuix/utils': 0.4.1
|
||||
|
||||
'@primeuix/styled@0.5.1':
|
||||
dependencies:
|
||||
'@primeuix/utils': 0.5.3
|
||||
|
@ -2629,8 +2604,6 @@ snapshots:
|
|||
dependencies:
|
||||
'@primeuix/styled': 0.5.1
|
||||
|
||||
'@primeuix/utils@0.4.1': {}
|
||||
|
||||
'@primeuix/utils@0.5.3': {}
|
||||
|
||||
'@primevue/core@4.3.3(vue@3.5.13(typescript@5.8.2))':
|
||||
|
@ -2639,14 +2612,6 @@ snapshots:
|
|||
'@primeuix/utils': 0.5.3
|
||||
vue: 3.5.13(typescript@5.8.2)
|
||||
|
||||
'@primevue/forms@4.3.3(vue@3.5.13(typescript@5.8.2))':
|
||||
dependencies:
|
||||
'@primeuix/forms': 0.0.4
|
||||
'@primeuix/utils': 0.5.3
|
||||
'@primevue/core': 4.3.3(vue@3.5.13(typescript@5.8.2))
|
||||
transitivePeerDependencies:
|
||||
- vue
|
||||
|
||||
'@primevue/icons@4.3.3(vue@3.5.13(typescript@5.8.2))':
|
||||
dependencies:
|
||||
'@primeuix/utils': 0.5.3
|
||||
|
@ -4309,5 +4274,3 @@ snapshots:
|
|||
yocto-queue@0.1.0: {}
|
||||
|
||||
yoctocolors@2.1.1: {}
|
||||
|
||||
zod@3.24.2: {}
|
||||
|
|
Loading…
Add table
Reference in a new issue