feat: add installer, ranks/groups enhancements, and founder protections
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
@vite(['resources/js/main.jsx'])
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"></div>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
55
resources/views/installer-success.blade.php
Normal file
55
resources/views/installer-success.blade.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>speedBB Installed</title>
|
||||
<style>
|
||||
:root {
|
||||
color-scheme: dark;
|
||||
font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
|
||||
background: #0b0f17;
|
||||
color: #e6e8eb;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 2rem 1rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.card {
|
||||
width: 100%;
|
||||
max-width: 560px;
|
||||
background: rgba(18, 23, 33, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: 16px;
|
||||
padding: 2rem;
|
||||
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
|
||||
text-align: center;
|
||||
}
|
||||
h1 {
|
||||
margin: 0 0 0.5rem;
|
||||
}
|
||||
p {
|
||||
margin: 0 0 1.5rem;
|
||||
color: #9aa4b2;
|
||||
}
|
||||
a {
|
||||
display: inline-flex;
|
||||
padding: 0.7rem 1.5rem;
|
||||
border-radius: 12px;
|
||||
background: #ff8a3d;
|
||||
color: #1a1a1a;
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="card">
|
||||
<h1>Installation complete</h1>
|
||||
<p>Your forum is ready. You can now log in with the founder account.</p>
|
||||
<a href="/">Go to forum</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
165
resources/views/installer.blade.php
Normal file
165
resources/views/installer.blade.php
Normal file
@@ -0,0 +1,165 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>speedBB Installer</title>
|
||||
<style>
|
||||
:root {
|
||||
color-scheme: dark;
|
||||
font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
|
||||
background: #0b0f17;
|
||||
color: #e6e8eb;
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 2rem 1rem 4rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.card {
|
||||
width: 100%;
|
||||
max-width: 720px;
|
||||
background: rgba(18, 23, 33, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: 16px;
|
||||
padding: 2rem;
|
||||
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
h1 {
|
||||
margin: 0 0 0.5rem;
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
p {
|
||||
margin: 0 0 1.5rem;
|
||||
color: #9aa4b2;
|
||||
}
|
||||
.section {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: 0.4rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
input {
|
||||
width: 100%;
|
||||
padding: 0.65rem 0.75rem;
|
||||
border-radius: 10px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||
background: rgba(12, 16, 24, 0.9);
|
||||
color: #e6e8eb;
|
||||
min-width: 0;
|
||||
}
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
.grid--wide {
|
||||
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
||||
}
|
||||
.error {
|
||||
background: rgba(220, 80, 80, 0.15);
|
||||
border: 1px solid rgba(220, 80, 80, 0.4);
|
||||
color: #ffb4b4;
|
||||
padding: 0.75rem;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
button {
|
||||
padding: 0.7rem 1.5rem;
|
||||
border-radius: 12px;
|
||||
border: none;
|
||||
background: #ff8a3d;
|
||||
color: #1a1a1a;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="card">
|
||||
<h1>speedBB Installer</h1>
|
||||
<p>Provide database details and create the first founder/admin account.</p>
|
||||
|
||||
@if (!empty($error))
|
||||
<div class="error">{{ $error }}</div>
|
||||
@endif
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="error">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $message)
|
||||
<li>{{ $message }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="/install">
|
||||
@csrf
|
||||
<div class="section">
|
||||
<h2>Application</h2>
|
||||
<label for="app_url">App URL</label>
|
||||
<input id="app_url" name="app_url" type="url" required value="{{ old('app_url', $old['app_url'] ?? $appUrl) }}" />
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Database (MySQL/MariaDB)</h2>
|
||||
<div class="grid">
|
||||
<div>
|
||||
<label for="db_host">Host</label>
|
||||
<input id="db_host" name="db_host" required value="{{ old('db_host', $old['db_host'] ?? '127.0.0.1') }}" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="db_port">Port</label>
|
||||
<input id="db_port" name="db_port" type="number" value="{{ old('db_port', $old['db_port'] ?? 3306) }}" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="db_database">Database</label>
|
||||
<input id="db_database" name="db_database" required value="{{ old('db_database', $old['db_database'] ?? '') }}" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="db_username">Username</label>
|
||||
<input id="db_username" name="db_username" required value="{{ old('db_username', $old['db_username'] ?? '') }}" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="db_password">Password</label>
|
||||
<input id="db_password" name="db_password" type="password" value="{{ old('db_password', $old['db_password'] ?? '') }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Founder Account</h2>
|
||||
<div class="grid grid--wide">
|
||||
<div>
|
||||
<label for="admin_name">Username</label>
|
||||
<input id="admin_name" name="admin_name" required value="{{ old('admin_name', $old['admin_name'] ?? '') }}" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="admin_email">Email</label>
|
||||
<input id="admin_email" name="admin_email" type="email" required value="{{ old('admin_email', $old['admin_email'] ?? '') }}" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="admin_password">Password</label>
|
||||
<input id="admin_password" name="admin_password" type="password" required />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<button type="submit">Install speedBB</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user