Skip to content

Commit

Permalink
✨ show the 'import transactions' button even if accounts have banksync (
Browse files Browse the repository at this point in the history
  • Loading branch information
MatissJanis authored Oct 9, 2024
1 parent f786bdc commit 79f640c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 27 deletions.
53 changes: 26 additions & 27 deletions packages/desktop-client/src/components/accounts/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,38 +287,37 @@ export function AccountHeader({
align="center"
style={{ marginTop: 12 }}
>
{((account && !account.closed) || canSync) && (
{canSync && (
<Button
variant="bare"
onPress={canSync ? onSync : onImport}
isDisabled={canSync && isServerOffline}
onPress={onSync}
isDisabled={isServerOffline}
>
{canSync ? (
<>
<AnimatedRefresh
width={13}
height={13}
animating={
account
? accountsSyncing.includes(account.id)
: accountsSyncing.length > 0
}
style={{ marginRight: 4 }}
/>{' '}
{isServerOffline ? t('Bank Sync Offline') : t('Bank Sync')}
</>
) : (
<>
<SvgDownloadThickBottom
width={13}
height={13}
style={{ marginRight: 4 }}
/>{' '}
<Trans>Import</Trans>
</>
)}
<AnimatedRefresh
width={13}
height={13}
animating={
account
? accountsSyncing.includes(account.id)
: accountsSyncing.length > 0
}
style={{ marginRight: 4 }}
/>{' '}
{isServerOffline ? t('Bank Sync Offline') : t('Bank Sync')}
</Button>
)}

{account && !account.closed && (
<Button variant="bare" onPress={onImport}>
<SvgDownloadThickBottom
width={13}
height={13}
style={{ marginRight: 4 }}
/>{' '}
<Trans>Import</Trans>
</Button>
)}

{!showEmptyMessage && (
<Button variant="bare" onPress={onAddTransaction}>
<SvgAdd width={10} height={10} style={{ marginRight: 3 }} />
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/3615.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [MatissJanis]
---

Show the "import transactions" button even if accounts have bank-sync enabled.

0 comments on commit 79f640c

Please sign in to comment.