fixed indentation
This commit is contained in:
@@ -51,34 +51,34 @@ export function ConnectModal({ serviceType, label, onClose, onSuccess }: Readonl
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<dialog className="modal" ref={dialogRef}>
|
<dialog className="modal" ref={dialogRef}>
|
||||||
<div className="modal__header">
|
<div className="modal__header">
|
||||||
<h2 className="modal__title" id="modal-title">Connect to {label}</h2>
|
<h2 className="modal__title" id="modal-title">Connect to {label}</h2>
|
||||||
<button className="modal__close" onClick={onClose} aria-label="Close">×</button>
|
<button className="modal__close" onClick={onClose} aria-label="Close">×</button>
|
||||||
|
</div>
|
||||||
|
<form className="modal__form" onSubmit={handleSubmit}>
|
||||||
|
<div className="modal__field">
|
||||||
|
<label className="modal__label" htmlFor="appUrl">App URL</label>
|
||||||
|
<input id="appUrl" ref={firstInputRef} className="modal__input" type="url"
|
||||||
|
placeholder="https://homebox.example.com"
|
||||||
|
value={appUrl} onChange={e => setAppUrl(e.target.value)} required />
|
||||||
</div>
|
</div>
|
||||||
<form className="modal__form" onSubmit={handleSubmit}>
|
<div className="modal__field">
|
||||||
<div className="modal__field">
|
<label className="modal__label" htmlFor="username">Username</label>
|
||||||
<label className="modal__label" htmlFor="appUrl">App URL</label>
|
<input id="username" className="modal__input" type="text"
|
||||||
<input id="appUrl" ref={firstInputRef} className="modal__input" type="url"
|
autoComplete="username"
|
||||||
placeholder="https://homebox.example.com"
|
value={username} onChange={e => setUsername(e.target.value)} required />
|
||||||
value={appUrl} onChange={e => setAppUrl(e.target.value)} required />
|
</div>
|
||||||
</div>
|
<div className="modal__field">
|
||||||
<div className="modal__field">
|
<label className="modal__label" htmlFor="password">Password</label>
|
||||||
<label className="modal__label" htmlFor="username">Username</label>
|
<input id="password" className="modal__input" type="password"
|
||||||
<input id="username" className="modal__input" type="text"
|
autoComplete="current-password"
|
||||||
autoComplete="username"
|
value={password} onChange={e => setPassword(e.target.value)} required />
|
||||||
value={username} onChange={e => setUsername(e.target.value)} required />
|
</div>
|
||||||
</div>
|
{error && <p className="modal__error">{error}</p>}
|
||||||
<div className="modal__field">
|
<button className="modal__submit" type="submit" disabled={loading}>
|
||||||
<label className="modal__label" htmlFor="password">Password</label>
|
{loading ? 'Connecting…' : 'Connect'}
|
||||||
<input id="password" className="modal__input" type="password"
|
</button>
|
||||||
autoComplete="current-password"
|
</form>
|
||||||
value={password} onChange={e => setPassword(e.target.value)} required />
|
</dialog>
|
||||||
</div>
|
|
||||||
{error && <p className="modal__error">{error}</p>}
|
|
||||||
<button className="modal__submit" type="submit" disabled={loading}>
|
|
||||||
{loading ? 'Connecting…' : 'Connect'}
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</dialog>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user