An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
feat(settings): add sponsorship popup toggle and corresponding database migration
Andras Bacsai8abb8b2328ab
diff --git a/app/Livewire/Settings/Index.php b/app/Livewire/Settings/Index.phpindex 3d90024b7e..f9df7ee336 100644--- a/app/Livewire/Settings/Index.php+++ b/app/Livewire/Settings/Index.php@@ -68,6 +68,9 @@ class Index extends Component#[Validate('boolean')]public bool $disable_two_step_confirmation;+ #[Validate('boolean')]+ public bool $is_sponsorship_popup_enabled;+public function render(){return view('livewire.settings.index');@@ -96,6 +99,7 @@ class Index extends Component$this->update_check_frequency = $this->settings->update_check_frequency;$this->instance_timezone = $this->settings->instance_timezone;$this->disable_two_step_confirmation = $this->settings->disable_two_step_confirmation;+ $this->is_sponsorship_popup_enabled = $this->settings->is_sponsorship_popup_enabled;}}@@ -134,6 +138,7 @@ class Index extends Component$this->settings->update_check_frequency = $this->update_check_frequency;$this->settings->disable_two_step_confirmation = $this->disable_two_step_confirmation;$this->settings->instance_timezone = $this->instance_timezone;+ $this->settings->is_sponsorship_popup_enabled = $this->is_sponsorship_popup_enabled;if ($isSave) {$this->settings->save();$this->dispatch('success', 'Settings updated!');diff --git a/database/migrations/2025_06_25_131350_add_is_sponsorship_popup_enabled_to_instance_settings_table.php b/database/migrations/2025_06_25_131350_add_is_sponsorship_popup_enabled_to_instance_settings_table.phpnew file mode 100644index 0000000000..7307da9535--- /dev/null+++ b/database/migrations/2025_06_25_131350_add_is_sponsorship_popup_enabled_to_instance_settings_table.php@@ -0,0 +1,28 @@+<?php++use Illuminate\Database\Migrations\Migration;+use Illuminate\Database\Schema\Blueprint;+use Illuminate\Support\Facades\Schema;++return new class extends Migration+{+ /**+ * Run the migrations.+ */+ public function up(): void+ {+ Schema::table('instance_settings', function (Blueprint $table) {+ $table->boolean('is_sponsorship_popup_enabled')->default(true);+ });+ }++ /**+ * Reverse the migrations.+ */+ public function down(): void+ {+ Schema::table('instance_settings', function (Blueprint $table) {+ $table->dropColumn('is_sponsorship_popup_enabled');+ });+ }+};diff --git a/resources/views/livewire/layout-popups.blade.php b/resources/views/livewire/layout-popups.blade.phpindex 5fc17bdde0..49e2b469fb 100644--- a/resources/views/livewire/layout-popups.blade.php+++ b/resources/views/livewire/layout-popups.blade.php@@ -87,38 +87,42 @@@endif</span>@endauth- <span x-show="popups.sponsorship">- <x-popup>- <x-slot:title>- Would you like to help us to make more cool things?- </x-slot:title>- <x-slot:icon>- <img src="{{ asset('heart.png') }}" class="w-8 h-8 sm:w-12 sm:h-12 lg:w-16 lg:h-16">- </x-slot:icon>- <x-slot:description>- <div class="text-md dark:text-white">- <span>We are already profitable, but we would like to scale even further.</span>- <br><span>Please- consider donating on one (or both) of the following platforms.<br /><br /> <a- href="https://github.com/sponsors/coollabsio"- class="underline text-lg font-bold dark:text-white">GitHub- Sponsors</a> (registration required) <br /><br />- <a href="https://opencollective.com/coollabsio/donate?interval=month&amount=10&name=&legalName=&email="- class="underline text-lg font-bold dark:text-white">OpenCollective</a> (no registration- required).</span>- </div>- </x-slot:description>- <x-slot:button-text @click="disableSponsorship()">- Disable This Popup- </x-slot:button-text>- </x-popup>- </span>+ @if (instanceSettings()->is_sponsorship_popup_enabled)+ <span x-show="popups.sponsorship">+ <x-popup>+ <x-slot:title>+ Would you like to help us to make more cool things?+ </x-slot:title>+ <x-slot:icon>+ <img src="{{ asset('heart.png') }}" class="w-8 h-8 sm:w-12 sm:h-12 lg:w-16 lg:h-16">+ </x-slot:icon>+ <x-slot:description>+ <div class="text-md dark:text-white">+ <span>We are already profitable, but we would like to scale even further.</span>+ <br><span>Please+ consider donating on one (or both) of the following platforms.<br /><br /> <a+ href="https://github.com/sponsors/coollabsio"+ class="underline text-lg font-bold dark:text-white">GitHub+ Sponsors</a> (registration required) <br /><br />+ <a href="https://opencollective.com/coollabsio/donate?interval=month&amount=10&name=&legalName=&email="+ class="underline text-lg font-bold dark:text-white">OpenCollective</a> (no registration+ required).</span>+ </div>+ </x-slot:description>+ <x-slot:button-text @click="disableSponsorship()">+ Disable This Popup+ </x-slot:button-text>+ </x-popup>+ </span>+ @endif@if (currentTeam()->subscriptionPastOverDue())<x-banner :closable=false>- <div><span class="font-bold text-red-500">WARNING:</span> Your subscription is in over-due. If your latest+ <div><span class="font-bold text-red-500">WARNING:</span> Your subscription is in over-due. If your+ latestpayment is not paid within a week, all automations <span class="font-bold text-red-500">willbe deactivated</span>. Visit <a href="{{ route('subscription.show') }}"- class="underline dark:text-white">/subscription</a> to check your subscription status or pay your+ class="underline dark:text-white">/subscription</a> to check your subscription status or pay+ yourinvoice (or check your email for the invoice).</div></x-banner>diff --git a/resources/views/livewire/settings/index.blade.php b/resources/views/livewire/settings/index.blade.phpindex f7db2818fe..19d460b583 100644--- a/resources/views/livewire/settings/index.blade.php+++ b/resources/views/livewire/settings/index.blade.php@@ -97,7 +97,7 @@helper="Allowed IP lists for the API. A comma separated list of IPs. Empty means you allow from everywhere."placeholder="1.1.1.1,8.8.8.8" /><h4 class="pt-6">Update</h4>- <div class="text-right md:w-96">+ <div class="text-right md:w-96 pb-4">@if (!is_null(config('constants.coolify.autoupdate', null)))<div class="text-right md:w-96"><x-forms.checkbox instantSave helper="AUTOUPDATE is set in .env file, you need to modify it there."@@ -128,6 +128,10 @@</div><h4 class="py-4">Confirmation Settings</h4>+ <div class="md:w-96 ">+ <x-forms.checkbox instantSave id="is_sponsorship_popup_enabled" label="Show Sponsorship Popup"+ helper="When enabled, sponsorship popups will be shown monthly to users. When disabled, the sponsorship popup will be permanently hidden for all users." />+ </div>@if ($disable_two_step_confirmation)<div class="md:w-96 pb-4" wire:key="two-step-confirmation-enabled">