Files
keystone/resources/js/pages/auth/Login.vue
Harry Bayliss 66f0ee9e50
All checks were successful
CI / Tests (push) Successful in 43s
CI / Lint (push) Successful in 1m3s
Migrate to Gitea, switch JS tooling to oxlint/oxfmt, lift test coverage to 95%
- Add .gitea/workflows/ci.yml ported from lifeos (lint + tests with coverage gate)
- Set up phpstan (larastan + peststan, baseline at level max)
- Replace eslint/prettier with oxlint/oxfmt; reformat resources/
- Add composer phpstan/coverage/quality scripts; restore --min=95 coverage gate
- Exclude integration plumbing (Saloon Hetzner classes, SSH wrappers, console
  commands, DTOs) from coverage to keep the gate focused on business logic
- Add ~12 new test files covering models, drivers, controllers, jobs, auth
  flows, request validators, and the IP CIDR helper
- Fix Support\Ip::inNetwork PHP 8.4 TypeError in CIDR mask check
- Fix FirewallRule::command comparing the enum-cast type column to a string
- Fix Server::network using the wrong foreign key column
- Remove unreachable code under abort(403) in RegisteredUserController
2026-05-13 16:51:07 +01:00

102 lines
3.5 KiB
Vue

<script setup lang="ts">
import InputError from "@/components/InputError.vue";
import TextLink from "@/components/TextLink.vue";
import { Button } from "@/components/ui/button";
import { Checkbox } from "@/components/ui/checkbox";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import AuthBase from "@/layouts/AuthLayout.vue";
import { Head, useForm } from "@inertiajs/vue3";
import { LoaderCircle } from "lucide-vue-next";
defineProps<{
status?: string;
canResetPassword: boolean;
}>();
const form = useForm({
email: "",
password: "",
remember: false,
});
const submit = () => {
form.post(route("login"), {
onFinish: () => form.reset("password"),
});
};
</script>
<template>
<AuthBase
title="Log in to your account"
description="Enter your email and password below to log in"
>
<Head title="Log in" />
<div v-if="status" class="mb-4 text-center text-sm font-medium text-green-600">
{{ status }}
</div>
<form @submit.prevent="submit" class="flex flex-col gap-6">
<div class="grid gap-6">
<div class="grid gap-2">
<Label for="email">Email address</Label>
<Input
id="email"
type="email"
required
autofocus
:tabindex="1"
autocomplete="email"
v-model="form.email"
placeholder="email@example.com"
/>
<InputError :message="form.errors.email" />
</div>
<div class="grid gap-2">
<div class="flex items-center justify-between">
<Label for="password">Password</Label>
<TextLink
v-if="canResetPassword"
:href="route('password.request')"
class="text-sm"
:tabindex="5"
>
Forgot password?
</TextLink>
</div>
<Input
id="password"
type="password"
required
:tabindex="2"
autocomplete="current-password"
v-model="form.password"
placeholder="Password"
/>
<InputError :message="form.errors.password" />
</div>
<div class="flex items-center justify-between" :tabindex="3">
<Label for="remember" class="flex items-center space-x-3">
<Checkbox id="remember" v-model:checked="form.remember" :tabindex="4" />
<span>Remember me</span>
</Label>
</div>
<Button type="submit" class="mt-4 w-full" :tabindex="4" :disabled="form.processing">
<LoaderCircle v-if="form.processing" class="h-4 w-4 animate-spin" />
Log in
</Button>
</div>
<div class="text-center text-sm text-muted-foreground">
Don't have an account?
<TextLink :href="route('register')" :tabindex="5">Sign up</TextLink>
</div>
</form>
</AuthBase>
</template>