Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show sync indicator in account header #2560

Merged
merged 6 commits into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/desktop-client/src/components/accounts/Account.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,7 @@ class AccountInternal extends PureComponent {
hideFraction,
addNotification,
accountsSyncing,
failedAccounts,
pushModal,
replaceModal,
showExtraBalances,
Expand Down Expand Up @@ -1478,6 +1479,7 @@ class AccountInternal extends PureComponent {
location={this.props.location}
accountName={accountName}
accountsSyncing={accountsSyncing}
failedAccounts={failedAccounts}
accounts={accounts}
transactions={transactions}
showBalances={showBalances}
Expand Down
31 changes: 27 additions & 4 deletions packages/desktop-client/src/components/accounts/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export function AccountHeader({
filterId,
filtersList,
accountsSyncing,
failedAccounts,
accounts,
transactions,
showBalances,
Expand Down Expand Up @@ -131,7 +132,28 @@ export function AccountHeader({
<View
style={{ marginTop: 2, marginBottom: 10, alignItems: 'flex-start' }}
>
<View>
<View
style={{
flexDirection: 'row',
alignItems: 'center',
gap: 3,
}}
>
{!!account?.bank && (
<View
style={{
backgroundColor: accountsSyncing.includes(account.id)
? theme.sidebarItemBackgroundPending
: failedAccounts.has(account.id)
? theme.sidebarItemBackgroundFailed
: theme.sidebarItemBackgroundPositive,
marginRight: '4px',
width: 8,
height: 8,
borderRadius: 8,
}}
/>
)}
{editingName ? (
<InitialFocus>
<Input
Expand All @@ -142,11 +164,12 @@ export function AccountHeader({
style={{
fontSize: 25,
fontWeight: 500,
marginTop: -5,
marginBottom: -2,
marginLeft: -5,
marginTop: -3,
marginBottom: -4,
marginLeft: -6,
paddingTop: 2,
paddingBottom: 2,
width: Math.max(20, accountName.length) + 'ch',
}}
/>
</InitialFocus>
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/2560.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Features
authors: [psybers]
---

Show sync indicator in account header.
Loading