diff --git a/app/Livewire/Settings/Index.php b/app/Livewire/Settings/Index.php index 3d90024b7..f9df7ee33 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.php new file mode 100644 index 000000000..7307da953 --- /dev/null +++ b/database/migrations/2025_06_25_131350_add_is_sponsorship_popup_enabled_to_instance_settings_table.php @@ -0,0 +1,28 @@ +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.php index 5fc17bdde..49e2b469f 100644 --- a/resources/views/livewire/layout-popups.blade.php +++ b/resources/views/livewire/layout-popups.blade.php @@ -87,38 +87,42 @@ @endif @endauth - - - - Would you like to help us to make more cool things? - - - - - -
- We are already profitable, but we would like to scale even further. -
Please - consider donating on one (or both) of the following platforms.

GitHub - Sponsors (registration required)

- OpenCollective (no registration - required).
-
-
- - Disable This Popup - -
-
+ @if (instanceSettings()->is_sponsorship_popup_enabled) + + + + Would you like to help us to make more cool things? + + + + + +
+ We are already profitable, but we would like to scale even further. +
Please + consider donating on one (or both) of the following platforms.

GitHub + Sponsors (registration required)

+ OpenCollective (no registration + required).
+
+
+ + Disable This Popup + +
+
+ @endif @if (currentTeam()->subscriptionPastOverDue()) -
WARNING: Your subscription is in over-due. If your latest +
WARNING: Your subscription is in over-due. If your + latest payment is not paid within a week, all automations will be deactivated. Visit /subscription to check your subscription status or pay your + class="underline dark:text-white">/subscription to check your subscription status or pay + your invoice (or check your email for the invoice).
diff --git a/resources/views/livewire/settings/index.blade.php b/resources/views/livewire/settings/index.blade.php index f7db2818f..19d460b58 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" />

Update

-
+
@if (!is_null(config('constants.coolify.autoupdate', null)))

Confirmation Settings

+
+ +
@if ($disable_two_step_confirmation)