feat(ui): Shadow UI redesign, domain management, and DNS autoconfigure (#11119)

Co-authored-by: ShadowArcanist <162910371+ShadowArcanist@users.noreply.github.com>
This commit is contained in:
Andras BacsaiandShadowArcanist authored and GitHub committed 2026-08-03 23:11:54 +02:00
1 parent 0b843bb07c
commit 8ae56587d5
497 files changed
+44045 -22630

No files matched your search

+63 -3
View File
@@ -5,6 +5,7 @@ namespace App\Livewire\Project;
use App\Models\Environment;
use App\Models\Project;
use App\Support\ValidationPatterns;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Livewire\Component;
@@ -34,7 +35,25 @@ class Show extends Component
public function mount(string $project_uuid)
{
try {
$this->project = Project::where('team_id', currentTeam()->id)->where('uuid', $project_uuid)->firstOrFail();
$this->project = Project::where('team_id', currentTeam()->id)
->where('uuid', $project_uuid)
->with([
'environments' => fn ($query) => $query
->withCount([
'applications',
'services',
'postgresqls',
'redis',
'keydbs',
'dragonflies',
'clickhouses',
'mongodbs',
'mysqls',
'mariadbs',
])
->orderBy('created_at'),
])
->firstOrFail();
} catch (\Throwable $e) {
return handleError($e, $this);
}
@@ -68,8 +87,49 @@ class Show extends Component
]);
}
public function render()
public function render(): View
{
return view('livewire.project.show');
$canUpdateProject = auth()->user()->can('update', $this->project);
$canCreateResource = auth()->user()->can('createAnyResource');
return view('livewire.project.show', [
'environmentsJs' => $this->project->environments->map(function (Environment $environment) use ($canCreateResource, $canUpdateProject): array {
$resourceCount = collect([
$environment->applications_count,
$environment->services_count,
$environment->postgresqls_count,
$environment->redis_count,
$environment->keydbs_count,
$environment->dragonflies_count,
$environment->clickhouses_count,
$environment->mongodbs_count,
$environment->mysqls_count,
$environment->mariadbs_count,
])->sum();
return [
'uuid' => $environment->uuid,
'name' => $environment->name,
'description' => $environment->description,
'resourceCount' => $resourceCount,
'href' => route('project.resource.index', [
'project_uuid' => $this->project->uuid,
'environment_uuid' => $environment->uuid,
]),
'settingsHref' => $canUpdateProject
? route('project.environment.edit', [
'project_uuid' => $this->project->uuid,
'environment_uuid' => $environment->uuid,
])
: null,
'addResourceHref' => $canCreateResource
? route('project.resource.create', [
'project_uuid' => $this->project->uuid,
'environment_uuid' => $environment->uuid,
])
: null,
];
})->values()->toArray(),
]);
}
}