Compare commits

..

15 commits

Author SHA1 Message Date
7a7c44c0bf Merge pull request 'frontend/create-loggin-page' (#67) from frontend/create-loggin-page into main
Some checks failed
ci/woodpecker/push/deployment Pipeline failed
Reviewed-on: #67
2025-04-09 23:15:48 +02:00
Schnitzel
7dfce2e38b frontend resolve conflicts
Some checks failed
ci/woodpecker/push/deployment Pipeline failed
ci/woodpecker/pr/check_fmt Pipeline failed
ci/woodpecker/pr/deployment Pipeline failed
ci/woodpecker/pull_request_closed/deployment Pipeline failed
ci/woodpecker/pr/cargo_clippy Pipeline was successful
ci/woodpecker/pr/cargo_check Pipeline was successful
ci/woodpecker/pr/cargo_test Pipeline was successful
2025-04-09 23:09:04 +02:00
Schnitzel
0d8641e00c frontend add login mask to loginview 2025-04-09 22:45:04 +02:00
Schnitzel
373431f0d0 frontend resolve conflicts 2025-04-09 22:41:54 +02:00
Schnitzel
75b4785f5c frontend resolve conflicts 2025-04-09 22:38:36 +02:00
Schnitzel
2411c61c55 frontend fix pnpm-lock.yaml 2025-04-09 22:36:27 +02:00
Schnitzel
a58f8d901e frontend resolve conflicts 2025-04-09 22:36:08 +02:00
Schnitzel
ec10bce6af add loginView Error useToast 2025-04-09 22:33:29 +02:00
Schnitzel
47a40630b6 add LoginView 2025-04-09 22:33:29 +02:00
Schnitzel
be5b440d18 frontend fix pnpm-lock.yaml 2025-04-09 22:21:21 +02:00
Schnitzel
08bb25f925 frontend add login mask to loginview 2025-04-09 22:17:51 +02:00
Schnitzel
e5d2fb06fd add loginView Error useToast 2025-04-09 10:52:04 +02:00
Schnitzel
8fb3736188 add loginView 2025-04-09 10:34:33 +02:00
Schnitzel
726c4844fc add LoginView 2025-04-09 10:29:52 +02:00
Jan
8c2b45830e frontend Login page createted 2025-04-07 12:50:54 +02:00
6 changed files with 198 additions and 2 deletions

View file

@ -15,11 +15,13 @@
},
"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"
"vue-router": "^4.5.0",
"zod": "^3.24.2"
},
"devDependencies": {
"@tsconfig/node22": "^22.0.0",

View 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>

View file

@ -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,6 +18,8 @@ app.use(PrimeVue, {
},
})
app.use(pinia)
app.use(ToastService);
app.use(createPinia())
app.use(router)
app.directive('ripple', Ripple)

View file

@ -23,6 +23,13 @@ const router = createRouter({
component: () => import('../views/StudentView.vue'),
},
{
path: '/Login',
name: 'Login',
component: () => import('../views/LoginView.vue'),
},
],
})

View 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
View file

@ -13,6 +13,9 @@ 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))
@ -28,6 +31,9 @@ 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
@ -525,6 +531,10 @@ 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'}
@ -535,6 +545,10 @@ 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'}
@ -545,6 +559,10 @@ 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'}
@ -2187,6 +2205,9 @@ 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':
@ -2592,6 +2613,10 @@ 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
@ -2604,6 +2629,8 @@ 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))':
@ -2612,6 +2639,14 @@ 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
@ -4274,3 +4309,5 @@ snapshots:
yocto-queue@0.1.0: {}
yoctocolors@2.1.1: {}
zod@3.24.2: {}