formatting
This commit is contained in:
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
import {createInertiaApp} from '@inertiajs/vue3';
|
import { createInertiaApp } from '@inertiajs/vue3';
|
||||||
import {initializeTheme} from '@/composables/useAppearance';
|
import { initializeTheme } from '@/composables/useAppearance';
|
||||||
import AppLayout from '@/layouts/AppLayout.vue';
|
import AppLayout from '@/layouts/AppLayout.vue';
|
||||||
import AuthLayout from '@/layouts/AuthLayout.vue';
|
import AuthLayout from '@/layouts/AuthLayout.vue';
|
||||||
import SettingsLayout from '@/layouts/settings/Layout.vue';
|
import SettingsLayout from '@/layouts/settings/Layout.vue';
|
||||||
import {initializeFlashToast} from '@/lib/flashToast';
|
import { initializeFlashToast } from '@/lib/flashToast';
|
||||||
|
|
||||||
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
|
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {Form, Head} from '@inertiajs/vue3';
|
import { Form, Head } from '@inertiajs/vue3';
|
||||||
import InputError from '@/components/InputError.vue';
|
import InputError from '@/components/InputError.vue';
|
||||||
import PasswordInput from '@/components/PasswordInput.vue';
|
import PasswordInput from '@/components/PasswordInput.vue';
|
||||||
import TextLink from '@/components/TextLink.vue';
|
import TextLink from '@/components/TextLink.vue';
|
||||||
import {Button} from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import {Input} from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import {Label} from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import {Spinner} from '@/components/ui/spinner';
|
import { Spinner } from '@/components/ui/spinner';
|
||||||
import {login} from '@/routes';
|
import { login } from '@/routes';
|
||||||
import {store} from '@/routes/register';
|
import { store } from '@/routes/register';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
passwordRules: string;
|
passwordRules: string;
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import otsRoutes from '@/routes/ots';
|
import otsRoutes from '@/routes/ots';
|
||||||
import {Save} from '@lucide/vue';
|
import { Save } from '@lucide/vue';
|
||||||
import {Head, useForm} from '@inertiajs/vue3';
|
import { Head, useForm } from '@inertiajs/vue3';
|
||||||
import {Button} from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import {Label} from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import InputError from '@/components/InputError.vue';
|
import InputError from '@/components/InputError.vue';
|
||||||
import {Card, CardContent} from '@/components/ui/card';
|
import { Card, CardContent } from '@/components/ui/card';
|
||||||
import {Textarea} from "@/components/ui/textarea";
|
import { Textarea } from '@/components/ui/textarea';
|
||||||
|
|
||||||
const form = useForm({
|
const form = useForm({
|
||||||
secret: '',
|
secret: '',
|
||||||
@@ -24,18 +24,20 @@ function submit(): void {
|
|||||||
<CardContent>
|
<CardContent>
|
||||||
<form class="grid w-full gap-5 py-4" @submit.prevent="submit">
|
<form class="grid w-full gap-5 py-4" @submit.prevent="submit">
|
||||||
<div class="grid grid-cols-2 items-start">
|
<div class="grid grid-cols-2 items-start">
|
||||||
<div class="grid items-start gap-3 col-span-2">
|
<div class="col-span-2 grid items-start gap-3">
|
||||||
<Label for="secret">Secret</Label>
|
<Label for="secret">Secret</Label>
|
||||||
<Textarea id="secret" v-model="form.secret" :rows="10" autofocus name="secret"/>
|
<Textarea
|
||||||
|
id="secret"
|
||||||
|
v-model="form.secret"
|
||||||
|
:rows="10"
|
||||||
|
autofocus
|
||||||
|
name="secret"
|
||||||
|
/>
|
||||||
<InputError :message="form.errors.secret" />
|
<InputError :message="form.errors.secret" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex w-full justify-end">
|
<div class="flex w-full justify-end">
|
||||||
<Button
|
<Button :disabled="form.processing" class="w-fit" type="submit">
|
||||||
:disabled="form.processing"
|
|
||||||
class="w-fit"
|
|
||||||
type="submit"
|
|
||||||
>
|
|
||||||
<component :is="Save" />
|
<component :is="Save" />
|
||||||
Erstellen
|
Erstellen
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {Head} from '@inertiajs/vue3';
|
import { Head } from '@inertiajs/vue3';
|
||||||
import type {OTS} from '@/types/models';
|
import type { OTS } from '@/types/models';
|
||||||
import {Card, CardContent} from '@/components/ui/card';
|
import { Card, CardContent } from '@/components/ui/card';
|
||||||
import {Textarea} from "@/components/ui/textarea";
|
import { Textarea } from '@/components/ui/textarea';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
oneTimeSecret: OTS;
|
oneTimeSecret: OTS;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -15,7 +14,12 @@ defineProps<{
|
|||||||
<Head title="OTS" />
|
<Head title="OTS" />
|
||||||
<Card class="w-full">
|
<Card class="w-full">
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<Textarea v-model="oneTimeSecret.secret" :rows="10" name="secret" readonly/>
|
<Textarea
|
||||||
|
v-model="oneTimeSecret.secret"
|
||||||
|
:rows="10"
|
||||||
|
name="secret"
|
||||||
|
readonly
|
||||||
|
/>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,14 +1,21 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import teamRoutes from '@/routes/teams';
|
import teamRoutes from '@/routes/teams';
|
||||||
import {Form, Head, Link, setLayoutProps, useForm} from '@inertiajs/vue3';
|
import { Form, Head, Link, setLayoutProps, useForm } from '@inertiajs/vue3';
|
||||||
import type {Team, TeamInvite} from '@/types/models';
|
import type { Team, TeamInvite } from '@/types/models';
|
||||||
import InputError from '@/components/InputError.vue';
|
import InputError from '@/components/InputError.vue';
|
||||||
import {Card, CardContent} from '@/components/ui/card';
|
import { Card, CardContent } from '@/components/ui/card';
|
||||||
import {Table, TableBody, TableCell, TableHead, TableHeader, TableRow,} from '@/components/ui/table';
|
import {
|
||||||
import {Button} from '@/components/ui/button';
|
Table,
|
||||||
import {Pencil, Plus, Trash} from '@lucide/vue';
|
TableBody,
|
||||||
import {Input} from "@/components/ui/input";
|
TableCell,
|
||||||
import {Label} from "@/components/ui/label";
|
TableHead,
|
||||||
|
TableHeader,
|
||||||
|
TableRow,
|
||||||
|
} from '@/components/ui/table';
|
||||||
|
import { Button } from '@/components/ui/button';
|
||||||
|
import { Pencil, Plus, Trash } from '@lucide/vue';
|
||||||
|
import { Input } from '@/components/ui/input';
|
||||||
|
import { Label } from '@/components/ui/label';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
team: Team;
|
team: Team;
|
||||||
@@ -29,7 +36,7 @@ setLayoutProps({
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const revokeForm = useForm({email: ''});
|
const revokeForm = useForm({ email: '' });
|
||||||
|
|
||||||
function revokeInvite(invite: TeamInvite): void {
|
function revokeInvite(invite: TeamInvite): void {
|
||||||
if (revokeForm.processing) {
|
if (revokeForm.processing) {
|
||||||
@@ -37,7 +44,7 @@ function revokeInvite(invite: TeamInvite): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
revokeForm.email = invite.invitedEmail;
|
revokeForm.email = invite.invitedEmail;
|
||||||
revokeForm.submit(teamRoutes.invite.revoke({team: props.team.slug}), {
|
revokeForm.submit(teamRoutes.invite.revoke({ team: props.team.slug }), {
|
||||||
preserveScroll: true,
|
preserveScroll: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -45,11 +52,11 @@ function revokeInvite(invite: TeamInvite): void {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="flex flex-col justify-center p-16">
|
<div class="flex flex-col justify-center p-16">
|
||||||
<Head title="Teams"/>
|
<Head title="Teams" />
|
||||||
<div v-if="canManageTeam" class="flex w-full justify-end py-4">
|
<div v-if="canManageTeam" class="flex w-full justify-end py-4">
|
||||||
<Link :href="teamRoutes.edit({ team: team.slug })">
|
<Link :href="teamRoutes.edit({ team: team.slug })">
|
||||||
<Button>
|
<Button>
|
||||||
<component :is="Pencil"/>
|
<component :is="Pencil" />
|
||||||
Bearbeiten
|
Bearbeiten
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
@@ -66,9 +73,8 @@ function revokeInvite(invite: TeamInvite): void {
|
|||||||
</TableRow>
|
</TableRow>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell class="font-bold">Erfordert 2FA:</TableCell>
|
<TableCell class="font-bold">Erfordert 2FA:</TableCell>
|
||||||
<TableCell>{{
|
<TableCell
|
||||||
team.multi_factor_required ? 'Ja' : 'Nein'
|
>{{ team.multi_factor_required ? 'Ja' : 'Nein' }}
|
||||||
}}
|
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
@@ -96,9 +102,8 @@ function revokeInvite(invite: TeamInvite): void {
|
|||||||
<TableRow v-for="member in team.members" :key="member.email">
|
<TableRow v-for="member in team.members" :key="member.email">
|
||||||
<TableCell>{{ member.name }}</TableCell>
|
<TableCell>{{ member.name }}</TableCell>
|
||||||
<TableCell>{{ member.email }}</TableCell>
|
<TableCell>{{ member.email }}</TableCell>
|
||||||
<TableCell>{{
|
<TableCell
|
||||||
member.has_multi_factor ? 'Ja' : 'Nein'
|
>{{ member.has_multi_factor ? 'Ja' : 'Nein' }}
|
||||||
}}
|
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>{{ member.role }}</TableCell>
|
<TableCell>{{ member.role }}</TableCell>
|
||||||
<TableCell>{{ member.joined_at }}</TableCell>
|
<TableCell>{{ member.joined_at }}</TableCell>
|
||||||
@@ -111,26 +116,37 @@ function revokeInvite(invite: TeamInvite): void {
|
|||||||
<CardContent>
|
<CardContent>
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<h2 class="text-lg font-semibold">Ausstehende Invites</h2>
|
<h2 class="text-lg font-semibold">Ausstehende Invites</h2>
|
||||||
<Card class="border-neutral-500 b-2">
|
<Card class="b-2 border-neutral-500">
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<Form v-slot="{ errors, processing }" :action="teamRoutes.invite.invite({team: team.slug})"
|
<Form
|
||||||
class="flex gap-2 justify-end items-end"
|
v-slot="{ errors, processing }"
|
||||||
method="POST"
|
:action="teamRoutes.invite.invite({ team: team.slug })"
|
||||||
|
class="flex items-end justify-end gap-2"
|
||||||
|
method="POST"
|
||||||
>
|
>
|
||||||
<div class="grid gap-y-2">
|
<div class="grid gap-y-2">
|
||||||
<Label for="email">Email:</Label>
|
<Label for="email">Email:</Label>
|
||||||
<Input id="email" name="email" placeholder="user@example.com" type="email"/>
|
<Input
|
||||||
<InputError :message="errors.email"/>
|
id="email"
|
||||||
|
name="email"
|
||||||
|
placeholder="user@example.com"
|
||||||
|
type="email"
|
||||||
|
/>
|
||||||
|
<InputError :message="errors.email" />
|
||||||
</div>
|
</div>
|
||||||
<Button :disabled="processing" type="submit" variant="secondary">
|
<Button
|
||||||
<component :is="Plus"/>
|
:disabled="processing"
|
||||||
|
type="submit"
|
||||||
|
variant="secondary"
|
||||||
|
>
|
||||||
|
<component :is="Plus" />
|
||||||
Einladen
|
Einladen
|
||||||
</Button>
|
</Button>
|
||||||
</Form>
|
</Form>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
<InputError :message="revokeForm.errors.email"/>
|
<InputError :message="revokeForm.errors.email" />
|
||||||
<Table>
|
<Table>
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
@@ -153,7 +169,7 @@ function revokeInvite(invite: TeamInvite): void {
|
|||||||
variant="ghost"
|
variant="ghost"
|
||||||
@click="revokeInvite(invite)"
|
@click="revokeInvite(invite)"
|
||||||
>
|
>
|
||||||
<Trash :size="18"/>
|
<Trash :size="18" />
|
||||||
</Button>
|
</Button>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import teamRoutes from '@/routes/teams';
|
import teamRoutes from '@/routes/teams';
|
||||||
import {Form, Head, useForm} from '@inertiajs/vue3';
|
import { Form, Head, useForm } from '@inertiajs/vue3';
|
||||||
import {Card, CardContent} from '@/components/ui/card';
|
import { Card, CardContent } from '@/components/ui/card';
|
||||||
import {Input} from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import InputError from '@/components/InputError.vue';
|
import InputError from '@/components/InputError.vue';
|
||||||
import {Button} from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
layout: {
|
layout: {
|
||||||
|
|||||||
Reference in New Issue
Block a user