Merge pull request 'frontend/create-loggin-page' (#67) from frontend/create-loggin-page into main
Some checks failed
ci/woodpecker/push/deployment Pipeline failed
Some checks failed
ci/woodpecker/push/deployment Pipeline failed
Reviewed-on: #67
This commit is contained in:
commit
7a7c44c0bf
6 changed files with 198 additions and 2 deletions
|
@ -15,11 +15,13 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@primeuix/themes": "^1.0.1",
|
"@primeuix/themes": "^1.0.1",
|
||||||
|
"@primevue/forms": "^4.3.3",
|
||||||
"lucide-vue-next": "^0.487.0",
|
"lucide-vue-next": "^0.487.0",
|
||||||
"pinia": "^3.0.1",
|
"pinia": "^3.0.1",
|
||||||
"primevue": "^4.3.3",
|
"primevue": "^4.3.3",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vue-router": "^4.5.0"
|
"vue-router": "^4.5.0",
|
||||||
|
"zod": "^3.24.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tsconfig/node22": "^22.0.0",
|
"@tsconfig/node22": "^22.0.0",
|
||||||
|
|
80
frontend/src/components/MenuBar.vue
Normal file
80
frontend/src/components/MenuBar.vue
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
<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 PrimeVue from 'primevue/config'
|
||||||
import Aura from '@primeuix/themes/aura'
|
import Aura from '@primeuix/themes/aura'
|
||||||
import Ripple from 'primevue/ripple'
|
import Ripple from 'primevue/ripple'
|
||||||
|
import ToastService from 'primevue/toastservice';
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@ app.use(PrimeVue, {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
app.use(pinia)
|
app.use(pinia)
|
||||||
|
app.use(ToastService);
|
||||||
|
app.use(createPinia())
|
||||||
app.use(router)
|
app.use(router)
|
||||||
app.directive('ripple', Ripple)
|
app.directive('ripple', Ripple)
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,13 @@ const router = createRouter({
|
||||||
|
|
||||||
component: () => import('../views/StudentView.vue'),
|
component: () => import('../views/StudentView.vue'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/Login',
|
||||||
|
name: 'Login',
|
||||||
|
|
||||||
|
component: () => import('../views/LoginView.vue'),
|
||||||
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
68
frontend/src/views/LoginView.vue
Normal file
68
frontend/src/views/LoginView.vue
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
<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,6 +13,9 @@ importers:
|
||||||
'@primeuix/themes':
|
'@primeuix/themes':
|
||||||
specifier: ^1.0.1
|
specifier: ^1.0.1
|
||||||
version: 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:
|
lucide-vue-next:
|
||||||
specifier: ^0.487.0
|
specifier: ^0.487.0
|
||||||
version: 0.487.0(vue@3.5.13(typescript@5.8.2))
|
version: 0.487.0(vue@3.5.13(typescript@5.8.2))
|
||||||
|
@ -28,6 +31,9 @@ importers:
|
||||||
vue-router:
|
vue-router:
|
||||||
specifier: ^4.5.0
|
specifier: ^4.5.0
|
||||||
version: 4.5.0(vue@3.5.13(typescript@5.8.2))
|
version: 4.5.0(vue@3.5.13(typescript@5.8.2))
|
||||||
|
zod:
|
||||||
|
specifier: ^3.24.2
|
||||||
|
version: 3.24.2
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@tsconfig/node22':
|
'@tsconfig/node22':
|
||||||
specifier: ^22.0.0
|
specifier: ^22.0.0
|
||||||
|
@ -525,6 +531,10 @@ packages:
|
||||||
'@polka/url@1.0.0-next.28':
|
'@polka/url@1.0.0-next.28':
|
||||||
resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==}
|
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':
|
'@primeuix/styled@0.5.1':
|
||||||
resolution: {integrity: sha512-5Ftw/KSauDPClQ8F2qCyCUF7cIUEY4yLNikf0rKV7Vsb8zGYNK0dahQe7CChaR6M2Kn+NA2DSBSk76ZXqj6Uog==}
|
resolution: {integrity: sha512-5Ftw/KSauDPClQ8F2qCyCUF7cIUEY4yLNikf0rKV7Vsb8zGYNK0dahQe7CChaR6M2Kn+NA2DSBSk76ZXqj6Uog==}
|
||||||
engines: {node: '>=12.11.0'}
|
engines: {node: '>=12.11.0'}
|
||||||
|
@ -535,6 +545,10 @@ packages:
|
||||||
'@primeuix/themes@1.0.1':
|
'@primeuix/themes@1.0.1':
|
||||||
resolution: {integrity: sha512-RllttI3oGTZa66UQDCIA2lPnJvO/xqtNpy+0eNql6fIxdS2AUg5n7L81jTZrHNZ+31T5OBzL/SGFCDycmHTz2g==}
|
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':
|
'@primeuix/utils@0.5.3':
|
||||||
resolution: {integrity: sha512-7SGh7734wcF1/uK6RzO6Z6CBjGQ97GDHfpyl2F1G/c7R0z9hkT/V72ypDo82AWcCS7Ta07oIjDpOCTkSVZuEGQ==}
|
resolution: {integrity: sha512-7SGh7734wcF1/uK6RzO6Z6CBjGQ97GDHfpyl2F1G/c7R0z9hkT/V72ypDo82AWcCS7Ta07oIjDpOCTkSVZuEGQ==}
|
||||||
engines: {node: '>=12.11.0'}
|
engines: {node: '>=12.11.0'}
|
||||||
|
@ -545,6 +559,10 @@ packages:
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
vue: ^3.5.0
|
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':
|
'@primevue/icons@4.3.3':
|
||||||
resolution: {integrity: sha512-ouQaxHyeFB6MSfEGGbjaK5Qv9efS1xZGetZoU5jcPm090MSYLFtroP1CuK3lZZAQals06TZ6T6qcoNukSHpK5w==}
|
resolution: {integrity: sha512-ouQaxHyeFB6MSfEGGbjaK5Qv9efS1xZGetZoU5jcPm090MSYLFtroP1CuK3lZZAQals06TZ6T6qcoNukSHpK5w==}
|
||||||
engines: {node: '>=12.11.0'}
|
engines: {node: '>=12.11.0'}
|
||||||
|
@ -2187,6 +2205,9 @@ packages:
|
||||||
resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==}
|
resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==}
|
||||||
engines: {node: '>=18'}
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
|
zod@3.24.2:
|
||||||
|
resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==}
|
||||||
|
|
||||||
snapshots:
|
snapshots:
|
||||||
|
|
||||||
'@ampproject/remapping@2.3.0':
|
'@ampproject/remapping@2.3.0':
|
||||||
|
@ -2592,6 +2613,10 @@ snapshots:
|
||||||
|
|
||||||
'@polka/url@1.0.0-next.28': {}
|
'@polka/url@1.0.0-next.28': {}
|
||||||
|
|
||||||
|
'@primeuix/forms@0.0.4':
|
||||||
|
dependencies:
|
||||||
|
'@primeuix/utils': 0.4.1
|
||||||
|
|
||||||
'@primeuix/styled@0.5.1':
|
'@primeuix/styled@0.5.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@primeuix/utils': 0.5.3
|
'@primeuix/utils': 0.5.3
|
||||||
|
@ -2604,6 +2629,8 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@primeuix/styled': 0.5.1
|
'@primeuix/styled': 0.5.1
|
||||||
|
|
||||||
|
'@primeuix/utils@0.4.1': {}
|
||||||
|
|
||||||
'@primeuix/utils@0.5.3': {}
|
'@primeuix/utils@0.5.3': {}
|
||||||
|
|
||||||
'@primevue/core@4.3.3(vue@3.5.13(typescript@5.8.2))':
|
'@primevue/core@4.3.3(vue@3.5.13(typescript@5.8.2))':
|
||||||
|
@ -2612,6 +2639,14 @@ snapshots:
|
||||||
'@primeuix/utils': 0.5.3
|
'@primeuix/utils': 0.5.3
|
||||||
vue: 3.5.13(typescript@5.8.2)
|
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))':
|
'@primevue/icons@4.3.3(vue@3.5.13(typescript@5.8.2))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@primeuix/utils': 0.5.3
|
'@primeuix/utils': 0.5.3
|
||||||
|
@ -4274,3 +4309,5 @@ snapshots:
|
||||||
yocto-queue@0.1.0: {}
|
yocto-queue@0.1.0: {}
|
||||||
|
|
||||||
yoctocolors@2.1.1: {}
|
yoctocolors@2.1.1: {}
|
||||||
|
|
||||||
|
zod@3.24.2: {}
|
||||||
|
|
Loading…
Add table
Reference in a new issue