From 3dd91822815733902374df1a5005586d21c5d08b Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 13 Nov 2023 14:44:54 +0100 Subject: [PATCH] Add sponsorship notification and disable option, update dependencies --- app/Http/Livewire/Sponsorship.php | 17 +++++++++++ ...3_11_13_133059_add_sponsorship_disable.php | 28 +++++++++++++++++++ package-lock.json | 28 ++++++++++--------- package.json | 4 +-- resources/css/app.css | 4 +-- resources/views/layouts/app.blade.php | 1 + .../views/livewire/sponsorship.blade.php | 14 ++++++++++ 7 files changed, 79 insertions(+), 17 deletions(-) create mode 100644 app/Http/Livewire/Sponsorship.php create mode 100644 database/migrations/2023_11_13_133059_add_sponsorship_disable.php create mode 100644 resources/views/livewire/sponsorship.blade.php diff --git a/app/Http/Livewire/Sponsorship.php b/app/Http/Livewire/Sponsorship.php new file mode 100644 index 000000000..60fbee3bd --- /dev/null +++ b/app/Http/Livewire/Sponsorship.php @@ -0,0 +1,17 @@ +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 000000000..6fe42b390 --- /dev/null +++ b/database/migrations/2023_11_13_133059_add_sponsorship_disable.php @@ -0,0 +1,28 @@ +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 78e00ae87..4e6e223e4 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 69f9e494a..b0d939330 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 f55c71dff..5952f8121 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 9ec5d377f..cb7fcf800 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -5,6 +5,7 @@
+
{{ $slot }}
diff --git a/resources/views/livewire/sponsorship.blade.php b/resources/views/livewire/sponsorship.blade.php new file mode 100644 index 000000000..28cb96ac4 --- /dev/null +++ b/resources/views/livewire/sponsorship.blade.php @@ -0,0 +1,14 @@ +
+ @if (data_get(auth()->user(), 'is_notification_sponsorship_enabled')) +
+
+ Love Coolify as we do? Please + consider donating!💜 + It enables us to keep creating features without paywalls, ensuring our work remains free and + open. + Disable This Popup +
+
+ @endif +