mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 17:36:18 -05:00
Focusing on lone input when opening modals.
This commit is contained in:
parent
756c063d15
commit
4dfb997bfc
5 changed files with 8 additions and 4 deletions
|
|
@ -331,6 +331,7 @@ function EditTagsModal() {
|
|||
|
||||
<Form autoComplete='off'>
|
||||
<Form.Input required
|
||||
autoFocus
|
||||
label={<b>Tag Name</b>}
|
||||
placeholder='Unique name'
|
||||
value={tagName}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ export function AddToPlaylistModal({open, onClose, items = [], onComplete}) {
|
|||
<Form onSubmit={handleCreateAndAdd} style={{marginTop: '1em'}}>
|
||||
<Form.Field>
|
||||
<label>Or create a new playlist</label>
|
||||
<Input placeholder='New playlist name...' value={newName}
|
||||
<Input autoFocus placeholder='New playlist name...' value={newName}
|
||||
onChange={(e, {value}) => setNewName(value)}/>
|
||||
</Form.Field>
|
||||
</Form>
|
||||
|
|
|
|||
|
|
@ -663,6 +663,7 @@ export function RenameModal({open, onClose, path, onSubmit, onPending}) {
|
|||
<pre>{parent ? parent + '/' : null}{value}</pre>
|
||||
|
||||
<Input fluid
|
||||
autoFocus
|
||||
label='Name'
|
||||
value={value}
|
||||
onChange={handleInputChange}
|
||||
|
|
@ -725,7 +726,7 @@ export function MoveModal({open, paths, onClose, onSubmit}) {
|
|||
<Modal.Header>Move Files/Directories</Modal.Header>
|
||||
<Modal.Content>
|
||||
<p>Search for a directory to move your files into:</p>
|
||||
<DirectorySearch onSelect={handleDirectory} disabled={pending}/>
|
||||
<DirectorySearch onSelect={handleDirectory} disabled={pending} input={{autoFocus: true}}/>
|
||||
|
||||
<Table>
|
||||
<TableHeader>
|
||||
|
|
@ -829,6 +830,7 @@ export function MakeDirectoryModal({open, onClose, parent, onSubmit}) {
|
|||
<Form onSubmit={handleSubmit}>
|
||||
<pre>{mediaDirectory}/{parent}{value}</pre>
|
||||
<Input fluid
|
||||
autoFocus
|
||||
label='Name'
|
||||
value={value}
|
||||
onChange={handleInputChange}
|
||||
|
|
|
|||
|
|
@ -795,6 +795,7 @@ function MountModal({disk, open, onClose, onMount}) {
|
|||
<Form.Field>
|
||||
<label>Mount Point</label>
|
||||
<Input
|
||||
autoFocus
|
||||
value={mountPoint}
|
||||
onChange={(e) => setMountPoint(e.target.value)}
|
||||
placeholder="/media/..."
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ function NewInventoryModal({open, onClose, onCreate}) {
|
|||
return <Modal open={open} onClose={onClose} closeIcon>
|
||||
<Modal.Header>New Inventory</Modal.Header>
|
||||
<Modal.Content>
|
||||
<Input fluid label='Name' value={name} onChange={e => setName(e.target.value)}
|
||||
<Input fluid autoFocus label='Name' value={name} onChange={e => setName(e.target.value)}
|
||||
placeholder='Food Storage' style={{marginBottom: '1em'}}/>
|
||||
<div>
|
||||
Type:{' '}
|
||||
|
|
@ -231,7 +231,7 @@ export function InventoryRoute() {
|
|||
<Modal open={renaming} onClose={() => setRenaming(false)} closeIcon size='tiny'>
|
||||
<Modal.Header>Rename Inventory</Modal.Header>
|
||||
<Modal.Content>
|
||||
<Input fluid value={renameValue} onChange={e => setRenameValue(e.target.value)}/>
|
||||
<Input fluid autoFocus value={renameValue} onChange={e => setRenameValue(e.target.value)}/>
|
||||
</Modal.Content>
|
||||
<Modal.Actions>
|
||||
<Button onClick={() => setRenaming(false)}>Cancel</Button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue