Skip to content

Commit

Permalink
Move the Import from a File button within the toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
tnajdek committed Dec 4, 2024
1 parent 233dd63 commit 639a755
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/js/component/item/actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ const ItemActionsDesktop = memo(props => {
<Icon type="16/note" width="16" height="16" />
</Button>
)}
{(itemsSource === 'collection' || itemsSource === 'top') && (
<ImportAction
tabIndex={-2}
onFocusNext={onFocusNext}
onFocusPrev={onFocusPrev}
/>
)}
</ToolGroup>
<ToolGroup>
{ !isTrash && (
Expand Down Expand Up @@ -248,11 +255,6 @@ const ItemActionsDesktop = memo(props => {
</Fragment>
) }
<ToolGroup>
<ImportAction
tabIndex={-2}
onFocusNext={onFocusNext}
onFocusPrev={onFocusPrev}
/>
<ExportActions
disabled={ selectedContainsCollection || selectedItemsCount === 0 || selectedItemsCount > 100 }
tabIndex={ -2 }
Expand Down
3 changes: 2 additions & 1 deletion src/js/component/item/actions/import.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ const ImportAction = ({ disabled, onFocusNext, onFocusPrev, tabIndex }) => {
ref={fileInputRef}
tabIndex={-1}
type="file"
title="Import From a File (BiBTeX, RIS, etc.)"
/>
<Button
disabled={disabled}
icon
onClick={handleImportClick}
onKeyDown={handleKeyDown}
tabIndex={tabIndex}
title="Import"
title="Import From a File (BiBTeX, RIS, etc.)"
>
<Icon type="16/caret-16" width="16" height="16" />
</Button>
Expand Down

0 comments on commit 639a755

Please sign in to comment.