Add SealShare file sharing application with encryption, branding, auth, Docker, and Octane support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
4790be8142
commit
e37b322dde
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Livewire\Attributes\Layout;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
#[Layout('layouts.auth')]
|
||||
class SystemPasswordPrompt extends Component
|
||||
{
|
||||
#[Validate('required|string')]
|
||||
public string $password = '';
|
||||
|
||||
public function verify(): void
|
||||
{
|
||||
$this->validate();
|
||||
|
||||
$systemPassword = Setting::get('system_password');
|
||||
|
||||
if (! $systemPassword || ! Hash::check($this->password, $systemPassword)) {
|
||||
$this->addError('password', __('The password is incorrect.'));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
session(['system_password_verified' => true]);
|
||||
|
||||
$this->redirect(route('upload'), navigate: true);
|
||||
}
|
||||
|
||||
public function render(): mixed
|
||||
{
|
||||
return view('livewire.system-password-prompt');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user