Merge branch 'next' into feat/disable-default-redirect

This commit is contained in:
Kael
2024-10-28 19:20:52 +11:00
committed by GitHub
63 changed files with 628 additions and 872 deletions

View File

@@ -17,7 +17,7 @@ class Delete extends Component
public function delete($password)
{
if (! InstanceSettings::get('disable_two_step_confirmation')) {
if (! data_get(InstanceSettings::get(), 'disable_two_step_confirmation')) {
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');

View File

@@ -174,7 +174,21 @@ class Form extends Component
$this->server->settings->refresh();
return handleError($e, $this);
} finally {}
} finally {
}
}
public function saveSentinel()
{
try {
$this->validate();
$this->server->settings->save();
$this->dispatch('success', 'Sentinel updated.');
} catch (\Throwable $e) {
return handleError($e, $this);
} finally {
$this->checkSyncStatus();
}
}
public function restartSentinel($notification = true)
@@ -184,7 +198,8 @@ class Form extends Component
$this->validate([
'server.settings.sentinel_custom_url' => 'required|url',
]);
$this->server->restartSentinel();
$this->server->settings->save();
$this->server->restartSentinel(async: false);
if ($notification) {
$this->dispatch('success', 'Sentinel restarted.');
}