fix: routing, switch back to old one

This commit is contained in:
Andras Bacsai 2023-12-27 16:45:01 +01:00
parent 8c20c833ba
commit f03aa57758
70 changed files with 961 additions and 322 deletions

View File

@ -47,7 +47,7 @@ protected function unauthenticated($request, AuthenticationException $exception)
if ($request->is('api/*') || $request->expectsJson() || $this->shouldReturnJson($request, $exception)) {
return response()->json(['message' => $exception->getMessage()], 401);
}
return redirect()->guest($exception->redirectTo() ?? route('login'));
return redirect()->guest($exception->redirectTo() ?? route('login'));
}
/**
* Register the exception handling callbacks for the application.

View File

@ -2,6 +2,7 @@
namespace App\Http\Middleware;
use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
@ -16,7 +17,7 @@ public function handle(Request $request, Closure $next): Response
}
if (!auth()->user() || !isCloud() || isInstanceAdmin()) {
if (!isCloud() && showBoarding() && !in_array($request->path(), allowedPathsForBoardingAccounts())) {
return redirect('boarding');
return redirect()->route('boarding');
}
return $next($request);
}
@ -24,27 +25,27 @@ public function handle(Request $request, Closure $next): Response
if ($request->path() === 'verify' || in_array($request->path(), allowedPathsForInvalidAccounts()) || $request->routeIs('verify.verify')) {
return $next($request);
}
return redirect('/verify');
return redirect()-route('verify.email');
}
if (!isSubscriptionActive() && !isSubscriptionOnGracePeriod()) {
if (!in_array($request->path(), allowedPathsForUnsubscribedAccounts())) {
if (Str::startsWith($request->path(), 'invitations')) {
return $next($request);
}
return redirect('subscription');
return redirect()->route('subscription');
}
}
if (showBoarding() && !in_array($request->path(), allowedPathsForBoardingAccounts())) {
if (Str::startsWith($request->path(), 'invitations')) {
return $next($request);
}
return redirect('boarding');
return redirect()->route('boarding');
}
if (auth()->user()->hasVerifiedEmail() && $request->path() === 'verify') {
return redirect('/');
return redirect(RouteServiceProvider::HOME);
}
if (isSubscriptionActive() && $request->path() === 'subscription') {
return redirect('/');
return redirect(RouteServiceProvider::HOME);
}
return $next($request);
}

View File

@ -37,7 +37,7 @@ public function submit()
} catch (\Throwable $e) {
session()->flash('error', 'Something went wrong. Please contact support. <br>Error: ' . $e->getMessage());
ray($e->getMessage());
return $this->redirect('/settings/license', navigate: true);
return redirect()->route('settings.license');
}
}
}

View File

@ -36,7 +36,7 @@ public function delete()
instant_remote_process(['docker network rm -f ' . $this->destination->network], $this->destination->server);
}
$this->destination->delete();
return $this->redirectRoute('dashboard', navigate: true);
return redirect()->route('dashboard');
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -86,7 +86,7 @@ public function submit()
}
}
$this->createNetworkAndAttachToProxy();
return $this->redirectRoute('destination.show', $docker->uuid, navigate: true);
return redirect()->route('destination.show', $docker->uuid);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -35,7 +35,7 @@ public function submit()
if ($firstLogin) {
send_internal_notification('First login for ' . auth()->user()->email);
}
return $this->redirectRoute('dashboard', navigate: true);
return redirect()->route('dashboard');
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -35,7 +35,7 @@ public function delete()
if ($this->private_key->isEmpty()) {
$this->private_key->delete();
currentTeam()->privateKeys = PrivateKey::where('team_id', currentTeam()->id)->get();
return $this->redirectRoute('security.private-key.index', navigate: true);
return redirect()->route('security.private-key.index');
}
$this->dispatch('error', 'This private key is in use and cannot be deleted. Please delete all servers, applications, and GitHub/GitLab apps that use this private key before deleting it.');
} catch (\Throwable $e) {

View File

@ -67,9 +67,9 @@ public function createPrivateKey()
'team_id' => currentTeam()->id
]);
if ($this->from === 'server') {
return $this->redirectRoute('server.create', navigate: true);
return redirect()->route('server.create');
}
return $this->redirectRoute('security.private-key.show', ['private_key_uuid' => $private_key->uuid], navigate: true);
return redirect()->route('security.private-key.show', ['private_key_uuid' => $private_key->uuid]);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -27,7 +27,7 @@ public function submit()
'description' => $this->description,
'team_id' => currentTeam()->id,
]);
return $this->redirectRoute('project.show', $project->uuid, navigate: true);
return redirect()->route('project.show', $project->uuid);
} catch (\Throwable $e) {
return handleError($e, $this);
} finally {

View File

@ -27,10 +27,10 @@ public function submit()
'project_id' => $this->project->id,
]);
return $this->redirectRoute('project.resources', [
return redirect()->route('project.resources', [
'project_uuid' => $this->project->uuid,
'environment_name' => $environment->name,
], navigate: true);
]);
} catch (\Throwable $e) {
handleError($e, $this);
} finally {

View File

@ -15,15 +15,15 @@ public function mount()
{
$project = currentTeam()->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first();
if (!$project) {
return $this->redirectRoute('dashboard', navigate: true);
return redirect()->route('dashboard');
}
$environment = $project->load(['environments'])->environments->where('name', request()->route('environment_name'))->first()->load(['applications']);
if (!$environment) {
return $this->redirectRoute('dashboard', navigate: true);
return redirect()->route('dashboard');
}
$application = $environment->applications->where('uuid', request()->route('application_uuid'))->first();
if (!$application) {
return $this->redirectRoute('dashboard', navigate: true);
return redirect()->route('dashboard');
}
$this->application = $application;
$mainServer = $this->application->destination->server;

View File

@ -60,12 +60,12 @@ public function deployNew()
force_rebuild: false,
is_new_deployment: true,
);
return $this->redirectRoute('project.application.deployment', [
return redirect()->route('project.application.deployment', [
'project_uuid' => $this->parameters['project_uuid'],
'application_uuid' => $this->parameters['application_uuid'],
'deployment_uuid' => $this->deploymentUuid,
'environment_name' => $this->parameters['environment_name'],
], navigate: true);
]);
}
public function deploy(bool $force_rebuild = false)
{
@ -83,12 +83,12 @@ public function deploy(bool $force_rebuild = false)
deployment_uuid: $this->deploymentUuid,
force_rebuild: $force_rebuild,
);
$this->redirectRoute('project.application.deployment', [
return redirect()->route('project.application.deployment', [
'project_uuid' => $this->parameters['project_uuid'],
'application_uuid' => $this->parameters['application_uuid'],
'deployment_uuid' => $this->deploymentUuid,
'environment_name' => $this->parameters['environment_name'],
], navigate: true);
]);
}
protected function setDeploymentUuid()
@ -113,12 +113,12 @@ public function restartNew()
restart_only: true,
is_new_deployment: true,
);
return $this->redirectRoute('project.application.deployment', [
return redirect()->route('project.application.deployment', [
'project_uuid' => $this->parameters['project_uuid'],
'application_uuid' => $this->parameters['application_uuid'],
'deployment_uuid' => $this->deploymentUuid,
'environment_name' => $this->parameters['environment_name'],
], navigate: true);
]);
}
public function restart()
{
@ -128,11 +128,11 @@ public function restart()
deployment_uuid: $this->deploymentUuid,
restart_only: true,
);
return $this->redirectRoute('project.application.deployment', [
return redirect()->route('project.application.deployment', [
'project_uuid' => $this->parameters['project_uuid'],
'application_uuid' => $this->parameters['application_uuid'],
'deployment_uuid' => $this->deploymentUuid,
'environment_name' => $this->parameters['environment_name'],
], navigate: true);
]);
}
}

View File

@ -52,12 +52,12 @@ public function deploy(int $pull_request_id, string|null $pull_request_html_url
force_rebuild: true,
pull_request_id: $pull_request_id,
);
return $this->redirectRoute('project.application.deployment', [
return redirect()->route('project.application.deployment', [
'project_uuid' => $this->parameters['project_uuid'],
'application_uuid' => $this->parameters['application_uuid'],
'deployment_uuid' => $this->deployment_uuid,
'environment_name' => $this->parameters['environment_name'],
], navigate: true);
]);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -29,12 +29,12 @@ public function rollbackImage($commit)
commit: $commit,
force_rebuild: false,
);
return $this->redirectRoute('project.application.deployment', [
return redirect()->route('project.application.deployment', [
'project_uuid' => $this->parameters['project_uuid'],
'application_uuid' => $this->parameters['application_uuid'],
'deployment_uuid' => $deployment_uuid,
'environment_name' => $this->parameters['environment_name'],
], navigate: true);
]);
}
public function loadImages($showToast = false)

View File

@ -152,10 +152,10 @@ public function clone()
}
$newService->parse();
}
return $this->redirectRoute('project.resources', [
return redirect()->route('project.resources', [
'project_uuid' => $newProject->uuid,
'environment_name' => $newEnvironment->name,
], navigate: true);
]);
} catch (\Exception $e) {
return handleError($e, $this);
}

View File

@ -50,9 +50,9 @@ public function delete()
$url = $url->withoutQueryParameter('selectedBackupId');
$url = $url->withFragment('backups');
$url = $url->getPath() . "#{$url->getFragment()}";
return $this->redirect($url,navigate: true);
return redirect($url);
} else {
return $this->redirectRoute('project.database.backups.all', $this->parameters);
return redirect()->route('project.database.backups.all', $this->parameters);
}
}

View File

@ -23,7 +23,7 @@ public function delete()
$environment = Environment::findOrFail($this->environment_id);
if ($environment->isEmpty()) {
$environment->delete();
return $this->redirectRoute('project.show', ['project_uuid' => $this->parameters['project_uuid']], navigate: true);
return redirect()->route('project.show', ['project_uuid' => $this->parameters['project_uuid']]);
}
return $this->dispatch('error', 'Environment has defined resources, please delete them first.');
}

View File

@ -25,6 +25,6 @@ public function delete()
return $this->dispatch('error', 'Project has resources defined, please delete them first.');
}
$project->delete();
return $this->redirectRoute('projects', navigate: true);
return redirect()->route('projects');
}
}

View File

@ -69,12 +69,12 @@ public function submit()
$service->parse(isNew: true);
return $this->redirectRoute('project.service.configuration', [
return redirect()->route('project.service.configuration', [
'service_uuid' => $service->uuid,
'environment_name' => $environment->name,
'project_uuid' => $project->uuid,
]);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -64,11 +64,11 @@ public function submit()
'name' => 'docker-image-' . $application->uuid,
'fqdn' => $fqdn
]);
return $this->redirectRoute('project.application.configuration', [
return redirect()->route('project.application.configuration', [
'application_uuid' => $application->uuid,
'environment_name' => $environment->name,
'project_uuid' => $project->uuid,
], navigate: false);
]);
}
public function render()
{

View File

@ -13,6 +13,6 @@ public function createEmptyProject()
'name' => generate_random_name(),
'team_id' => currentTeam()->id,
]);
return $this->redirectRoute('project.show', ['project_uuid' => $project->uuid, 'environment_name' => 'production'], navigate: false);
return redirect()->route('project.show', ['project_uuid' => $project->uuid, 'environment_name' => 'production']);
}
}

View File

@ -151,11 +151,11 @@ public function submit()
$application->name = generate_application_name($this->selected_repository_owner . '/' . $this->selected_repository_repo, $this->selected_branch_name, $application->uuid);
$application->save();
return $this->redirectRoute('project.application.configuration', [
return redirect()->route('project.application.configuration', [
'application_uuid' => $application->uuid,
'environment_name' => $environment->name,
'project_uuid' => $project->uuid,
], navigate: false);
]);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -132,11 +132,11 @@ public function submit()
$application->name = generate_random_name($application->uuid);
$application->save();
return $this->redirectRoute('project.application.configuration', [
return redirect()->route('project.application.configuration', [
'application_uuid' => $application->uuid,
'environment_name' => $environment->name,
'project_uuid' => $project->uuid,
], navigate: false);
]);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -184,11 +184,11 @@ public function submit()
$application->fqdn = $fqdn;
$application->save();
return $this->redirectRoute('project.application.configuration', [
return redirect()->route('project.application.configuration', [
'application_uuid' => $application->uuid,
'environment_name' => $environment->name,
'project_uuid' => $project->uuid,
], navigate: false);
]);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -55,10 +55,10 @@ public function render()
public function updatedSelectedEnvironment()
{
return $this->redirectRoute('project.resources.new', [
return redirect()->route('project.resources.new', [
'project_uuid' => $this->parameters['project_uuid'],
'environment_name' => $this->selectedEnvironment,
], navigate: true);
]);
}
// public function addExistingPostgresql()

View File

@ -70,10 +70,10 @@ public function submit()
'fqdn' => $fqdn
]);
return $this->redirectRoute('project.application.configuration', [
return redirect()->route('project.application.configuration', [
'application_uuid' => $application->uuid,
'environment_name' => $environment->name,
'project_uuid' => $project->uuid,
], navigate: false);
]);
}
}

View File

@ -41,7 +41,7 @@ public function delete()
try {
$this->application->delete();
$this->dispatch('success', 'Application deleted successfully.');
return $this->redirectRoute('project.service.configuration', $this->parameters, navigate: true);
return redirect()->route('project.service.configuration', $this->parameters);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -25,10 +25,10 @@ public function delete()
{
try {
DeleteResourceJob::dispatchSync($this->resource);
return $this->redirectRoute('project.resources', [
return redirect()->route('project.resources', [
'project_uuid' => $this->projectUuid,
'environment_name' => $this->environmentName
], navigate: true);
]);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -19,7 +19,7 @@ public function delete()
return;
}
$this->server->delete();
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -15,7 +15,7 @@ public function mount()
try {
$this->server = Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->first();
if (is_null($this->server)) {
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
}
} catch (\Throwable $e) {
return handleError($e, $this);

View File

@ -43,7 +43,7 @@ public function mount()
try {
$server = Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->first();
if (is_null($server)) {
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
}
$this->server = $server;
} catch (\Throwable $e) {

View File

@ -93,7 +93,7 @@ public function submit()
$server->settings->is_swarm_worker = $this->is_swarm_worker;
$server->settings->save();
$server->addInitialNetwork();
return $this->redirectRoute('server.show', $server->uuid);
return redirect()->route('server.show', $server->uuid);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -17,7 +17,7 @@ public function mount()
try {
$this->server = Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->first();
if (is_null($this->server)) {
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
}
$this->privateKeys = PrivateKey::ownedByCurrentTeam()->get()->where('is_git_related', false);
} catch (\Throwable $e) {

View File

@ -15,7 +15,7 @@ public function mount()
try {
$this->server = Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->first();
if (is_null($this->server)) {
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
}
} catch (\Throwable $e) {
return handleError($e, $this);

View File

@ -20,7 +20,7 @@ public function mount()
try {
$this->server = Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->first();
if (is_null($this->server)) {
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
}
} catch (\Throwable $e) {
return handleError($e, $this);

View File

@ -17,7 +17,7 @@ public function mount()
try {
$this->server = Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->first();
if (is_null($this->server)) {
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
}
} catch (\Throwable $e) {

View File

@ -41,7 +41,7 @@ public function mount()
$github_app_uuid = request()->github_app_uuid;
$this->github_app = GithubApp::where('uuid', $github_app_uuid)->first();
if (!$this->github_app) {
return $this->redirectRoute('source.all', navigate: true);
return redirect()->route('source.all');
}
$settings = InstanceSettings::get();
$this->github_app->makeVisible('client_secret')->makeVisible('webhook_secret');
@ -67,7 +67,7 @@ public function mount()
$type = data_get($parameters, 'type');
$destination = data_get($parameters, 'destination');
session()->forget('from');
return $this->redirectRoute($back, [
return redirect()->route($back, [
'environment_name' => $environment_name,
'project_uuid' => $project_uuid,
'type' => $type,
@ -117,7 +117,7 @@ public function delete()
{
try {
$this->github_app->delete();
return $this->redirectRoute('source.all', navigate: true);
return redirect()->route('source.all');
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -48,7 +48,7 @@ public function createGitHubApp()
if (session('from')) {
session(['from' => session('from') + ['source_id' => $github_app->id]]);
}
return $this->redirectRoute('source.github.show', ['github_app_uuid' => $github_app->uuid], navigate: true);
return redirect()->route('source.github.show', ['github_app_uuid' => $github_app->uuid]);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -3,6 +3,7 @@
namespace App\Livewire\Subscription;
use App\Models\InstanceSettings;
use App\Providers\RouteServiceProvider;
use Livewire\Component;
class Show extends Component
@ -11,7 +12,7 @@ class Show extends Component
public bool $alreadySubscribed = false;
public function mount() {
if (!isCloud()) {
return $this->redirect('/', navigate: true);
return redirect(RouteServiceProvider::HOME);
}
$this->settings = InstanceSettings::get();
$this->alreadySubscribed = currentTeam()->subscription()->exists();

View File

@ -30,7 +30,7 @@ public function submit()
]);
auth()->user()->teams()->attach($team, ['role' => 'admin']);
refreshSession();
return $this->redirectRoute('team.index', navigate: true);
return redirect()->route('team.index');
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -24,6 +24,6 @@ public function delete()
});
refreshSession();
return $this->redirectRoute('team.index', navigate: true);
return redirect()->route('team.index');
}
}

View File

@ -65,7 +65,7 @@ public function submit()
$this->storage->team_id = currentTeam()->id;
$this->storage->testConnection();
$this->storage->save();
return $this->redirectRoute('team.storages.show', $this->storage->uuid, navigate: true);
return redirect()->route('team.storages.show', $this->storage->uuid);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -43,7 +43,7 @@ public function delete()
{
try {
$this->storage->delete();
return $this->redirectRoute('team.storages.all', navigate: true);
return redirect()->route('team.storages.all');
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@ -24,7 +24,7 @@ public function render()
public function mount()
{
if (config('coolify.waitlist') == false) {
return $this->redirectRoute('register', navigate: true);
return redirect()->route('register');
}
$this->waitingInLine = Waitlist::whereVerified(true)->count();
$this->users = User::count();

View File

@ -31,9 +31,9 @@ public function toResponse($request)
{
// First user (root) will be redirected to /settings instead of / on registration.
if ($request->user()->currentTeam->id === 0) {
return redirect('/settings');
return redirect()->route('settings.configuration');
}
return redirect('/');
return redirect(RouteServiceProvider::HOME);
}
});
}

991
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,19 @@
<div class="navbar-main">
<a wire:navigate class="{{ request()->routeIs('project.application.configuration') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('project.application.configuration') ? 'text-white' : '' }}"
href="{{ route('project.application.configuration', $parameters) }}">
<button>Configuration</button>
</a>
@if(!$application->destination->server->isSwarm())
<a wire:navigate class="{{ request()->routeIs('project.application.command') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('project.application.command') ? 'text-white' : '' }}"
href="{{ route('project.application.command', $parameters) }}">
<button>Execute Command</button>
</a>
@endif
<a wire:navigate class="{{ request()->routeIs('project.application.logs') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('project.application.logs') ? 'text-white' : '' }}"
href="{{ route('project.application.logs', $parameters) }}">
<button>Logs</button>
</a>
<a wire:navigate class="{{ request()->routeIs('project.application.deployments') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('project.application.deployments') ? 'text-white' : '' }}"
href="{{ route('project.application.deployments', $parameters) }}">
<button>Deployments</button>
</a>

View File

@ -1,13 +1,13 @@
<div class="navbar-main">
<a wire:navigate class="{{ request()->routeIs('project.database.configuration') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('project.database.configuration') ? 'text-white' : '' }}"
href="{{ route('project.database.configuration', $parameters) }}">
<button>Configuration</button>
</a>
<a wire:navigate class="{{ request()->routeIs('project.database.command') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('project.database.command') ? 'text-white' : '' }}"
href="{{ route('project.database.command', $parameters) }}">
<button>Execute Command</button>
</a>
<a wire:navigate class="{{ request()->routeIs('project.database.logs') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('project.database.logs') ? 'text-white' : '' }}"
href="{{ route('project.database.logs', $parameters) }}">
<button>Logs</button>
</a>
@ -16,7 +16,7 @@
$database->getMorphClass() === 'App\Models\StandaloneMongodb' ||
$database->getMorphClass() === 'App\Models\StandaloneMysql' ||
$database->getMorphClass() === 'App\Models\StandaloneMariadb')
<a wire:navigate class="{{ request()->routeIs('project.database.backups.all') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('project.database.backups.all') ? 'text-white' : '' }}"
href="{{ route('project.database.backups.all', $parameters) }}">
<button>Backups</button>
</a>

View File

@ -4,7 +4,7 @@
class="transition rounded w-11 h-11" src="{{ asset('coolify-transparent.png') }}"></a>
<ul class="flex flex-col h-full gap-4 menu flex-nowrap">
<li title="Dashboard">
<a wire:navigate class="hover:bg-transparent" href="/">
<a class="hover:bg-transparent" href="/">
<svg xmlns="http://www.w3.org/2000/svg" class="{{ request()->is('/') ? 'text-warning icon' : 'icon' }}"
fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
@ -13,7 +13,7 @@ class="transition rounded w-11 h-11" src="{{ asset('coolify-transparent.png') }}
</a>
</li>
<li title="Servers">
<a wire:navigate class="hover:bg-transparent" href="/servers">
<a class="hover:bg-transparent" href="/servers">
<svg xmlns="http://www.w3.org/2000/svg"
class="{{ request()->is('server/*') || request()->is('servers') ? 'text-warning icon' : 'icon' }}"
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
@ -28,7 +28,7 @@ class="{{ request()->is('server/*') || request()->is('servers') ? 'text-warning
</a>
</li>
<li title="Projects">
<a wire:navigate class="hover:bg-transparent" href="/projects">
<a class="hover:bg-transparent" href="/projects">
<svg xmlns="http://www.w3.org/2000/svg"
class="{{ request()->is('project/*') || request()->is('projects') ? 'text-warning icon' : 'icon' }}"
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
@ -41,7 +41,7 @@ class="{{ request()->is('project/*') || request()->is('projects') ? 'text-warnin
</a>
</li>
<li title="Command Center">
<a wire:navigate class="hover:bg-transparent" href="/command-center">
<a class="hover:bg-transparent" href="/command-center">
<svg xmlns="http://www.w3.org/2000/svg"
class="{{ request()->is('command-center') ? 'text-warning icon' : 'icon' }}" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
@ -53,7 +53,7 @@ class="{{ request()->is('command-center') ? 'text-warning icon' : 'icon' }}" vie
</a>
</li>
<li title="Source">
<a wire:navigate class="hover:bg-transparent" href="{{ route('source.all') }}">
<a class="hover:bg-transparent" href="{{ route('source.all') }}">
<svg class="icon" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg">
<path fill="currentColor"
d="m6.793 1.207l.353.354l-.353-.354ZM1.207 6.793l-.353-.354l.353.354Zm0 1.414l.354-.353l-.354.353Zm5.586 5.586l-.354.353l.354-.353Zm1.414 0l-.353-.354l.353.354Zm5.586-5.586l.353.354l-.353-.354Zm0-1.414l-.354.353l.354-.353ZM8.207 1.207l.354-.353l-.354.353ZM6.44.854L.854 6.439l.707.707l5.585-5.585L6.44.854ZM.854 8.56l5.585 5.585l.707-.707l-5.585-5.585l-.707.707Zm7.707 5.585l5.585-5.585l-.707-.707l-5.585 5.585l.707.707Zm5.585-7.707L8.561.854l-.707.707l5.585 5.585l.707-.707Zm0 2.122a1.5 1.5 0 0 0 0-2.122l-.707.707a.5.5 0 0 1 0 .708l.707.707ZM6.44 14.146a1.5 1.5 0 0 0 2.122 0l-.707-.707a.5.5 0 0 1-.708 0l-.707.707ZM.854 6.44a1.5 1.5 0 0 0 0 2.122l.707-.707a.5.5 0 0 1 0-.708L.854 6.44Zm6.292-4.878a.5.5 0 0 1 .708 0L8.56.854a1.5 1.5 0 0 0-2.122 0l.707.707Zm-2 1.293l1 1l.708-.708l-1-1l-.708.708ZM7.5 5a.5.5 0 0 1-.5-.5H6A1.5 1.5 0 0 0 7.5 6V5Zm.5-.5a.5.5 0 0 1-.5.5v1A1.5 1.5 0 0 0 9 4.5H8ZM7.5 4a.5.5 0 0 1 .5.5h1A1.5 1.5 0 0 0 7.5 3v1Zm0-1A1.5 1.5 0 0 0 6 4.5h1a.5.5 0 0 1 .5-.5V3Zm.646 2.854l1.5 1.5l.707-.708l-1.5-1.5l-.707.708ZM10.5 8a.5.5 0 0 1-.5-.5H9A1.5 1.5 0 0 0 10.5 9V8Zm.5-.5a.5.5 0 0 1-.5.5v1A1.5 1.5 0 0 0 12 7.5h-1Zm-.5-.5a.5.5 0 0 1 .5.5h1A1.5 1.5 0 0 0 10.5 6v1Zm0-1A1.5 1.5 0 0 0 9 7.5h1a.5.5 0 0 1 .5-.5V6ZM7 5.5v4h1v-4H7Zm.5 5.5a.5.5 0 0 1-.5-.5H6A1.5 1.5 0 0 0 7.5 12v-1Zm.5-.5a.5.5 0 0 1-.5.5v1A1.5 1.5 0 0 0 9 10.5H8Zm-.5-.5a.5.5 0 0 1 .5.5h1A1.5 1.5 0 0 0 7.5 9v1Zm0-1A1.5 1.5 0 0 0 6 10.5h1a.5.5 0 0 1 .5-.5V9Z" />
@ -61,7 +61,7 @@ class="{{ request()->is('command-center') ? 'text-warning icon' : 'icon' }}" vie
</a>
</li>
<li title="Security">
<a wire:navigate class="hover:bg-transparent" href="{{ route('security.private-key.index') }}">
<a class="hover:bg-transparent" href="{{ route('security.private-key.index') }}">
<svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2"
@ -70,7 +70,7 @@ class="{{ request()->is('command-center') ? 'text-warning icon' : 'icon' }}" vie
</a>
</li>
<li title="Teams">
<a wire:navigate class="hover:bg-transparent" href="{{ route('team.index') }}">
<a class="hover:bg-transparent" href="{{ route('team.index') }}">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
@ -103,7 +103,7 @@ class="{{ request()->is('command-center') ? 'text-warning icon' : 'icon' }}" vie
</a>
</li>
<li title="Profile">
<a wire:navigate class="hover:bg-transparent" href="/profile">
<a class="hover:bg-transparent" href="/profile">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
@ -116,7 +116,7 @@ class="{{ request()->is('command-center') ? 'text-warning icon' : 'icon' }}" vie
@if (isInstanceAdmin())
<li title="Settings" class="mt-auto">
<a wire:navigate class="hover:bg-transparent" href="/settings">
<a class="hover:bg-transparent" href="/settings">
<svg xmlns="http://www.w3.org/2000/svg"
class="{{ request()->is('settings*') ? 'text-warning icon' : 'icon' }}" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"

View File

@ -13,7 +13,7 @@
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"></path>
</svg>
<a wire:navigate class="text-xs truncate lg:text-sm"
<a class="text-xs truncate lg:text-sm"
href="{{ route('project.resources', ['environment_name' => $this->parameters['environment_name'], 'project_uuid' => $this->parameters['project_uuid']]) }}">{{ $this->parameters['environment_name'] }}</a>
</div>
</li>

View File

@ -10,10 +10,10 @@
</ol>
</nav>
<nav class="navbar-main">
<a wire:navigate href="{{ route('security.private-key.index') }}">
<a href="{{ route('security.private-key.index') }}">
<button>Private Keys</button>
</a>
<a wire:navigate href="{{ route('security.api-tokens') }}">
<a href="{{ route('security.api-tokens') }}">
<button>API tokens</button>
</a>
<div class="flex-1"></div>

View File

@ -8,32 +8,32 @@
</div>
<div class="subtitle ">{{ data_get($server, 'name') }}</div>
<nav class="navbar-main">
<a wire:navigate class="{{ request()->routeIs('server.show') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('server.show') ? 'text-white' : '' }}"
href="{{ route('server.show', [
'server_uuid' => data_get($parameters, 'server_uuid'),
]) }}">
<button>General</button>
</a>
<a wire:navigate class="{{ request()->routeIs('server.private-key') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('server.private-key') ? 'text-white' : '' }}"
href="{{ route('server.private-key', [
'server_uuid' => data_get($parameters, 'server_uuid'),
]) }}">
<button>Private Key</button>
</a>
@if (!$server->isSwarmWorker())
<a wire:navigate class="{{ request()->routeIs('server.proxy') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('server.proxy') ? 'text-white' : '' }}"
href="{{ route('server.proxy', [
'server_uuid' => data_get($parameters, 'server_uuid'),
]) }}">
<button>Proxy</button>
</a>
<a wire:navigate class="{{ request()->routeIs('server.destinations') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('server.destinations') ? 'text-white' : '' }}"
href="{{ route('server.destinations', [
'server_uuid' => data_get($parameters, 'server_uuid'),
]) }}">
<button>Destinations</button>
</a>
<a wire:navigate class="{{ request()->routeIs('server.log-drains') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('server.log-drains') ? 'text-white' : '' }}"
href="{{ route('server.log-drains', [
'server_uuid' => data_get($parameters, 'server_uuid'),
]) }}">

View File

@ -1,5 +1,5 @@
<div class="navbar-main" x-data>
<a wire:navigate class="{{ request()->routeIs('project.service.configuration') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('project.service.configuration') ? 'text-white' : '' }}"
href="{{ route('project.service.configuration', $parameters) }}">
<button>Configuration</button>
</a>

View File

@ -1,7 +1,7 @@
<div class="pb-6">
<div class="flex items-end gap-2">
<h1>Team</h1>
<a wire:navigate href="/team/new"><x-forms.button>+ New Team</x-forms.button></a>
<a href="/team/new"><x-forms.button>+ New Team</x-forms.button></a>
</div>
<nav class="flex pt-2 pb-10">
<ol class="inline-flex items-center">
@ -14,17 +14,17 @@ class="text-warning">{{ session('currentTeam.name') }}</span></span>
</ol>
</nav>
<nav class="navbar-main">
<a wire:navigate class="{{ request()->routeIs('team.index') ? 'text-white' : '' }}" href="{{ route('team.index') }}">
<a class="{{ request()->routeIs('team.index') ? 'text-white' : '' }}" href="{{ route('team.index') }}">
<button>General</button>
</a>
<a wire:navigate class="{{ request()->routeIs('team.members') ? 'text-white' : '' }}" href="{{ route('team.members') }}">
<a class="{{ request()->routeIs('team.members') ? 'text-white' : '' }}" href="{{ route('team.members') }}">
<button>Members</button>
</a>
<a wire:navigate class="{{ request()->routeIs('team.storages.all') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('team.storages.all') ? 'text-white' : '' }}"
href="{{ route('team.storages.all') }}">
<button>S3 Storages</button>
</a>
<a wire:navigate class="{{ request()->routeIs('team.notifications') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('team.notifications') ? 'text-white' : '' }}"
href="{{ route('team.notifications') }}">
<button>Notifications</button>
</a>

View File

@ -29,14 +29,14 @@
@foreach ($projects as $project)
<div class="gap-2 border border-transparent cursor-pointer box group">
@if (data_get($project, 'environments.0.name'))
<a wire:navigate class="flex flex-col flex-1 mx-6 hover:no-underline"
<a class="flex flex-col flex-1 mx-6 hover:no-underline"
href="{{ route('project.resources', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => data_get($project, 'environments.0.name', 'production')]) }}">
<div class="font-bold text-white">{{ $project->name }}</div>
<div class="description">
{{ $project->description }}</div>
</a>
@else
<a wire:navigate class="flex flex-col flex-1 mx-6 hover:no-underline"
<a class="flex flex-col flex-1 mx-6 hover:no-underline"
href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">
<div class="font-bold text-white">{{ $project->name }}</div>
<div class="description">
@ -44,11 +44,11 @@
</a>
@endif
<div class="flex items-center">
<a wire:navigate class="mx-4 rounded group-hover:text-white hover:no-underline"
<a class="mx-4 rounded group-hover:text-white hover:no-underline"
href="{{ route('project.resources.new', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => data_get($project, 'environments.0.name', 'production')]) }}">
<span class="font-bold hover:text-warning">+ New Resource</span>
</a>
<a wire:navigate class="mx-4 rounded group-hover:text-white"
<a class="mx-4 rounded group-hover:text-white"
href="{{ route('project.edit', ['project_uuid' => data_get($project, 'uuid')]) }}">
<svg xmlns="http://www.w3.org/2000/svg" class="icon hover:text-warning" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
@ -72,7 +72,7 @@
<div class="grid grid-cols-1 gap-2 xl:grid-cols-2">
@endif
@foreach ($servers as $server)
<a wire:navigate href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
<a href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
@class([
'gap-2 border cursor-pointer box group',
'border-transparent' => $server->settings->is_reachable,

View File

@ -2,7 +2,7 @@
@if ($server->isFunctional())
<div class="flex items-end gap-2">
<h2>Destinations</h2>
<a wire:navigate href="{{ route('destination.new', ['server_id' => $server->id]) }}">
<a href="{{ route('destination.new', ['server_id' => $server->id]) }}">
<x-forms.button>Add a new destination</x-forms.button>
</a>
<x-forms.button wire:click='scan'>Scan destinations on the server</x-forms.button>
@ -11,7 +11,7 @@
<div class="flex gap-2 ">
Available for using:
@forelse ($server->standaloneDockers as $docker)
<a wire:navigate
<a
href="{{ route('destination.show', ['destination_uuid' => data_get($docker, 'uuid')]) }}">
<button class="text-white btn-link">{{ data_get($docker, 'network') }} </button>
</a>
@ -19,7 +19,7 @@
<div class="">N/A</div>
@endforelse
@forelse ($server->swarmDockers as $docker)
<a wire:navigate
<a
href="{{ route('destination.show', ['destination_uuid' => data_get($docker, 'uuid')]) }}">
<button class="text-white btn-link">{{ data_get($docker, 'network') }} </button>
</a>
@ -34,7 +34,7 @@
<div class="flex flex-wrap gap-2 ">
@foreach ($networks as $network)
<div>
<a wire:navigate
<a
href="{{ route('destination.new', ['server_id' => $server->id, 'network_name' => data_get($network, 'Name')]) }}">
<x-forms.button>+<x-highlighted text="{{ data_get($network, 'Name') }}" />
</x-forms.button>

View File

@ -11,7 +11,7 @@
<x-forms.button type="submit">Filter</x-forms.button>
</form>
@forelse ($deployments as $deployment)
<a wire:navigate @class([
<a @class([
'bg-coolgray-100 p-2 border-l border-dashed transition-colors hover:no-underline',
'hover:bg-coolgray-200' => data_get($deployment, 'status') === 'queued',
'border-warning hover:bg-warning hover:text-black' =>

View File

@ -267,7 +267,7 @@ class="w-full text-white rounded input input-sm bg-coolgray-200 disabled:bg-cool
</div>
@endforeach
@endif
<a wire:navigate href="{{ route('destination.new', ['server_id' => $server_id]) }}"
<a href="{{ route('destination.new', ['server_id' => $server_id]) }}"
class="items-center justify-center pb-10 text-center box-without-bg group bg-coollabs hover:bg-coollabs-100">
<div class="flex flex-col mx-6 ">
<div class="font-bold text-white">

View File

@ -68,7 +68,7 @@
<div class="text-xs">{{ $application->status }}</div>
</div>
<div class="flex items-center px-4">
<a wire:navigate
<a
class="flex flex-col flex-1 group-hover:text-white hover:no-underline"
href="{{ route('project.service.show', [...$parameters, 'service_name' => $application->name]) }}">
<svg xmlns="http://www.w3.org/2000/svg" class="icon hover:text-warning"
@ -115,7 +115,7 @@ class="flex flex-col flex-1 group-hover:text-white hover:no-underline"
<div class="text-xs">{{ $database->status }}</div>
</div>
<div class="flex items-center px-4">
<a wire:navigate
<a
class="flex flex-col flex-1 group-hover:text-white hover:no-underline"
href="{{ route('project.service.show', [...$parameters, 'service_name' => $database->name]) }}">
<svg xmlns="http://www.w3.org/2000/svg" class="icon hover:text-warning"

View File

@ -2,7 +2,7 @@
<livewire:project.service.navbar :service="$service" :parameters="$parameters" :query="$query" />
<div class="flex h-full pt-6">
<div class="flex flex-col gap-4 min-w-fit">
<a wire:navigate class="{{ request()->routeIs('project.service.configuration') ? 'text-white' : '' }}"
<a class="{{ request()->routeIs('project.service.configuration') ? 'text-white' : '' }}"
href="{{ route('project.service.configuration', [...$parameters, 'service_name' => null]) }}">
<button><- Back</button>
</a>

View File

@ -1,14 +1,14 @@
<div>
<div class="flex items-start gap-2">
<h1>Servers</h1>
<a wire:navigate class="text-white hover:no-underline" href="{{ route('server.create') }}">
<a class="text-white hover:no-underline" href="{{ route('server.create') }}">
<x-forms.button class="btn">+ Add</x-forms.button>
</a>
</div>
<div class="subtitle ">All Servers</div>
<div class="grid gap-2 lg:grid-cols-2">
@forelse ($servers as $server)
<a wire:navigate href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
<a href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
@class([
'gap-2 border cursor-pointer box group',
'border-transparent' => $server->settings->is_reachable,

View File

@ -26,7 +26,7 @@
<h3 class="pt-4">Resources</h3>
@endif
@if ($resource->link())
<a wire:navigate class="flex gap-2 p-1 hover:bg-coolgray-100 hover:no-underline" href="{{ $resource->link() }}">
<a class="flex gap-2 p-1 hover:bg-coolgray-100 hover:no-underline" href="{{ $resource->link() }}">
<div class="w-64">{{ str($resource->type())->headline() }}</div>
<div>{{ $resource->name }}</div>
</a>
@ -46,7 +46,7 @@
<h3 class="pt-4">Resources</h3>
@endif
@if ($resource->link())
<a wire:navigate class="flex gap-2 p-1 hover:bg-coolgray-100 hover:no-underline" href="{{ $resource->link() }}">
<a class="flex gap-2 p-1 hover:bg-coolgray-100 hover:no-underline" href="{{ $resource->link() }}">
<div class="w-64">{{ str($resource->type())->headline() }}</div>
<div>{{ $resource->name }}</div>
</a>

View File

@ -3,13 +3,13 @@
<div class="flex items-center gap-2">
<h1>Resources</h1>
@if ($environment->isEmpty())
<a wire:navigate class="font-normal text-white normal-case border-none rounded hover:no-underline btn btn-primary btn-sm no-animation"
<a class="font-normal text-white normal-case border-none rounded hover:no-underline btn btn-primary btn-sm no-animation"
href="{{ route('project.clone', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => request()->route('environment_name')]) }}">
Clone
</a>
<livewire:project.delete-environment :environment_id="$environment->id" />
@else
<a wire:navigate href="{{ route('project.resources.new', ['project_uuid' => request()->route('project_uuid'), 'environment_name' => request()->route('environment_name')]) }} "
<a href="{{ route('project.resources.new', ['project_uuid' => request()->route('project_uuid'), 'environment_name' => request()->route('environment_name')]) }} "
class="font-normal text-white normal-case border-none rounded hover:no-underline btn btn-primary btn-sm no-animation">+
New</a>
<a class="font-normal text-white normal-case border-none rounded hover:no-underline btn btn-primary btn-sm no-animation"
@ -41,12 +41,12 @@ class="font-normal text-white normal-case border-none rounded hover:no-underline
</nav>
</div>
@if ($environment->isEmpty())
<a wire:navigate href="{{ route('project.resources.new', ['project_uuid' => request()->route('project_uuid'), 'environment_name' => request()->route('environment_name')]) }} "
<a href="{{ route('project.resources.new', ['project_uuid' => request()->route('project_uuid'), 'environment_name' => request()->route('environment_name')]) }} "
class="items-center justify-center box">+ Add New Resource</a>
@endif
<div class="grid gap-2 lg:grid-cols-2">
@foreach ($environment->applications->sortBy('name') as $application)
<a wire:navigate class="relative box group"
<a class="relative box group"
href="{{ route('project.application.configuration', [$project->uuid, $environment->name, $application->uuid]) }}">
<div class="flex flex-col mx-6">
<div class="font-bold text-white">{{ $application->name }}</div>
@ -62,7 +62,7 @@ class="items-center justify-center box">+ Add New Resource</a>
</a>
@endforeach
@foreach ($environment->databases()->sortBy('name') as $database)
<a wire:navigate class="relative box group"
<a class="relative box group"
href="{{ route('project.database.configuration', [$project->uuid, $environment->name, $database->uuid]) }}">
<div class="flex flex-col mx-6">
<div class="font-bold text-white">{{ $database->name }}</div>
@ -78,7 +78,7 @@ class="items-center justify-center box">+ Add New Resource</a>
</a>
@endforeach
@foreach ($environment->services->sortBy('name') as $service)
<a wire:navigate class="relative box group"
<a class="relative box group"
href="{{ route('project.service.configuration', [$project->uuid, $environment->name, $service->uuid]) }}">
<div class="flex flex-col mx-6">
<div class="font-bold text-white">{{ $service->name }}</div>

View File

@ -10,7 +10,7 @@
<div class="text-xs truncate subtitle lg:text-sm">{{ $project->name }}</div>
<div class="grid gap-2 lg:grid-cols-2">
@forelse ($project->environments as $environment)
<a wire:navigate class="items-center justify-center font-bold box"
<a class="items-center justify-center font-bold box"
href="{{ route('project.resources', [$project->uuid, $environment->name]) }}">
{{ $environment->name }}
</a>

View File

@ -17,14 +17,14 @@
@forelse ($projects as $project)
<div class="gap-2 border border-transparent cursor-pointer box group" x-data
x-on:click="goto('{{ $project->uuid }}')">
<a wire:navigate class="flex flex-col flex-1 mx-6 hover:no-underline"
<a class="flex flex-col flex-1 mx-6 hover:no-underline"
href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">
<div class="font-bold text-white">{{ $project->name }}</div>
<div class="description ">
{{ $project->description }}</div>
</a>
<div class="flex items-center">
<a wire:navigate class="mx-4 rounded group-hover:text-white"
<a class="mx-4 rounded group-hover:text-white"
href="{{ route('project.edit', ['project_uuid' => data_get($project, 'uuid')]) }}">
<svg xmlns="http://www.w3.org/2000/svg" class="icon hover:text-warning" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"

View File

@ -2,11 +2,11 @@
<x-security.navbar />
<div class="flex gap-2">
<h2 class="pb-4">Private Keys</h2>
<a wire:navigate href="{{ route('security.private-key.new') }}"><x-forms.button>+ Add</x-forms.button></a>
<a href="{{ route('security.private-key.new') }}"><x-forms.button>+ Add</x-forms.button></a>
</div>
<div class="grid gap-2 lg:grid-cols-2">
@forelse ($privateKeys as $key)
<a wire:navigate class="text-center hover:no-underline box group"
<a class="text-center hover:no-underline box group"
href="{{ route('security.private-key.show', ['private_key_uuid' => data_get($key, 'uuid')]) }}">
<div class="group-hover:text-white">
<div>{{ $key->name }}</div>

View File

@ -9,7 +9,7 @@
<div class="grid gap-2 lg:grid-cols-2">
@forelse ($sources as $source)
@if ($source->getMorphClass() === 'App\Models\GithubApp')
<a wire:navigate class="flex gap-4 text-center hover:no-underline box group"
<a class="flex gap-4 text-center hover:no-underline box group"
href="{{ route('source.github.show', ['github_app_uuid' => data_get($source, 'uuid')]) }}">
<x-git-icon class="text-white w-9 h-9" git="{{ $source->getMorphClass() }}" />
<div class="text-left group-hover:text-white">
@ -21,7 +21,7 @@
</a>
@endif
@if ($source->getMorphClass() === 'App\Models\GitlabApp')
<a wire:navigate class="flex gap-4 text-center hover:no-underline box group"
<a class="flex gap-4 text-center hover:no-underline box group"
href="{{ route('source.gitlab.show', ['gitlab_app_uuid' => data_get($source, 'uuid')]) }}">
<x-git-icon class="text-white w-9 h-9" git="{{ $source->getMorphClass() }}" />
<div class="text-left group-hover:text-white">

View File

@ -4,7 +4,7 @@
->currentTeam()" />
<div class="flex items-start gap-2">
<h2 class="pb-4">S3 Storages</h2>
<a wire:navigate class="text-white hover:no-underline" href="/team/storages/new"> <x-forms.button class="btn">+ Add
<a class="text-white hover:no-underline" href="/team/storages/new"> <x-forms.button class="btn">+ Add
</x-forms.button></a>
</div>
<div class="grid gap-2 lg:grid-cols-2">

View File

@ -7,6 +7,7 @@
use App\Actions\Database\StartRedis;
use App\Actions\Service\StartService;
use App\Models\User;
use App\Providers\RouteServiceProvider;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Visus\Cuid2\Cuid2;
@ -110,7 +111,7 @@
$token = request()->token;
$email = decrypt($token);
if (!User::whereEmail($email)->exists()) {
return redirect('/');
return redirect(RouteServiceProvider::HOME);
}
if (User::whereEmail($email)->first()->marketing_emails === false) {
return 'You have already unsubscribed from marketing emails.';

View File

@ -32,6 +32,7 @@
use App\Models\Server;
use App\Models\StandaloneDocker;
use App\Models\SwarmDocker;
use App\Providers\RouteServiceProvider;
use Illuminate\Foundation\Auth\EmailVerificationRequest;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Password;
@ -47,7 +48,7 @@
Route::get('/api/v1/test/realtime', function () {
if (auth()->user()?->currentTeam()->id !== 0) {
return redirect('/');
return redirect(RouteServiceProvider::HOME);
}
TestEvent::dispatch('asd');
return 'Look at your other tab.';
@ -89,7 +90,7 @@
Route::get('/email/verify/{id}/{hash}', function (EmailVerificationRequest $request) {
$request->fulfill();
send_internal_notification("User {$request->user()->name} verified their email address.");
return redirect('/');
return redirect(RouteServiceProvider::HOME);
})->middleware(['auth'])->name('verify.verify');
Route::middleware(['throttle:login'])->group(function () {
@ -243,7 +244,7 @@
Route::any('/{any}', function () {
if (auth()->user()) {
return redirect('/');
return redirect(RouteServiceProvider::HOME);
}
return redirect('/login');
return redirect()->route('login');
})->where('any', '.*');