Closed mstfkhazaal closed 1 year ago
you are welcome to PR it. no time atm. might rewrite the whole plugin to globally control everything from a service provider.
Adding a switch to the Auth pages (Login, Register, Verify, Tenant, etc.) sounds like a fantastic idea! It will undoubtedly enhance user navigation and experience, making the platform more user-friendly and intuitive. This addition will streamline processes and provide users with a more cohesive experience. Well thought out!
Hello,
It's actually pretty easy to add this to the login page. This is how I'm doing it to show on the top right of the page, by adding a renderhook on the panel (p.e. AdminPanelProvider
):
->renderHook(
name: 'panels::body.start',
hook: function (): string {
return Blade::render(
<<<'EOD'
<div class="absolute top-2 right-2">
@livewire('switch-filament-language')
</div>
EOD
);
},
// scopes: [
// Pages\Auth\Login::class,
// Pages\Auth\Register::class,
// Pages\Auth\EmailVerification\EmailVerificationPrompt::class,
// Pages\Auth\PasswordReset\RequestPasswordReset::class,
// Pages\Auth\PasswordReset\ResetPassword::class,
// ]
);
One issue is hat scoping is not working (that's why the scopes are commented), so it shows on everypage (but get hidden behind the top bar). I'm starting a discussion on Filament to see how to solve it.
For reference, this is the Filament issue: https://github.com/filamentphp/filament/issues/8213
Add switch to Auth pages (Login,Register, verify,tenant...)