update page components

This commit is contained in:
philipp lang 2023-07-15 17:28:19 +02:00
parent 7bffa6c5ae
commit 8ba433c6b8
10 changed files with 56 additions and 44 deletions

View File

@ -42,6 +42,8 @@ class LoginController extends Controller
public function showLoginForm(): Response
{
session()->put('title', 'Anmelden');
return \Inertia::render('VLogin');
}

View File

@ -12,6 +12,8 @@ class InitializeFormAction
public function asController(): Response
{
session()->put('title', 'Einrichtung');
return Inertia::render('Initialize/VIndex');
}
}

3
resources/js/app.js vendored
View File

@ -1,5 +1,5 @@
import {createApp, h, defineAsyncComponent} from 'vue';
import {createInertiaApp, Link as ILink} from '@inertiajs/vue3';
import {Head, createInertiaApp, Link as ILink} from '@inertiajs/vue3';
import axios from 'axios';
import VueAxios from 'vue-axios';
import {Plugin as FloatingVue, options as FloatingVueOptions} from './lib/floatingVue.js';
@ -41,6 +41,7 @@ createInertiaApp({
.use(VueAxios, axios)
.use(PiniaVuePlugin)
.component('ILink', ILink)
.component('Head', Head)
.mixin(hasModule)
.mixin(hasFlash);

View File

@ -0,0 +1,10 @@
<template>
<div class="h-24 p-6 md:px-10 bg-primary-800 flex justify-between items-center w-full">
<span class="text-primary-500 text-xl"><slot></slot></span>
<img src="../../../img/dpsg.gif" class="w-24" />
</div>
</template>
<script>
export default {};
</script>

View File

@ -0,0 +1,19 @@
<template>
<div class="min-w-[16rem] sm:min-w-[18rem] md:min-w-[24rem] bg-gray-800 rounded-xl overflow-hidden shadow-lg" :class="{'p-6 md:p-10': banner === false}">
<slot name="heading"></slot>
<div :class="{'p-6 md:p-10': banner === true}">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
props: {
banner: {
type: Boolean,
default: () => false,
},
},
};
</script>

View File

@ -23,7 +23,6 @@
<script>
import {menuStore} from '../../stores/menuStore.js';
import {Head} from '@inertiajs/vue3';
export default {
inheritAttrs: false,
@ -39,8 +38,5 @@ export default {
menuStore: menuStore(),
};
},
components: {
Head,
},
};
</script>

View File

@ -1,18 +1,17 @@
<template>
<Head :title="$page.props.title"></Head>
<v-notification class="fixed z-40 right-0 bottom-0 mb-3 mr-3"></v-notification>
<div class="flex justify-center items-center grow min-h-full">
<div class="w-64 sm:w-72 md:w-96 bg-gray-800 rounded-xl overflow-hidden shadow-lg">
<slot></slot>
</div>
<div class="flex justify-center items-center grow min-h-full px-6">
<slot></slot>
</div>
</template>
<script>
import VNotification from '../components/VNotification.vue';
import {defineAsyncComponent} from 'vue';
export default {
components: {
VNotification,
VNotification: defineAsyncComponent(() => import('../components/VNotification.vue')),
},
};
</script>

View File

@ -1,18 +0,0 @@
<template>
<div id="app" class="bg-gray-900 font-sans flex flex-col grow items-center justify-center p-6">
<v-notification class="fixed z-40 right-0 bottom-0 mb-3 mr-3"></v-notification>
<div class="bg-gray-800 rounded-xl overflow-hidden shadow-lg p-6">
<slot></slot>
</div>
</div>
</template>
<script>
import {defineAsyncComponent} from 'vue';
export default {
components: {
VNotification: defineAsyncComponent(() => import('../components/VNotification.vue')),
},
};
</script>

View File

@ -1,5 +1,5 @@
<template>
<div>
<page-full-layout>
<div v-if="step === 0">
<page-full-heading>Willkommen im Adrema-Setup.<br /></page-full-heading>
<div class="prose prose-invert">
@ -132,16 +132,16 @@
</div>
<a href="/" class="mt-5 inline-block btn btn-primary">Abschließen</a>
</div>
</div>
</page-full-layout>
</template>
<script>
import InstallLayout from '../../layouts/InstallLayout.vue';
import FullLayout from '../../layouts/FullLayout.vue';
import hasFlash from '../../mixins/hasFlash.js';
import debounce from 'lodash/debounce';
export default {
layout: InstallLayout,
layout: FullLayout,
mixins: [hasFlash],

View File

@ -1,15 +1,16 @@
<template>
<form @submit.prevent="submit">
<div class="h-24 p-6 md:px-10 bg-primary-800 flex justify-between items-center w-full">
<span class="text-primary-500 text-xl">Login</span>
<img src="../../img/dpsg.gif" class="w-24" />
</div>
<div class="p-6 md:p-10 grid gap-5">
<f-text id="email" name="email" label="E-Mail-Adresse" v-model="values.email"></f-text>
<f-text id="password" name="password" type="password" label="Passwort" v-model="values.password"></f-text>
<button type="submit" class="btn btn-primary">Login</button>
</div>
</form>
<page-full-layout banner>
<template #heading>
<page-full-heading-banner>Login</page-full-heading-banner>
</template>
<form @submit.prevent="submit">
<div class="grid gap-5">
<f-text id="email" name="email" label="E-Mail-Adresse" v-model="values.email"></f-text>
<f-text id="password" name="password" type="password" label="Passwort" v-model="values.password"></f-text>
<button type="submit" class="btn btn-primary">Login</button>
</div>
</form>
</page-full-layout>
</template>
<script>