mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-21 08:25:45 +00:00
feat(ui): polish domains, storage, env vars and resource nav
Improve project resource UIs: sort domains by DNS failure, stop re-adding www pairs on refresh, lazy-load storage tabs with counts, tighten env-var tables, keep application tabs active across Livewire polls, unify database type labels, and update related CSS/JS and tests.
This commit is contained in:
@@ -24,7 +24,7 @@ class Configuration extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->currentRoute = request()->route()->getName();
|
||||
$this->syncCurrentRoute();
|
||||
|
||||
$project = currentTeam()
|
||||
->projects()
|
||||
@@ -36,10 +36,14 @@ class Configuration extends Component
|
||||
->where('uuid', request()->route('environment_uuid'))
|
||||
->firstOrFail();
|
||||
$application = $environment->applications()
|
||||
->with(['destination'])
|
||||
->with(['destination.server', 'environment.project'])
|
||||
->where('uuid', request()->route('application_uuid'))
|
||||
->firstOrFail();
|
||||
|
||||
// Parent page already resolved these; keep them on the model for nested components.
|
||||
$application->setRelation('environment', $environment);
|
||||
$environment->setRelation('project', $project);
|
||||
|
||||
$this->project = $project;
|
||||
$this->environment = $environment;
|
||||
$this->application = $application;
|
||||
@@ -49,8 +53,23 @@ class Configuration extends Component
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Keep sidebar active state in sync on full-page navigations.
|
||||
* Ignore Livewire update requests so poll/refresh does not clear it.
|
||||
*/
|
||||
protected function syncCurrentRoute(): void
|
||||
{
|
||||
$routeName = request()->route()?->getName();
|
||||
|
||||
if (is_string($routeName) && str_starts_with($routeName, 'project.application.')) {
|
||||
$this->currentRoute = $routeName;
|
||||
}
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
$this->syncCurrentRoute();
|
||||
|
||||
return view('livewire.project.application.configuration');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user