formatting
This commit is contained in:
@@ -6,7 +6,7 @@ import {Button} from '@/components/ui/button';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import InputError from '@/components/InputError.vue';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import {Textarea} from "@/components/ui/textarea";
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
|
||||
const form = useForm({
|
||||
secret: '',
|
||||
@@ -24,18 +24,20 @@ function submit(): void {
|
||||
<CardContent>
|
||||
<form class="grid w-full gap-5 py-4" @submit.prevent="submit">
|
||||
<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>
|
||||
<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" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex w-full justify-end">
|
||||
<Button
|
||||
:disabled="form.processing"
|
||||
class="w-fit"
|
||||
type="submit"
|
||||
>
|
||||
<Button :disabled="form.processing" class="w-fit" type="submit">
|
||||
<component :is="Save" />
|
||||
Erstellen
|
||||
</Button>
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
import { Head } from '@inertiajs/vue3';
|
||||
import type { OTS } from '@/types/models';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import {Textarea} from "@/components/ui/textarea";
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
|
||||
defineProps<{
|
||||
oneTimeSecret: OTS;
|
||||
}>();
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -15,7 +14,12 @@ defineProps<{
|
||||
<Head title="OTS" />
|
||||
<Card class="w-full">
|
||||
<CardContent>
|
||||
<Textarea v-model="oneTimeSecret.secret" :rows="10" name="secret" readonly/>
|
||||
<Textarea
|
||||
v-model="oneTimeSecret.secret"
|
||||
:rows="10"
|
||||
name="secret"
|
||||
readonly
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
@@ -4,11 +4,18 @@ import {Form, Head, Link, setLayoutProps, useForm} from '@inertiajs/vue3';
|
||||
import type { Team, TeamInvite } from '@/types/models';
|
||||
import InputError from '@/components/InputError.vue';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import {Table, TableBody, TableCell, TableHead, TableHeader, TableRow,} from '@/components/ui/table';
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
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";
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
|
||||
const props = defineProps<{
|
||||
team: Team;
|
||||
@@ -66,9 +73,8 @@ function revokeInvite(invite: TeamInvite): void {
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableCell class="font-bold">Erfordert 2FA:</TableCell>
|
||||
<TableCell>{{
|
||||
team.multi_factor_required ? 'Ja' : 'Nein'
|
||||
}}
|
||||
<TableCell
|
||||
>{{ team.multi_factor_required ? 'Ja' : 'Nein' }}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
@@ -96,9 +102,8 @@ function revokeInvite(invite: TeamInvite): void {
|
||||
<TableRow v-for="member in team.members" :key="member.email">
|
||||
<TableCell>{{ member.name }}</TableCell>
|
||||
<TableCell>{{ member.email }}</TableCell>
|
||||
<TableCell>{{
|
||||
member.has_multi_factor ? 'Ja' : 'Nein'
|
||||
}}
|
||||
<TableCell
|
||||
>{{ member.has_multi_factor ? 'Ja' : 'Nein' }}
|
||||
</TableCell>
|
||||
<TableCell>{{ member.role }}</TableCell>
|
||||
<TableCell>{{ member.joined_at }}</TableCell>
|
||||
@@ -111,18 +116,29 @@ function revokeInvite(invite: TeamInvite): void {
|
||||
<CardContent>
|
||||
<div class="flex justify-between">
|
||||
<h2 class="text-lg font-semibold">Ausstehende Invites</h2>
|
||||
<Card class="border-neutral-500 b-2">
|
||||
<Card class="b-2 border-neutral-500">
|
||||
<CardContent>
|
||||
<Form v-slot="{ errors, processing }" :action="teamRoutes.invite.invite({team: team.slug})"
|
||||
class="flex gap-2 justify-end items-end"
|
||||
<Form
|
||||
v-slot="{ errors, processing }"
|
||||
:action="teamRoutes.invite.invite({ team: team.slug })"
|
||||
class="flex items-end justify-end gap-2"
|
||||
method="POST"
|
||||
>
|
||||
<div class="grid gap-y-2">
|
||||
<Label for="email">Email:</Label>
|
||||
<Input id="email" name="email" placeholder="user@example.com" type="email"/>
|
||||
<Input
|
||||
id="email"
|
||||
name="email"
|
||||
placeholder="user@example.com"
|
||||
type="email"
|
||||
/>
|
||||
<InputError :message="errors.email" />
|
||||
</div>
|
||||
<Button :disabled="processing" type="submit" variant="secondary">
|
||||
<Button
|
||||
:disabled="processing"
|
||||
type="submit"
|
||||
variant="secondary"
|
||||
>
|
||||
<component :is="Plus" />
|
||||
Einladen
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user