diff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-1-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-1-chromium-linux.png
index 5574f459f07..97d5dec1aa3 100644
Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-1-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png
index 996545fab4e..9d912171d47 100644
Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-3-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-3-chromium-linux.png
index 64807bb85f5..1d67bf60131 100644
Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-3-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-4-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-4-chromium-linux.png
index e37fc6eeda8..42dbf39a157 100644
Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-4-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-4-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-1-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-1-chromium-linux.png
index 5f3d2ce786f..8ecab730c23 100644
Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-1-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-2-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-2-chromium-linux.png
index 4b35b1090e0..ab76fcd48d9 100644
Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-2-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-2-chromium-linux.png differ
diff --git a/packages/desktop-client/src/components/Page.tsx b/packages/desktop-client/src/components/Page.tsx
index 77d27bbba75..6f666400f7d 100644
--- a/packages/desktop-client/src/components/Page.tsx
+++ b/packages/desktop-client/src/components/Page.tsx
@@ -6,13 +6,21 @@ import { theme, styles, type CSSProperties } from '../style';
import Text from './common/Text';
import View from './common/View';
-function PageTitle({
- name,
- style,
-}: {
+type PageHeaderProps = {
name: ReactNode;
style?: CSSProperties;
-}) {
+ leftContent?: ReactNode;
+ rightContent?: ReactNode;
+};
+
+const HEADER_HEIGHT = 50;
+
+function PageHeader({
+ name,
+ style,
+ leftContent,
+ rightContent,
+}: PageHeaderProps) {
const { isNarrowWidth } = useResponsive();
if (isNarrowWidth) {
@@ -23,16 +31,42 @@ function PageTitle({
backgroundColor: theme.mobilePageBackground,
color: theme.mobileModalText,
flexDirection: 'row',
- flex: '1 0 auto',
- fontSize: 18,
- fontWeight: 500,
- height: 50,
- justifyContent: 'center',
- overflowY: 'auto',
+ flexShrink: 0,
+ height: HEADER_HEIGHT,
...style,
}}
>
- {name}
+
+ {leftContent}
+
+
+ {name}
+
+
+ {rightContent}
+
);
}
@@ -51,25 +85,33 @@ function PageTitle({
);
}
+type PageProps = {
+ title: ReactNode;
+ titleStyle?: CSSProperties;
+ headerLeftContent?: ReactNode;
+ headerRightContent?: ReactNode;
+ children: ReactNode;
+};
+
export function Page({
title,
- children,
titleStyle,
-}: {
- title: ReactNode;
- children: ReactNode;
- titleStyle?: CSSProperties;
-}) {
+ headerLeftContent,
+ headerRightContent,
+ children,
+}: PageProps) {
let { isNarrowWidth } = useResponsive();
let HORIZONTAL_PADDING = isNarrowWidth ? 10 : 20;
return (
-
-
-
-
-
-
-
- {account.name}
-
-
-
-
-
-
-
-
-
+
);
}
+
+function AccountDetailsHeader({ account }) {
+ return (
+
+
+
+
+
+
+ {account.name}
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/packages/desktop-client/src/components/accounts/MobileAccounts.js b/packages/desktop-client/src/components/accounts/MobileAccounts.js
index 186583d3a73..eda891234a0 100644
--- a/packages/desktop-client/src/components/accounts/MobileAccounts.js
+++ b/packages/desktop-client/src/components/accounts/MobileAccounts.js
@@ -7,6 +7,7 @@ import { useActions } from '../../hooks/useActions';
import useCategories from '../../hooks/useCategories';
import useNavigate from '../../hooks/useNavigate';
import { useSetThemeColor } from '../../hooks/useSetThemeColor';
+import Add from '../../icons/v1/Add';
import { theme, styles } from '../../style';
import Button from '../common/Button';
import Text from '../common/Text';
@@ -124,7 +125,7 @@ function AccountCard({ account, updated, getBalanceQuery, onSelect }) {
);
}
-function EmptyMessage({ onAdd }) {
+function EmptyMessage() {
return (
@@ -132,22 +133,6 @@ function EmptyMessage({ onAdd }) {
account to automatically download transactions, or manage it locally
yourself.
-
-
-
-
- In the future, you can add accounts using the add button in the header.
-
);
}
@@ -160,16 +145,14 @@ function AccountList({
getOffBudgetBalance,
onAddAccount,
onSelectAccount,
+ onSync,
}) {
- const { syncAndDownload } = useActions();
-
const budgetedAccounts = accounts.filter(account => account.offbudget === 0);
const offbudgetAccounts = accounts.filter(account => account.offbudget === 1);
-
- // If there are no accounts, show a helpful message
- if (accounts.length === 0) {
- return ;
- }
+ const noBackgroundColorStyle = {
+ backgroundColor: 'transparent',
+ color: 'white',
+ };
return (
@@ -180,9 +163,27 @@ function AccountList({
color: theme.mobileHeaderText,
fontSize: 16,
}}
+ headerRightContent={
+
+ }
>
-
-
+ {accounts.length === 0 && }
+
+ {budgetedAccounts.length > 0 && (
+
+ )}
{budgetedAccounts.map(acct => (
))}
-
+ {offbudgetAccounts.length > 0 && (
+
+ )}
{offbudgetAccounts.map(acct => (
{}} // () => navigate('AddAccountModal')
+ onAddAccount={() => replaceModal('add-account')}
onSelectAccount={onSelectAccount}
onSelectTransaction={onSelectTransaction}
+ onSync={syncAndDownload}
/>
);
diff --git a/packages/desktop-client/src/components/modals/CreateLocalAccount.tsx b/packages/desktop-client/src/components/modals/CreateLocalAccount.tsx
index 44984c491de..7b4ea942dff 100644
--- a/packages/desktop-client/src/components/modals/CreateLocalAccount.tsx
+++ b/packages/desktop-client/src/components/modals/CreateLocalAccount.tsx
@@ -132,6 +132,7 @@ function CreateLocalAccount({ modalProps, actions }: CreateLocalAccountProps) {
setBalance(event.target.value)}
onBlur={event => {
diff --git a/packages/desktop-client/src/components/transactions/MobileTransaction.js b/packages/desktop-client/src/components/transactions/MobileTransaction.js
index 688ff6f294e..0ff83a3aae9 100644
--- a/packages/desktop-client/src/components/transactions/MobileTransaction.js
+++ b/packages/desktop-client/src/components/transactions/MobileTransaction.js
@@ -362,6 +362,7 @@ class TransactionEditInner extends PureComponent {