diff --git a/app/Livewire/Boarding/Index.php b/app/Livewire/Boarding/Index.php index 110222fb4..2681b69e0 100644 --- a/app/Livewire/Boarding/Index.php +++ b/app/Livewire/Boarding/Index.php @@ -15,14 +15,11 @@ class Index extends Component { protected $listeners = ['serverInstalled' => 'validateServer']; - #[Url()] - public string $state = 'welcome'; + public string $currentState = 'welcome'; - #[Url()] public ?string $selectedServerType = null; public ?Collection $privateKeys = null; - #[Url()] public ?int $selectedExistingPrivateKey = null; public ?string $privateKeyType = null; public ?string $privateKey = null; @@ -33,7 +30,6 @@ class Index extends Component public ?Collection $servers = null; - #[Url()] public ?int $selectedExistingServer = null; public ?string $remoteServerName = null; public ?string $remoteServerDescription = null; @@ -46,7 +42,6 @@ class Index extends Component public Collection $projects; - #[Url()] public ?int $selectedProject = null; public ?Project $createdProject = null; @@ -71,25 +66,25 @@ public function mount() $this->remoteServerDescription = 'Created by Coolify'; $this->remoteServerHost = 'coolify-testing-host'; } - if ($this->state === 'create-project') { - $this->getProjects(); - } - if ($this->state === 'create-resource') { - $this->selectExistingServer(); - $this->selectExistingProject(); - } - if ($this->state === 'private-key') { - $this->setServerType('remote'); - } - if ($this->state === 'create-server') { - $this->selectExistingPrivateKey(); - } - if ($this->state === 'validate-server') { - $this->selectExistingServer(); - } - if ($this->state === 'select-existing-server') { - $this->selectExistingServer(); - } + // if ($this->currentState === 'create-project') { + // $this->getProjects(); + // } + // if ($this->currentState === 'create-resource') { + // $this->selectExistingServer(); + // $this->selectExistingProject(); + // } + // if ($this->currentState === 'private-key') { + // $this->setServerType('remote'); + // } + // if ($this->currentState === 'create-server') { + // $this->selectExistingPrivateKey(); + // } + // if ($this->currentState === 'validate-server') { + // $this->selectExistingServer(); + // } + // if ($this->currentState === 'select-existing-server') { + // $this->selectExistingServer(); + // } } public function explanation() @@ -97,7 +92,7 @@ public function explanation() if (isCloud()) { return $this->setServerType('remote'); } - $this->state = 'select-server-type'; + $this->currentState = 'select-server-type'; } public function restartBoarding() @@ -136,10 +131,10 @@ public function setServerType(string $type) $this->servers = Server::ownedByCurrentTeam(['name'])->where('id', '!=', 0)->get(); if ($this->servers->count() > 0) { $this->selectedExistingServer = $this->servers->first()->id; - $this->state = 'select-existing-server'; + $this->currentState = 'select-existing-server'; return; } - $this->state = 'private-key'; + $this->currentState = 'private-key'; } } public function selectExistingServer() @@ -147,12 +142,12 @@ public function selectExistingServer() $this->createdServer = Server::find($this->selectedExistingServer); if (!$this->createdServer) { $this->dispatch('error', 'Server is not found.'); - $this->state = 'private-key'; + $this->currentState = 'private-key'; return; } $this->selectedExistingPrivateKey = $this->createdServer->privateKey->id; $this->serverPublicKey = $this->createdServer->privateKey->publicKey(); - $this->state = 'validate-server'; + $this->currentState = 'validate-server'; } public function getProxyType() { @@ -160,7 +155,7 @@ public function getProxyType() $this->selectProxy(ProxyTypes::TRAEFIK_V2->value); // $proxyTypeSet = $this->createdServer->proxy->type; // if (!$proxyTypeSet) { - // $this->state = 'select-proxy'; + // $this->currentState = 'select-proxy'; // return; // } $this->getProjects(); @@ -173,12 +168,12 @@ public function selectExistingPrivateKey() } $this->createdPrivateKey = PrivateKey::find($this->selectedExistingPrivateKey); $this->privateKey = $this->createdPrivateKey->private_key; - $this->state = 'create-server'; + $this->currentState = 'create-server'; } public function createNewServer() { $this->selectedExistingServer = null; - $this->state = 'private-key'; + $this->currentState = 'private-key'; } public function setPrivateKey(string $type) { @@ -187,7 +182,7 @@ public function setPrivateKey(string $type) if ($type === 'create') { $this->createNewPrivateKey(); } - $this->state = 'create-private-key'; + $this->currentState = 'create-private-key'; } public function savePrivateKey() { @@ -202,7 +197,7 @@ public function savePrivateKey() 'team_id' => currentTeam()->id ]); $this->createdPrivateKey->save(); - $this->state = 'create-server'; + $this->currentState = 'create-server'; } public function saveServer() { @@ -231,7 +226,7 @@ public function saveServer() $this->createdServer->settings->save(); $this->createdServer->addInitialNetwork(); $this->selectedExistingServer = $this->createdServer->id; - $this->state = 'validate-server'; + $this->currentState = 'validate-server'; } public function installServer() { @@ -258,7 +253,7 @@ public function validateServer() $dockerVersion = instant_remote_process(["docker version|head -2|grep -i version| awk '{print $2}'"], $this->createdServer, true); $dockerVersion = checkMinimumDockerEngineVersion($dockerVersion); if (is_null($dockerVersion)) { - $this->state = 'validate-server'; + $this->currentState = 'validate-server'; throw new \Exception('Docker not found or old version is installed.'); } $this->createdServer->settings()->update([ @@ -286,12 +281,12 @@ public function getProjects() if ($this->projects->count() > 0) { $this->selectedProject = $this->projects->first()->id; } - $this->state = 'create-project'; + $this->currentState = 'create-project'; } public function selectExistingProject() { $this->createdProject = Project::find($this->selectedProject); - $this->state = 'create-resource'; + $this->currentState = 'create-resource'; } public function createNewProject() { @@ -299,7 +294,7 @@ public function createNewProject() 'name' => "My first project", 'team_id' => currentTeam()->id ]); - $this->state = 'create-resource'; + $this->currentState = 'create-resource'; } public function showNewResource() { diff --git a/composer.json b/composer.json index 1624e1390..b57263534 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,6 @@ "stripe/stripe-php": "^12.0", "symfony/yaml": "^6.2", "visus/cuid2": "^2.0.0", - "wire-elements/modal": "^2.0", "yosymfony/toml": "^1.0" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 1c52be3ab..91613ec5f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9bdaf702cdd870434444f8937a816fdb", + "content-hash": "e095b8a9eb22df2943cbc3e9649ff9e8", "packages": [ { "name": "amphp/amp", @@ -11859,64 +11859,6 @@ }, "time": "2022-06-03T18:03:27+00:00" }, - { - "name": "wire-elements/modal", - "version": "2.0.9", - "source": { - "type": "git", - "url": "https://github.com/wire-elements/modal.git", - "reference": "899b05e313403669aa8a359db71a066246184355" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wire-elements/modal/zipball/899b05e313403669aa8a359db71a066246184355", - "reference": "899b05e313403669aa8a359db71a066246184355", - "shasum": "" - }, - "require": { - "livewire/livewire": "^3.2.3", - "php": "^8.1", - "spatie/laravel-package-tools": "^1.9" - }, - "require-dev": { - "orchestra/testbench": "^8.5", - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "LivewireUI\\Modal\\LivewireModalServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "LivewireUI\\Modal\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Philo Hermans", - "email": "me@philohermans.com" - } - ], - "description": "Laravel Livewire modal component", - "keywords": [ - "laravel", - "livewire", - "modal" - ], - "support": { - "issues": "https://github.com/wire-elements/modal/issues", - "source": "https://github.com/wire-elements/modal/tree/2.0.9" - }, - "time": "2023-12-08T09:31:14+00:00" - }, { "name": "yosymfony/parser-utils", "version": "v2.0.0", diff --git a/config/sentry.php b/config/sentry.php index d7469ecfc..00613c115 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.242', + 'release' => '4.0.0-beta.243', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index f67327b64..a16c004bf 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ false, - - /* - |-------------------------------------------------------------------------- - | Include JS - |-------------------------------------------------------------------------- - | - | Livewire UI will inject the required Javascript in your blade template. - | If you want to bundle the required Javascript you can set this to false - | and add `require('vendor/wire-elements/modal/resources/js/modal');` - | to your script bundler like webpack. - | - */ - 'include_js' => false, - - /* - |-------------------------------------------------------------------------- - | Modal Component Defaults - |-------------------------------------------------------------------------- - | - | Configure the default properties for a modal component. - | - | Supported modal_max_width - | 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl', '7xl' - */ - 'component_defaults' => [ - 'modal_max_width' => '7xl', - - 'close_modal_on_click_away' => true, - - 'close_modal_on_escape' => true, - - 'close_modal_on_escape_is_forceful' => true, - - 'dispatch_close_event' => false, - - 'destroy_on_close' => false, - ], -]; diff --git a/resources/js/app.js b/resources/js/app.js index a49c95e97..47313863b 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1,6 +1,5 @@ import { createApp } from "vue"; import MagicBar from "./components/MagicBar.vue"; -import "../../vendor/wire-elements/modal/resources/js/modal"; const app = createApp({}); app.component("magic-bar", MagicBar); diff --git a/resources/views/auth/confirm-password.blade.php b/resources/views/auth/confirm-password.blade.php index c376c6af5..8d491a218 100644 --- a/resources/views/auth/confirm-password.blade.php +++ b/resources/views/auth/confirm-password.blade.php @@ -3,7 +3,7 @@