feat: reveal password toggle for login form

addresses #869cqrw6w
This commit is contained in:
Björn Fromme
2026-07-01 10:29:30 +02:00
parent 1b0d7ce1a9
commit 022819cbe6
3 changed files with 41 additions and 14 deletions
@@ -0,0 +1,11 @@
import { Controller } from '@hotwired/stimulus'
export default class extends Controller {
static targets = [ 'field' ]
toggle() {
let type = this.fieldTarget.getAttribute('type') === 'password' ? 'text' : 'password'
this.fieldTarget.setAttribute('type', type)
}
}