fix(ui): restore Tailwind v4 @theme tokens + disable /register route (invite-only)

- Restore app.css with Tailwind v4 @import and @theme design tokens (Breeze had overwritten with v3 directives)
- Add @tailwindcss/vite tailwindcss() plugin back to vite.config.js
- Upgrade tailwindcss in package.json from ^3.1.0 to ^4.0.0; remove @tailwindcss/forms and autoprefixer (v3-only)
- Delete postcss.config.js (v3 PostCSS plugin, not needed for v4 Vite plugin)
- Comment out Volt::route('register', ...) in routes/auth.php — platform is invite-only
- Update RegistrationTest to assert /register returns 404 instead of 200

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Boban Blaskovic 2026-05-22 06:03:31 +02:00
parent 26f508395d
commit 0f3a48604e
7 changed files with 49 additions and 892 deletions

875
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -7,13 +7,10 @@
"dev": "vite"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.2",
"@tailwindcss/vite": "^4.0.0",
"autoprefixer": "^10.4.2",
"concurrently": "^9.0.1",
"laravel-vite-plugin": "^3.1",
"postcss": "^8.4.31",
"tailwindcss": "^3.1.0",
"tailwindcss": "^4.0.0",
"vite": "^8.0.0",
"vite-plugin-pwa": "^1.3.0"
}

View File

@ -1,6 +0,0 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};

View File

@ -1,3 +1,33 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";
@theme {
--color-bg-base: #f0eee9;
--color-text-primary: oklch(0.22 0.015 270);
--color-text-secondary: oklch(0.42 0.012 270);
--color-text-muted: oklch(0.58 0.01 270);
--color-border-subtle: oklch(0.92 0.006 85);
--font-display: 'Plus Jakarta Sans', sans-serif;
--font-mono: 'JetBrains Mono', monospace;
}
@font-face {
font-family: 'Plus Jakarta Sans';
src: url('/fonts/PlusJakartaSans-VariableFont_wght.woff2') format('woff2');
font-weight: 100 900;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'JetBrains Mono';
src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
}
body {
background-color: var(--color-bg-base);
color: var(--color-text-primary);
font-family: var(--font-display);
}

View File

@ -5,8 +5,9 @@ use Illuminate\Support\Facades\Route;
use Livewire\Volt\Volt;
Route::middleware('guest')->group(function () {
Volt::route('register', 'pages.auth.register')
->name('register');
// Registration disabled — Lernschiff is invite-only.
// Volt::route('register', 'pages.auth.register')
// ->name('register');
Volt::route('login', 'pages.auth.login')
->name('login');

View File

@ -2,14 +2,12 @@
namespace Tests\Feature\Auth;
use Livewire\Volt\Volt;
// Lernschiff is invite-only. Self-registration is disabled.
// Users are created by school-admin or platform-admin via invite.
test('registration screen can be rendered', function () {
$response = $this->get('/register');
$response
->assertOk()
->assertSeeVolt('pages.auth.register');
test('registration screen is disabled (invite-only)', function () {
// /register route is commented out in routes/auth.php — expect 404.
$this->get('/register')->assertNotFound();
});
test('new users can register', function () {

View File

@ -1,8 +1,10 @@
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
plugins: [
tailwindcss(),
laravel({
input: ['resources/css/app.css', 'resources/js/app.js', 'resources/js/auth.js'],
refresh: true,