diff --git a/README.md b/README.md
index 6e6d80c59..3a211d4b1 100644
--- a/README.md
+++ b/README.md
@@ -37,6 +37,7 @@ Special thanks to our biggest sponsors, [CCCareers](https://cccareers.org/) and
+
diff --git a/app/Livewire/ActivityMonitor.php b/app/Livewire/ActivityMonitor.php
index ad2a599a1..421992cb5 100644
--- a/app/Livewire/ActivityMonitor.php
+++ b/app/Livewire/ActivityMonitor.php
@@ -13,6 +13,7 @@ class ActivityMonitor extends Component
public $activityId;
public $eventToDispatch = 'activityFinished';
public $isPollingActive = false;
+ public bool $showWaiting = false;
protected $activity;
protected $listeners = ['activityMonitor' => 'newMonitorActivity'];
diff --git a/app/Livewire/Destination/New/Docker.php b/app/Livewire/Destination/New/Docker.php
index 66d0df82e..842a44683 100644
--- a/app/Livewire/Destination/New/Docker.php
+++ b/app/Livewire/Destination/New/Docker.php
@@ -5,7 +5,7 @@ namespace App\Livewire\Destination\New;
use App\Models\Server;
use App\Models\StandaloneDocker as ModelsStandaloneDocker;
use App\Models\SwarmDocker;
-use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Support\Collection;
use Livewire\Component;
use Visus\Cuid2\Cuid2;
@@ -14,7 +14,7 @@ class Docker extends Component
public string $name;
public string $network;
- public Collection $servers;
+ public ?Collection $servers = null;
public Server $server;
public ?int $server_id = null;
public bool $is_swarm = false;
@@ -34,6 +34,9 @@ class Docker extends Component
public function mount()
{
+ if (is_null($this->servers)) {
+ $this->servers = Server::ownedByCurrentTeam()->get();
+ }
if (request()->query('server_id')) {
$this->server_id = request()->query('server_id');
} else {
diff --git a/app/Livewire/Destination/Show.php b/app/Livewire/Destination/Show.php
index b9cbcc147..4b763bae2 100644
--- a/app/Livewire/Destination/Show.php
+++ b/app/Livewire/Destination/Show.php
@@ -3,6 +3,8 @@
namespace App\Livewire\Destination;
use App\Models\Server;
+use App\Models\StandaloneDocker;
+use App\Models\SwarmDocker;
use Illuminate\Support\Collection;
use Livewire\Component;
@@ -11,6 +13,40 @@ class Show extends Component
public Server $server;
public Collection|array $networks = [];
+ private function createNetworkAndAttachToProxy()
+ {
+ $connectProxyToDockerNetworks = connectProxyToNetworks($this->server);
+ instant_remote_process($connectProxyToDockerNetworks, $this->server, false);
+ }
+ public function add($name)
+ {
+ if ($this->server->isSwarm()) {
+ $found = $this->server->swarmDockers()->where('network', $name)->first();
+ if ($found) {
+ $this->dispatch('error', 'Network already added to this server.');
+ return;
+ } else {
+ $docker = SwarmDocker::create([
+ 'name' => $this->server->name . "-" . $name,
+ 'network' => $this->name,
+ 'server_id' => $this->server->id,
+ ]);
+ }
+ } else {
+ $found = $this->server->standaloneDockers()->where('network', $name)->first();
+ if ($found) {
+ $this->dispatch('error', 'Network already added to this server.');
+ return;
+ } else {
+ $docker = StandaloneDocker::create([
+ 'name' => $this->server->name . "-" . $name,
+ 'network' => $name,
+ 'server_id' => $this->server->id,
+ ]);
+ }
+ $this->createNetworkAndAttachToProxy();
+ }
+ }
public function scan()
{
if ($this->server->isSwarm()) {
@@ -26,6 +62,8 @@ class Show extends Component
});
if ($this->networks->count() === 0) {
$this->dispatch('success', 'No new networks found.');
+ return;
}
+ $this->dispatch('success', 'Scan done.');
}
}
diff --git a/app/Livewire/LayoutPopups.php b/app/Livewire/LayoutPopups.php
index b6f06f808..136c94ca2 100644
--- a/app/Livewire/LayoutPopups.php
+++ b/app/Livewire/LayoutPopups.php
@@ -17,14 +17,6 @@ class LayoutPopups extends Component
{
$this->dispatch('success', 'Realtime events configured!');
}
- public function disableSponsorship()
- {
- auth()->user()->update(['is_notification_sponsorship_enabled' => false]);
- }
- public function disableNotifications()
- {
- auth()->user()->update(['is_notification_notifications_enabled' => false]);
- }
public function render()
{
return view('livewire.layout-popups');
diff --git a/app/Livewire/Project/Index.php b/app/Livewire/Project/Index.php
index 1e6f79855..0537ad192 100644
--- a/app/Livewire/Project/Index.php
+++ b/app/Livewire/Project/Index.php
@@ -2,6 +2,7 @@
namespace App\Livewire\Project;
+use App\Models\PrivateKey;
use App\Models\Project;
use App\Models\Server;
use Livewire\Component;
@@ -10,7 +11,9 @@ class Index extends Component
{
public $projects;
public $servers;
+ public $private_keys;
public function mount() {
+ $this->private_keys = PrivateKey::ownedByCurrentTeam()->get();
$this->projects = Project::ownedByCurrentTeam()->get();
$this->servers = Server::ownedByCurrentTeam()->count();
}
diff --git a/app/Livewire/Project/Service/Navbar.php b/app/Livewire/Project/Service/Navbar.php
index 02211b20a..3462a96e1 100644
--- a/app/Livewire/Project/Service/Navbar.php
+++ b/app/Livewire/Project/Service/Navbar.php
@@ -26,7 +26,7 @@ class Navbar extends Component
];
}
public function serviceStarted() {
- $this->dispatch('success', 'Service started.');
+ $this->dispatch('success', 'Service status changed.');
}
public function serviceStatusChanged()
{
diff --git a/app/Livewire/Project/Service/ServiceApplicationView.php b/app/Livewire/Project/Service/ServiceApplicationView.php
index 29bd796fd..0b3a4cef6 100644
--- a/app/Livewire/Project/Service/ServiceApplicationView.php
+++ b/app/Livewire/Project/Service/ServiceApplicationView.php
@@ -59,7 +59,7 @@ class ServiceApplicationView extends Component
$this->validate();
$this->application->save();
updateCompose($this->application);
- $this->dispatch('success', 'Application saved.');
+ $this->dispatch('success', 'Service saved.');
} catch (\Throwable $e) {
return handleError($e, $this);
} finally {
diff --git a/app/Livewire/Server/New/ByIp.php b/app/Livewire/Server/New/ByIp.php
index df3fae20f..1ce3df273 100644
--- a/app/Livewire/Server/New/ByIp.php
+++ b/app/Livewire/Server/New/ByIp.php
@@ -53,7 +53,7 @@ class ByIp extends Component
public function mount()
{
$this->name = generate_random_name();
- $this->private_key_id = $this->private_keys->first()->id;
+ $this->private_key_id = $this->private_keys->first()?->id;
$this->swarm_managers = Server::isUsable()->get()->where('settings.is_swarm_manager', true);
if ($this->swarm_managers->count() > 0) {
$this->selected_swarm_cluster = $this->swarm_managers->first()->id;
diff --git a/app/Livewire/Settings/License.php b/app/Livewire/Settings/License.php
index 64ad0a6f7..e2ae5fcf7 100644
--- a/app/Livewire/Settings/License.php
+++ b/app/Livewire/Settings/License.php
@@ -30,7 +30,7 @@ class License extends Component
}
public function render()
{
- return view('livewire.settings.license')->layout('layouts.subscription');
+ return view('livewire.settings.license');
}
public function submit()
{
diff --git a/app/Models/Team.php b/app/Models/Team.php
index 7cb1601de..a3dd4e473 100644
--- a/app/Models/Team.php
+++ b/app/Models/Team.php
@@ -177,9 +177,6 @@ class Team extends Model implements SendsDiscord, SendsEmail
if (isCloud()) {
return true;
}
- if (!data_get(auth()->user(), 'is_notification_notifications_enabled')) {
- return true;
- }
if ($this->smtp_enabled || $this->resend_enabled || $this->discord_enabled || $this->telegram_enabled || $this->use_instance_email_settings) {
return true;
}
diff --git a/app/View/Components/Forms/Button.php b/app/View/Components/Forms/Button.php
index 350039fce..06681910e 100644
--- a/app/View/Components/Forms/Button.php
+++ b/app/View/Components/Forms/Button.php
@@ -13,7 +13,6 @@ class Button extends Component
*/
public function __construct(
public bool $disabled = false,
- public bool $isModal = false,
public bool $noStyle = false,
public ?string $modalId = null,
public string $defaultClass = "button"
diff --git a/database/migrations/2024_03_22_080914_remove_popup_notifications.php b/database/migrations/2024_03_22_080914_remove_popup_notifications.php
new file mode 100644
index 000000000..ccb270093
--- /dev/null
+++ b/database/migrations/2024_03_22_080914_remove_popup_notifications.php
@@ -0,0 +1,30 @@
+dropColumn('is_notification_sponsorship_enabled');
+ $table->dropColumn('is_notification_notifications_enabled');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::table('users', function (Blueprint $table) {
+ $table->boolean('is_notification_sponsorship_enabled')->default(true);
+ $table->boolean('is_notification_notifications_enabled')->default(true);
+ });
+ }
+};
diff --git a/resources/css/app.css b/resources/css/app.css
index a3fc32386..d3ac514e6 100644
--- a/resources/css/app.css
+++ b/resources/css/app.css
@@ -84,7 +84,7 @@ input {
}
.input {
- @apply block w-full py-1.5 rounded border-0 text-sm ring-inset ring-1 dark:bg-coolgray-100 dark:text-white text-black focus:ring-2 dark:focus:ring-coolgray-300 dark:ring-coolgray-300 dark:read-only:text-neutral-500 dark:read-only:ring-0 dark:read-only:bg-coolgray-100/40 dark:placeholder:text-neutral-700;
+ @apply block w-full py-1.5 pr-[2.8rem] rounded border-0 text-sm ring-inset ring-1 dark:bg-coolgray-100 dark:text-white text-black focus:ring-2 dark:focus:ring-coolgray-300 dark:ring-coolgray-300 dark:read-only:text-neutral-500 dark:read-only:ring-0 dark:read-only:bg-coolgray-100/40 dark:placeholder:text-neutral-700;
}
option {
@@ -100,7 +100,7 @@ option {
}
.dropdown-item {
- @apply relative flex cursor-pointer select-none dark:hover:text-white dark:hover:bg-coollabs items-center pr-4 pl-2 py-1 text-xs justify-center outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 gap-2 w-full;
+ @apply relative flex cursor-pointer select-none dark:text-white dark:hover:bg-coollabs items-center pr-4 pl-2 py-1 text-xs justify-start outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 gap-2 w-full;
}
.badge {
diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php
index 919765f6c..82ea5062b 100644
--- a/resources/views/auth/login.blade.php
+++ b/resources/views/auth/login.blade.php
@@ -5,7 +5,7 @@
Coolify