first commit

This commit is contained in:
2026-10-09 08:21:06 +02:00
parent db7456df87
commit d259c62304
3761 changed files with 896046 additions and 0 deletions
@@ -0,0 +1,37 @@
@extends('layouts.install')
@section('content')
@include('install.steps', ['steps' => [
'welcome' => 'selected done',
'requirements' => 'selected done',
'permissions' => 'selected done',
'database' => 'selected done',
'installation' => 'selected done',
'complete' => 'selected'
]])
<x-install.card title="Complete!">
<div class="space-y-2">
<p><strong>Well Done!</strong></p>
<p>You application is now successfully installed! You can login by clicking on "Log In" button below.</p>
@if (is_writable(base_path()))
<div class="flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 px-4 py-3 text-amber-800">
<i class="fa fa-exclamation-triangle mt-1 shrink-0" aria-hidden="true"></i>
<p>
<strong>Important!</strong> Since your root directory is still writable,
you can change the permissions to 755 to make it writable only by root user.
</p>
</div>
@endif
</div>
<div class="mt-6 flex justify-end">
<x-install.button :href="url('login')">
<i class="fa fa-sign-in" aria-hidden="true"></i>
Log In
</x-install.button>
</div>
</x-install.card>
@stop
@@ -0,0 +1,67 @@
@extends('layouts.install')
@section('content')
@include('install.steps', ['steps' => [
'welcome' => 'selected done',
'requirements' => 'selected done',
'permissions' => 'selected done',
'database' => 'selected'
]])
@if ($errors->any())
<div class="mb-4 rounded-md border border-red-200 bg-red-50 px-4 py-3 text-red-800" role="alert">
<ul class="space-y-1">
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<form action="{{ route('install.installation') }}" method="POST">
@csrf
<x-install.card title="Database Info">
<div class="space-y-4">
<x-install.field
name="host"
label="Host"
hint="Database host. Usually you should enter localhost or mysql."
/>
<x-install.field
name="username"
label="Username"
hint="Your database username."
/>
<x-install.field
name="password"
label="Password"
type="password"
hint="Database password for provided username."
/>
<x-install.field
name="database"
label="Database Name"
hint="Name of database where tables should be created."
/>
<x-install.field
name="prefix"
label="Tables Prefix"
hint="Prefix to put in front of database table names. You can leave it blank if you want."
/>
</div>
<div class="mt-6 flex justify-end">
<x-install.button type="submit">
Next
<i class="fa fa-arrow-right" aria-hidden="true"></i>
</x-install.button>
</div>
</x-install.card>
</form>
@stop
+31
View File
@@ -0,0 +1,31 @@
@extends('layouts.install')
@section('content')
@include('install.steps', ['steps' => [
'welcome' => 'selected done',
'requirements' => 'selected done',
'permissions' => 'selected done',
'database' => 'selected done',
'installation' => 'selected done',
'complete' => 'selected error'
]])
<x-install.card title="Whoops!">
<div class="space-y-2">
<p><strong>There was something wrong during the installation!</strong></p>
<p>
Please check your log located inside
<code class="rounded bg-slate-100 px-1.5 py-0.5">storage/logs</code>
directory to see what's going on.
</p>
</div>
<div class="mt-6 flex justify-end">
<x-install.button :href="route('install.start')">
<i class="fa fa-undo" aria-hidden="true"></i>
Try Again
</x-install.button>
</div>
</x-install.card>
@stop
@@ -0,0 +1,32 @@
@extends('layouts.install')
@section('content')
@include('install.steps', ['steps' => [
'welcome' => 'selected done',
'requirements' => 'selected done',
'permissions' => 'selected done',
'database' => 'selected done',
'installation' => 'selected'
]])
<form action="{{ route('install.install') }}" method="POST">
@csrf
<x-install.card title="Installation">
<div class="mb-4 space-y-2">
<p>Vanguard is ready to be installed!</p>
<p>Before you proceed, please provide the name for your application below:</p>
</div>
<x-install.field name="app_name" label="App Name" value="Vanguard" />
<div class="mt-6 flex justify-end">
<x-install.button type="submit" data-loading-text="Installing...">
<i class="fa fa-play" aria-hidden="true"></i>
Install
</x-install.button>
</div>
</x-install.card>
</form>
@stop
@@ -0,0 +1,35 @@
@extends('layouts.install')
@section('content')
@include('install.steps', ['steps' => [
'welcome' => 'selected done',
'requirements' => 'selected done',
'permissions' => 'selected'
]])
<x-install.card title="Permissions">
<ul class="mb-6 divide-y divide-slate-100 rounded-md border border-slate-200">
@foreach($folders as $path => $isWritable)
<li class="flex items-center justify-between gap-3 px-4 py-3 {{ ! $isWritable ? 'bg-red-50 text-red-800' : '' }}">
<span class="break-all">{{ $path }}</span>
<span class="flex shrink-0 items-center gap-2">
<span class="flex size-6 items-center justify-center rounded-full text-xs text-white {{ $isWritable ? 'bg-green-600' : 'bg-red-600' }}">
<i class="fa {{ $isWritable ? 'fa-check' : 'fa-times' }}" aria-hidden="true"></i>
</span>
<span class="rounded-full bg-slate-200 px-2 py-0.5 text-xs font-semibold text-slate-600">775</span>
</span>
</li>
@endforeach
</ul>
<div class="flex justify-end">
<x-install.button :href="route('install.database')">
Next
<i class="fa fa-arrow-right" aria-hidden="true"></i>
</x-install.button>
</div>
</x-install.card>
@stop
@@ -0,0 +1,37 @@
@extends('layouts.install')
@section('content')
@include('install.steps', ['steps' => ['welcome' => 'selected done', 'requirements' => 'selected']])
@if (! $allLoaded)
<div class="mb-4 flex items-start gap-2 rounded-md border border-red-200 bg-red-50 px-4 py-3 text-red-800" role="alert">
<i class="fa fa-times-circle mt-1 shrink-0" aria-hidden="true"></i>
<div>
<strong>Oh snap!</strong> Your system does not meet the requirements.
You have to fix them in order to continue.
</div>
</div>
@endif
<x-install.card title="System Requirements">
<ul class="mb-6 divide-y divide-slate-100 rounded-md border border-slate-200">
@foreach ($requirements as $extension => $loaded)
<li class="flex items-center justify-between px-4 py-3 {{ ! $loaded ? 'bg-red-50 text-red-800' : '' }}">
<span>{{ $extension }}</span>
<span class="flex size-6 items-center justify-center rounded-full text-xs text-white {{ $loaded ? 'bg-green-600' : 'bg-red-600' }}">
<i class="fa {{ $loaded ? 'fa-check' : 'fa-times' }}" aria-hidden="true"></i>
</span>
</li>
@endforeach
</ul>
<div class="flex justify-end">
<x-install.button :href="route('install.permissions')" :disabled="! $allLoaded">
Next
<i class="fa fa-arrow-right" aria-hidden="true"></i>
</x-install.button>
</div>
</x-install.card>
@stop
+23
View File
@@ -0,0 +1,23 @@
@extends('layouts.install')
@section('content')
@include('install.steps', ['steps' => ['welcome' => 'selected']])
<x-install.card title="Welcome">
<div class="space-y-2">
<p>This steps will guide you through few step installation process.</p>
<p>
When this installation process is finished, you will be able
to login and manage your users immediately!
</p>
</div>
<div class="mt-6 flex justify-end">
<x-install.button :href="route('install.requirements')">
Next
<i class="fa fa-arrow-right" aria-hidden="true"></i>
</x-install.button>
</div>
</x-install.card>
@stop
+57
View File
@@ -0,0 +1,57 @@
@php
/**
* The wizard progress bar.
*
* Callers pass $steps keyed by slug with the Bootstrap era token strings
* ("selected", "selected done", "selected error"), which are mapped to a
* state here so the call sites did not all have to change.
*/
$definitions = [
'welcome' => ['label' => 'Welcome', 'icon' => 'fa-home'],
'requirements' => ['label' => 'System Requirements', 'icon' => 'fa-list'],
'permissions' => ['label' => 'Permissions', 'icon' => 'fa-lock'],
'database' => ['label' => 'Database Info', 'icon' => 'fa-database'],
'installation' => ['label' => 'Installation', 'icon' => 'fa-terminal'],
'complete' => ['label' => 'Complete', 'icon' => 'fa-flag-checkered'],
];
$circles = [
'done' => 'bg-primary-600 text-white',
'current' => 'bg-primary-600 text-white ring-4 ring-primary-100',
'error' => 'bg-red-600 text-white ring-4 ring-red-100',
'upcoming' => 'bg-slate-100 text-slate-400',
];
$labels = [
'done' => 'text-slate-600',
'current' => 'text-primary-600 font-medium',
'error' => 'text-red-600 font-medium',
'upcoming' => 'text-slate-400',
];
@endphp
<ol class="mb-8 flex items-start justify-between gap-1">
@foreach ($definitions as $slug => $definition)
@php
$token = $steps[$slug] ?? '';
$state = match (true) {
str_contains($token, 'error') => 'error',
str_contains($token, 'done') => 'done',
str_contains($token, 'selected') => 'current',
default => 'upcoming',
};
@endphp
<li class="flex flex-1 flex-col items-center gap-2 text-center">
<span
class="flex size-10 items-center justify-center rounded-full transition-colors {{ $circles[$state] }}"
@if ($state === 'current') aria-current="step" @endif
>
<i class="fa {{ $state === 'done' ? 'fa-check' : $definition['icon'] }}" aria-hidden="true"></i>
</span>
<span class="text-xs leading-tight {{ $labels[$state] }}">{{ $definition['label'] }}</span>
</li>
@endforeach
</ol>