norman-huth / nova-secret-field
This package provides a custom secret field that can be toggled to see its value.
Fund package maintenance!
huth.it/coffee
Installs: 31 292
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 0
Forks: 2
Open Issues: 1
Language:Vue
Requires
- php: ^8.0
- laravel/nova: ^4.0.0
This package is auto-updated.
Last update: 2024-11-24 21:41:25 UTC
README
This package provides a custom secret field that can be toggled to see its value.
Install
composer require norman-huth/nova-secret-field
Usage
use NormanHuth\SecretField\SecretField; class Client extends Resource { // ... public function fields(NovaRequest $request): array { return [ SecretField::make(__('Token'), 'token'), ]; }
Options
Same as a text field and disable „copy to clipboard“ method:
SecretField::make(__('Token'), 'token')->disableClipboard(),
Translate/Message text
Default:
{ "Copied": "Kopiert", "Copying failed": "Kopieren fehlgeschlagen" }
Change messages
SecretField::make(__('Token'), 'token') ->copiedMsg(__('Copied')) ->failedMsg(__('Copying failed')),
Misc
For Nova 3:
nalingia/nova-secret-field