diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index a92929607..72893f974 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -27,7 +27,7 @@ public function waitlist() { } public function subscription() { - if (!is_cloud()) { + if (!isCloud()) { abort(404); } return view('subscription.index', [ @@ -37,7 +37,7 @@ public function subscription() public function license() { - if (!is_cloud()) { + if (!isCloud()) { abort(404); } return view('settings.license', [ diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/ServerController.php index 2e3b7f794..b01a2dd5e 100644 --- a/app/Http/Controllers/ServerController.php +++ b/app/Http/Controllers/ServerController.php @@ -12,7 +12,7 @@ class ServerController extends Controller public function new_server() { - if (!is_cloud()) { + if (!isCloud()) { return view('server.create', [ 'limit_reached' => false, 'private_keys' => PrivateKey::ownedByCurrentTeam()->get(), diff --git a/app/Http/Livewire/Boarding/Index.php b/app/Http/Livewire/Boarding/Index.php index 77afc1a92..35f7fd218 100644 --- a/app/Http/Livewire/Boarding/Index.php +++ b/app/Http/Livewire/Boarding/Index.php @@ -53,7 +53,7 @@ public function mount() } } public function welcome() { - if (is_cloud()) { + if (isCloud()) { return $this->setServerType('remote'); } $this->currentState = 'select-server-type'; diff --git a/app/Http/Livewire/Source/Github/Change.php b/app/Http/Livewire/Source/Github/Change.php index 4012386ae..32f84e8ed 100644 --- a/app/Http/Livewire/Source/Github/Change.php +++ b/app/Http/Livewire/Source/Github/Change.php @@ -37,7 +37,7 @@ class Change extends Component public function mount() { - if (is_cloud() && !isDev()) { + if (isCloud() && !isDev()) { $this->webhook_endpoint = config('app.url'); } else { $this->webhook_endpoint = $this->ipv4; diff --git a/app/Http/Middleware/IsSubscriptionValid.php b/app/Http/Middleware/IsSubscriptionValid.php index 01fa7a8d0..a9354e982 100644 --- a/app/Http/Middleware/IsSubscriptionValid.php +++ b/app/Http/Middleware/IsSubscriptionValid.php @@ -13,7 +13,7 @@ public function handle(Request $request, Closure $next): Response if (isInstanceAdmin()) { return $next($request); } - if (!auth()->user() || !is_cloud()) { + if (!auth()->user() || !isCloud()) { if ($request->path() === 'subscription') { return redirect('/'); } else { diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 96a798cdf..8eb557ec1 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -217,7 +217,7 @@ function isDev(): bool return config('app.env') === 'local'; } -function is_cloud(): bool +function isCloud(): bool { return !config('coolify.self_hosted'); } diff --git a/resources/views/auth/confirm-password.blade.php b/resources/views/auth/confirm-password.blade.php index 2cbc6dd72..dd1331d43 100644 --- a/resources/views/auth/confirm-password.blade.php +++ b/resources/views/auth/confirm-password.blade.php @@ -8,7 +8,7 @@
@csrf - {{ __('auth.confirm_password') }} diff --git a/resources/views/components/settings/navbar.blade.php b/resources/views/components/settings/navbar.blade.php index ab7d19c09..a4839cab3 100644 --- a/resources/views/components/settings/navbar.blade.php +++ b/resources/views/components/settings/navbar.blade.php @@ -6,7 +6,7 @@ href="{{ route('settings.configuration') }}"> - @if (is_cloud()) + @if (isCloud()) diff --git a/resources/views/livewire/profile/form.blade.php b/resources/views/livewire/profile/form.blade.php index 343624f00..4a7da9df2 100644 --- a/resources/views/livewire/profile/form.blade.php +++ b/resources/views/livewire/profile/form.blade.php @@ -1,7 +1,7 @@
-

General

+

General

Save
diff --git a/resources/views/livewire/source/github/change.blade.php b/resources/views/livewire/source/github/change.blade.php index 8f987db70..5b971c5f4 100644 --- a/resources/views/livewire/source/github/change.blade.php +++ b/resources/views/livewire/source/github/change.blade.php @@ -90,7 +90,7 @@

Register a GitHub App

You need to register a GitHub App before using this source.
- @if (!is_cloud() || isDev()) + @if (!isCloud() || isDev())
diff --git a/resources/views/profile.blade.php b/resources/views/profile.blade.php index a9498cd1e..9ad4d347f 100644 --- a/resources/views/profile.blade.php +++ b/resources/views/profile.blade.php @@ -11,7 +11,7 @@ manually.
- + @csrf Validate 2FA @@ -19,11 +19,11 @@
{!! $request->user()->twoFactorQrCodeSvg() !!}
- Show secret key to manually - enter + Show secret key to manually + enter
@@ -43,7 +43,7 @@
@else @if ($request->user()->two_factor_confirmed_at) -
Two factor authentication is enabled.
+
Two factor authentication is enabled.
@csrf @@ -69,11 +69,15 @@
@endif @else -
Two factor authentication is disabled.
@csrf Configure 2FA @endif @endif + @if (session()->has('errors')) +
+ Something went wrong. Please try again. +
+ @endif diff --git a/resources/views/team/index.blade.php b/resources/views/team/index.blade.php index 26b8f32f5..3bb81512b 100644 --- a/resources/views/team/index.blade.php +++ b/resources/views/team/index.blade.php @@ -3,7 +3,7 @@ ->user() ->currentTeam()" /> - @if (is_cloud()) + @if (isCloud())

Subscription

@if (data_get(currentTeam(),