vormkracht10 / filament-2fa

Integrate Laravel Fortify easily in your Filament apps.
MIT License
28 stars 2 forks source link

[Bug]: Stylesheet missing #11

Closed CodeWithDennis closed 1 month ago

CodeWithDennis commented 1 month ago

What happened?

Since the package has been renamed, the stylesheet path in the class is wrong: vendor/vormkracht10/filament-two-factor-auth/resources/dist/filament-two-factor-auth.css. However, this might not be needed if you simply add the Blade files to the content array in the project's Tailwind config. You could include a readme in the package to guide users on adding that line to their file.

import preset from '../../../../vendor/filament/filament/tailwind.config.preset'

export default {
    presets: [preset],
    content: [
        './app/Filament/**/*.php',
        './resources/views/filament/**/*.blade.php',
        './vendor/filament/**/*.blade.php',
        './vendor/vormkracht10/filament-2fa/resources/**/*.blade.php'
    ],
}

How to reproduce the bug

Add package to panel

Package Version

1.1.5

PHP Version

8.2

Laravel Version

10

Which operating systems does with happen with?

macOS

Notes

No response

Baspa commented 1 month ago

Oops, that should be fixed in the latest version (v1.1.7).

CodeWithDennis commented 1 month ago

@Baspa Almost, you forgot to change the viteTheme in the TwoFactorAuthPlugin.php

// L31
->viteTheme('vendor/vormkracht10/filament-two-factor-auth/resources/dist/filament-two-factor-auth.css')

to

// L31
->viteTheme('vendor/vormkracht10/filament-2fa/resources/dist/filament-two-factor-auth.css')