mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 14:24:46 +02:00
wip
This commit is contained in:
parent
b7f26ba26d
commit
795102457f
@ -3,6 +3,8 @@
|
|||||||
namespace App\Extensions\OAuth\Providers;
|
namespace App\Extensions\OAuth\Providers;
|
||||||
|
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
|
use Filament\Schemas\Components\Component;
|
||||||
|
use Filament\Schemas\Components\Wizard\Step;
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
@ -65,7 +67,7 @@ abstract class OAuthProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Filament\Schemas\Components\Component[]
|
* @return Component[]
|
||||||
*/
|
*/
|
||||||
public function getSettingsForm(): array
|
public function getSettingsForm(): array
|
||||||
{
|
{
|
||||||
@ -94,12 +96,12 @@ abstract class OAuthProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Filament\Schemas\Components\Wizard\Step[]
|
* @return Step[]
|
||||||
*/
|
*/
|
||||||
public function getSetupSteps(): array
|
public function getSetupSteps(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
\Filament\Schemas\Components\Wizard\Step::make('OAuth Config')
|
Step::make('OAuth Config')
|
||||||
->columns(4)
|
->columns(4)
|
||||||
->schema($this->getSettingsForm()),
|
->schema($this->getSettingsForm()),
|
||||||
];
|
];
|
||||||
|
@ -17,6 +17,7 @@ use chillerlan\QRCode\Common\Version;
|
|||||||
use chillerlan\QRCode\QRCode;
|
use chillerlan\QRCode\QRCode;
|
||||||
use chillerlan\QRCode\QROptions;
|
use chillerlan\QRCode\QROptions;
|
||||||
use DateTimeZone;
|
use DateTimeZone;
|
||||||
|
use Exception;
|
||||||
use Filament\Actions;
|
use Filament\Actions;
|
||||||
use Filament\Actions\Action;
|
use Filament\Actions\Action;
|
||||||
use Filament\Forms\Components\FileUpload;
|
use Filament\Forms\Components\FileUpload;
|
||||||
@ -60,6 +61,9 @@ class EditProfile extends \Filament\Auth\Pages\EditProfile
|
|||||||
return config('panel.filament.display-width', 'screen-2xl');
|
return config('panel.filament.display-width', 'screen-2xl');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
protected function getForms(): array
|
protected function getForms(): array
|
||||||
{
|
{
|
||||||
$oauthProviders = collect(OAuthProvider::get())->filter(fn (OAuthProvider $provider) => $provider->isEnabled())->all();
|
$oauthProviders = collect(OAuthProvider::get())->filter(fn (OAuthProvider $provider) => $provider->isEnabled())->all();
|
||||||
@ -243,7 +247,7 @@ class EditProfile extends \Filament\Auth\Pages\EditProfile
|
|||||||
return [
|
return [
|
||||||
TextEntry::make('qr')
|
TextEntry::make('qr')
|
||||||
->label(trans('profile.scan_qr'))
|
->label(trans('profile.scan_qr'))
|
||||||
->state(fn () => new HtmlString("
|
->content(fn () => new HtmlString("
|
||||||
<div style='width: 300px; background-color: rgb(24, 24, 27);'>$image</div>
|
<div style='width: 300px; background-color: rgb(24, 24, 27);'>$image</div>
|
||||||
"))
|
"))
|
||||||
->helperText(trans('profile.setup_key') .': '. $secret),
|
->helperText(trans('profile.setup_key') .': '. $secret),
|
||||||
@ -341,7 +345,7 @@ class EditProfile extends \Filament\Auth\Pages\EditProfile
|
|||||||
$query->orderBy('timestamp', 'desc');
|
$query->orderBy('timestamp', 'desc');
|
||||||
})
|
})
|
||||||
->schema([
|
->schema([
|
||||||
TextEntry::make('activity!')->label('')->state(fn (ActivityLog $log) => new HtmlString($log->htmlable())),
|
TextEntry::make('activity!')->label('')->content(fn (ActivityLog $log) => new HtmlString($log->htmlable())),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user