toaster
This commit is contained in:
@@ -59,7 +59,7 @@ class General extends Component
|
||||
$this->application->settings->is_force_https_enabled = $this->is_force_https_enabled;
|
||||
$this->application->settings->save();
|
||||
$this->application->refresh();
|
||||
$this->emit('saved', 'Application settings updated!');
|
||||
$this->emit('success', 'Application settings updated!');
|
||||
$this->checkWildCardDomain();
|
||||
}
|
||||
protected function checkWildCardDomain()
|
||||
|
||||
@@ -40,6 +40,6 @@ class Source extends Component
|
||||
$this->application->git_commit_sha = 'HEAD';
|
||||
}
|
||||
$this->application->save();
|
||||
$this->emit('saved', 'Application source updated!');
|
||||
$this->emit('success', 'Application source updated!');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,6 +157,6 @@ class GithubPrivateRepository extends Component
|
||||
$this->port = 3000;
|
||||
$this->publish_directory = null;
|
||||
}
|
||||
$this->emit('saved', 'Application settings updated!');
|
||||
$this->emit('success', 'Application settings updated!');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class PublicGitRepository extends Component
|
||||
$this->port = 3000;
|
||||
$this->publish_directory = null;
|
||||
}
|
||||
$this->emit('saved', 'Application settings updated!');
|
||||
$this->emit('success', 'Application settings updated!');
|
||||
}
|
||||
public function load_branches()
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ class ByIp extends Component
|
||||
}
|
||||
public function instantSave()
|
||||
{
|
||||
$this->emit('saved', 'Application settings updated!');
|
||||
$this->emit('success', 'Application settings updated!');
|
||||
}
|
||||
public function submit()
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ class Configuration extends Component
|
||||
$this->settings->is_auto_update_enabled = $this->is_auto_update_enabled;
|
||||
$this->settings->is_registration_enabled = $this->is_registration_enabled;
|
||||
$this->settings->save();
|
||||
$this->emit('saved', 'Settings updated!');
|
||||
$this->emit('success', 'Settings updated!');
|
||||
}
|
||||
private function setup_instance_fqdn()
|
||||
{
|
||||
|
||||
@@ -59,9 +59,9 @@ class InviteLink extends Component
|
||||
]);
|
||||
if ($isEmail) {
|
||||
$user->first()->notify(new InvitationLinkEmail());
|
||||
$this->emit('message', 'Invitation sent via email successfully.');
|
||||
$this->emit('success', 'Invitation sent via email successfully.');
|
||||
} else {
|
||||
$this->emit('message', 'Invitation link generated.');
|
||||
$this->emit('success', 'Invitation link generated.');
|
||||
}
|
||||
$this->emit('refreshInvitations');
|
||||
} catch (\Throwable $e) {
|
||||
|
||||
@@ -2,17 +2,19 @@
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use Masmerise\Toaster\Toaster;
|
||||
use App\Jobs\InstanceAutoUpdateJob;
|
||||
use Livewire\Component;
|
||||
|
||||
class ForceUpgrade extends Component
|
||||
class Upgrade extends Component
|
||||
{
|
||||
public bool $visible = false;
|
||||
public bool $showProgress = false;
|
||||
public function upgrade()
|
||||
{
|
||||
try {
|
||||
$this->visible = true;
|
||||
$this->showProgress = true;
|
||||
dispatch(new InstanceAutoUpdateJob(force: true));
|
||||
Toaster::success('Update started.');
|
||||
} catch (\Exception $e) {
|
||||
return general_error_handler(err: $e, that: $this);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class Upgrading extends Component
|
||||
{
|
||||
public bool $visible = false;
|
||||
protected $listeners = ['updateInitiated'];
|
||||
public function updateInitiated()
|
||||
{
|
||||
$this->visible = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user