mirror of
https://github.com/coollabsio/coolify.git
synced 2026-09-27 17:55:59 -04:00
feat(v5): add Inertia app shell with Flux health
Adds v5 routing, middleware, home page rendering, team context sharing, project model/table support, and Flux health reporting. Installs Flux in container builds with role-aware s6 services and documents runtime roles.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: 'Geist Sans';
|
||||
font-style: normal;
|
||||
font-weight: 100 900;
|
||||
src: url('../../fonts/geist-sans-variable.woff2') format('woff2');
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Geist Sans', sans-serif;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
import { Head } from '@inertiajs/react';
|
||||
|
||||
export default function Home({ status, currentTeam, teams, flux }) {
|
||||
return (
|
||||
<>
|
||||
<Head title="V5" />
|
||||
|
||||
<main>
|
||||
<p>{status}</p>
|
||||
|
||||
<h1>Coolify v5</h1>
|
||||
|
||||
<p>
|
||||
This page is served from Laravel through Inertia and React, with routes,
|
||||
assets, and future v5 tables isolated from the current v4 Livewire app.
|
||||
</p>
|
||||
|
||||
<section aria-labelledby="flux-status-heading">
|
||||
<h2 id="flux-status-heading">Flux status</h2>
|
||||
|
||||
<p>
|
||||
<strong>{flux.label}</strong>
|
||||
</p>
|
||||
|
||||
<p>{flux.message}</p>
|
||||
|
||||
{flux.socket ? <p>Socket: {flux.socket}</p> : null}
|
||||
</section>
|
||||
|
||||
<h2>Current team</h2>
|
||||
|
||||
{currentTeam ? (
|
||||
<dl>
|
||||
<dt>Name</dt>
|
||||
<dd>{currentTeam.name}</dd>
|
||||
|
||||
<dt>Description</dt>
|
||||
<dd>{currentTeam.description || 'No description'}</dd>
|
||||
|
||||
<dt>Your role</dt>
|
||||
<dd>{currentTeam.role}</dd>
|
||||
</dl>
|
||||
) : (
|
||||
<p>No team selected.</p>
|
||||
)}
|
||||
|
||||
<h2>Your teams</h2>
|
||||
|
||||
<ul>
|
||||
{teams.map((team) => (
|
||||
<li key={team.id}>
|
||||
{team.name} ({team.role})
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</main>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { createInertiaApp } from '@inertiajs/react';
|
||||
import '../../css/v5/app.css';
|
||||
|
||||
createInertiaApp({
|
||||
id: 'v5-app',
|
||||
pages: {
|
||||
path: './Pages',
|
||||
extension: '.jsx',
|
||||
},
|
||||
strictMode: true,
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<title inertia>{{ config('app.name') }} v5</title>
|
||||
@viteReactRefresh
|
||||
@vite('resources/js/v5/app.jsx')
|
||||
<x-inertia::head />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<x-inertia::app id="v5-app" />
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user