Skip to content

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.

Add sponsorship notification and disable option, update dependencies

Andras Bacsai3dd918228157
diff --git a/app/Http/Livewire/Sponsorship.php b/app/Http/Livewire/Sponsorship.php
new file mode 100644
index 0000000000..60fbee3bdd
--- /dev/null
+++ b/app/Http/Livewire/Sponsorship.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace App\Http\Livewire;
+
+use Livewire\Component;
+
+class Sponsorship extends Component
+{
+ public function disable()
+ {
+ auth()->user()->update(['is_notification_sponsorship_enabled' => false]);
+ }
+ public function render()
+ {
+ return view('livewire.sponsorship');
+ }
+}
diff --git a/database/migrations/2023_11_13_133059_add_sponsorship_disable.php b/database/migrations/2023_11_13_133059_add_sponsorship_disable.php
new file mode 100644
index 0000000000..6fe42b3904
--- /dev/null
+++ b/database/migrations/2023_11_13_133059_add_sponsorship_disable.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('users', function (Blueprint $table) {
+ $table->boolean('is_notification_sponsorship_enabled')->default(true);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::table('users', function (Blueprint $table) {
+ $table->dropColumn('is_notification_sponsorship_enabled');
+ });
+ }
+};
diff --git a/package-lock.json b/package-lock.json
index 78e00ae871..4e6e223e4b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7,7 +7,7 @@
"dependencies": {
"@tailwindcss/typography": "0.5.10",
"alpinejs": "3.13.1",
- "daisyui": "3.9.2",
+ "daisyui": "4.0.3",
"tailwindcss-scrollbar": "0.1.0"
},
"devDependencies": {
@@ -896,11 +896,6 @@
"node": ">= 6"
}
},
- "node_modules/colord": {
- "version": "2.9.3",
- "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz",
- "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw=="
- },
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -952,16 +947,23 @@
"integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==",
"dev": true
},
+ "node_modules/culori": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/culori/-/culori-3.2.0.tgz",
+ "integrity": "sha512-HIEbTSP7vs1mPq/2P9In6QyFE0Tkpevh0k9a+FkjhD+cwsYm9WRSbn4uMdW9O0yXlNYC3ppxL3gWWPOcvEl57w==",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ }
+ },
"node_modules/daisyui": {
- "version": "3.9.2",
- "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-3.9.2.tgz",
- "integrity": "sha512-yJZ1QjHUaL+r9BkquTdzNHb7KIgAJVFh0zbOXql2Wu0r7zx5qZNLxclhjN0WLoIpY+o2h/8lqXg7ijj8oTigOw==",
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-4.0.3.tgz",
+ "integrity": "sha512-mG6PsdIA6MEHzdJwBlJxc1rqsIAAlcfhj2O8g0ol1uWg5y6C5zTcqfG8vKBqK4y2YfCxGIVgMsMWRTSm32N1Ow==",
"dependencies": {
- "colord": "^2.9",
"css-selector-tokenizer": "^0.8",
- "postcss": "^8",
- "postcss-js": "^4",
- "tailwindcss": "^3.1"
+ "culori": "^3",
+ "picocolors": "^1",
+ "postcss-js": "^4"
},
"engines": {
"node": ">=16.9.0"
diff --git a/package.json b/package.json
index 69f9e494a8..b0d9393300 100644
--- a/package.json
+++ b/package.json
@@ -11,14 +11,14 @@
"axios": "1.5.1",
"laravel-vite-plugin": "0.8.1",
"postcss": "8.4.31",
- "tailwindcss": "3.3.3",
+ "tailwindcss": "3.3.5",
"vite": "4.4.11",
"vue": "3.3.4"
},
"dependencies": {
"@tailwindcss/typography": "0.5.10",
"alpinejs": "3.13.1",
- "daisyui": "3.9.2",
+ "daisyui": "4.0.3",
"tailwindcss-scrollbar": "0.1.0"
}
}
diff --git a/resources/css/app.css b/resources/css/app.css
index f55c71dff7..5952f81213 100644
--- a/resources/css/app.css
+++ b/resources/css/app.css
@@ -53,10 +53,10 @@ a {
@apply text-white;
}
.box {
- @apply flex p-2 transition-colors cursor-pointer min-h-16 bg-coolgray-100 hover:bg-coollabs-100 hover:text-white hover:no-underline min-w-[24rem];
+ @apply flex p-2 transition-colors cursor-pointer min-h-[4rem] bg-coolgray-100 hover:bg-coollabs-100 hover:text-white hover:no-underline min-w-[24rem];
}
.box-without-bg {
- @apply flex p-2 transition-colors min-h-16 hover:text-white hover:no-underline min-w-[24rem];
+ @apply flex p-2 transition-colors h-16 min-h-full hover:text-white hover:no-underline min-h-[4rem];
}
.description {
@apply pt-2 text-xs font-bold text-neutral-500 group-hover:text-white;
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index 9ec5d377fe..cb7fcf800a 100644
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -5,6 +5,7 @@
<div class="fixed z-50 top-[4.5rem] left-4" id="vue">
<magic-bar></magic-bar>
</div>
+ <livewire:sponsorship />
<main class="pb-10 main max-w-screen-2xl">
{{ $slot }}
</main>
diff --git a/resources/views/livewire/sponsorship.blade.php b/resources/views/livewire/sponsorship.blade.php
new file mode 100644
index 0000000000..28cb96ac45
--- /dev/null
+++ b/resources/views/livewire/sponsorship.blade.php
@@ -0,0 +1,14 @@
+<div>
+ @if (data_get(auth()->user(), 'is_notification_sponsorship_enabled'))
+ <div class="toast">
+ <div class="flex flex-col text-white rounded alert bg-coolgray-200">
+ <span>Love Coolify as we do? <a href="https://coolify.io/sponsorships"
+ class="underline text-warning">Please
+ consider donating!</a>💜</span>
+ <span>It enables us to keep creating features without paywalls, ensuring our work remains free and
+ open.</span>
+ <x-forms.button class="bg-coolgray-400" wire:click='disable'>Disable This Popup</x-forms.button>
+ </div>
+ </div>
+ @endif
+</div>