Skip to content

A local-first personal finance app

📱 add bank sync settings page to mobile (#5978)

Matt Fiddamanb266ebf1ea61
diff --git a/packages/desktop-client/e2e/bank-sync.mobile.test.ts b/packages/desktop-client/e2e/bank-sync.mobile.test.ts
new file mode 100644
index 0000000000..01b97ced74
--- /dev/null
+++ b/packages/desktop-client/e2e/bank-sync.mobile.test.ts
@@ -0,0 +1,64 @@
+import { type Page } from '@playwright/test';
+
+import { expect, test } from './fixtures';
+import { ConfigurationPage } from './page-models/configuration-page';
+import { type MobileBankSyncPage } from './page-models/mobile-bank-sync-page';
+import { MobileNavigation } from './page-models/mobile-navigation';
+
+test.describe('Mobile Bank Sync', () => {
+ let page: Page;
+ let navigation: MobileNavigation;
+ let bankSyncPage: MobileBankSyncPage;
+ let configurationPage: ConfigurationPage;
+
+ test.beforeEach(async ({ browser }) => {
+ page = await browser.newPage();
+ navigation = new MobileNavigation(page);
+ configurationPage = new ConfigurationPage(page);
+
+ await page.setViewportSize({
+ width: 350,
+ height: 600,
+ });
+
+ await page.goto('/');
+ await configurationPage.createTestFile();
+
+ bankSyncPage = await navigation.goToBankSyncPage();
+ });
+
+ test.afterEach(async () => {
+ await page.close();
+ });
+
+ test('checks the page visuals', async () => {
+ await bankSyncPage.waitToLoad();
+
+ await expect(
+ page.getByRole('heading', { name: 'Bank Sync' }),
+ ).toBeVisible();
+
+ await expect(bankSyncPage.searchBox).toBeVisible();
+ await expect(bankSyncPage.searchBox).toHaveAttribute(
+ 'placeholder',
+ 'Filter accounts…',
+ );
+
+ await expect(page).toMatchThemeScreenshots();
+ });
+
+ test('searches for accounts', async () => {
+ await bankSyncPage.searchFor('Checking');
+ await expect(bankSyncPage.searchBox).toHaveValue('Checking');
+ await expect(page).toMatchThemeScreenshots();
+ });
+
+ test('page handles empty state gracefully', async () => {
+ await bankSyncPage.searchFor('NonExistentAccount123456789');
+
+ const emptyMessage = page.getByText(/No accounts found/);
+ await expect(emptyMessage).toBeVisible();
+
+ await expect(page).toMatchThemeScreenshots();
+ });
+});
diff --git a/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-checks-the-page-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-checks-the-page-visuals-1-chromium-linux.png
new file mode 100644
index 0000000000..6a50b0eb66
Binary files /dev/null and b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-checks-the-page-visuals-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-checks-the-page-visuals-2-chromium-linux.png b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-checks-the-page-visuals-2-chromium-linux.png
new file mode 100644
index 0000000000..d857633087
Binary files /dev/null and b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-checks-the-page-visuals-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-checks-the-page-visuals-3-chromium-linux.png b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-checks-the-page-visuals-3-chromium-linux.png
new file mode 100644
index 0000000000..1473d258f8
Binary files /dev/null and b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-checks-the-page-visuals-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-page-handles-empty-state-gracefully-1-chromium-linux.png b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-page-handles-empty-state-gracefully-1-chromium-linux.png
new file mode 100644
index 0000000000..76a69dc666
Binary files /dev/null and b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-page-handles-empty-state-gracefully-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-page-handles-empty-state-gracefully-2-chromium-linux.png b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-page-handles-empty-state-gracefully-2-chromium-linux.png
new file mode 100644
index 0000000000..a0841790bc
Binary files /dev/null and b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-page-handles-empty-state-gracefully-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-page-handles-empty-state-gracefully-3-chromium-linux.png b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-page-handles-empty-state-gracefully-3-chromium-linux.png
new file mode 100644
index 0000000000..4e1eadaefc
Binary files /dev/null and b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-page-handles-empty-state-gracefully-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-searches-for-accounts-1-chromium-linux.png b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-searches-for-accounts-1-chromium-linux.png
new file mode 100644
index 0000000000..58146b4bce
Binary files /dev/null and b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-searches-for-accounts-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-searches-for-accounts-2-chromium-linux.png b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-searches-for-accounts-2-chromium-linux.png
new file mode 100644
index 0000000000..d27837caad
Binary files /dev/null and b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-searches-for-accounts-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-searches-for-accounts-3-chromium-linux.png b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-searches-for-accounts-3-chromium-linux.png
new file mode 100644
index 0000000000..7cef5f06d4
Binary files /dev/null and b/packages/desktop-client/e2e/bank-sync.mobile.test.ts-snapshots/Mobile-Bank-Sync-searches-for-accounts-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/bank-sync.test.ts b/packages/desktop-client/e2e/bank-sync.test.ts
new file mode 100644
index 0000000000..62cdd77f18
--- /dev/null
+++ b/packages/desktop-client/e2e/bank-sync.test.ts
@@ -0,0 +1,35 @@
+import { type Page } from '@playwright/test';
+
+import { expect, test } from './fixtures';
+import { type BankSyncPage } from './page-models/bank-sync-page';
+import { ConfigurationPage } from './page-models/configuration-page';
+import { Navigation } from './page-models/navigation';
+
+test.describe('Bank Sync', () => {
+ let page: Page;
+ let navigation: Navigation;
+ let bankSyncPage: BankSyncPage;
+ let configurationPage: ConfigurationPage;
+
+ test.beforeAll(async ({ browser }) => {
+ page = await browser.newPage();
+ navigation = new Navigation(page);
+ configurationPage = new ConfigurationPage(page);
+
+ await page.goto('/');
+ await configurationPage.createTestFile();
+ });
+
+ test.afterAll(async () => {
+ await page.close();
+ });
+
+ test.beforeEach(async () => {
+ bankSyncPage = await navigation.goToBankSyncPage();
+ });
+
+ test('checks the page visuals', async () => {
+ await bankSyncPage.waitToLoad();
+ await expect(page).toMatchThemeScreenshots();
+ });
+});
diff --git a/packages/desktop-client/e2e/bank-sync.test.ts-snapshots/Bank-Sync-checks-the-page-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/bank-sync.test.ts-snapshots/Bank-Sync-checks-the-page-visuals-1-chromium-linux.png
new file mode 100644
index 0000000000..081c16e883
Binary files /dev/null and b/packages/desktop-client/e2e/bank-sync.test.ts-snapshots/Bank-Sync-checks-the-page-visuals-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/bank-sync.test.ts-snapshots/Bank-Sync-checks-the-page-visuals-2-chromium-linux.png b/packages/desktop-client/e2e/bank-sync.test.ts-snapshots/Bank-Sync-checks-the-page-visuals-2-chromium-linux.png
new file mode 100644
index 0000000000..0fc45a2a36
Binary files /dev/null and b/packages/desktop-client/e2e/bank-sync.test.ts-snapshots/Bank-Sync-checks-the-page-visuals-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/bank-sync.test.ts-snapshots/Bank-Sync-checks-the-page-visuals-3-chromium-linux.png b/packages/desktop-client/e2e/bank-sync.test.ts-snapshots/Bank-Sync-checks-the-page-visuals-3-chromium-linux.png
new file mode 100644
index 0000000000..ce797b2f91
Binary files /dev/null and b/packages/desktop-client/e2e/bank-sync.test.ts-snapshots/Bank-Sync-checks-the-page-visuals-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/page-models/bank-sync-page.ts b/packages/desktop-client/e2e/page-models/bank-sync-page.ts
new file mode 100644
index 0000000000..076662e259
--- /dev/null
+++ b/packages/desktop-client/e2e/page-models/bank-sync-page.ts
@@ -0,0 +1,13 @@
+import { type Page } from '@playwright/test';
+
+export class BankSyncPage {
+ readonly page: Page;
+
+ constructor(page: Page) {
+ this.page = page;
+ }
+
+ async waitToLoad() {
+ await this.page.waitForSelector('text=Bank Sync', { timeout: 10000 });
+ }
+}
diff --git a/packages/desktop-client/e2e/page-models/mobile-bank-sync-page.ts b/packages/desktop-client/e2e/page-models/mobile-bank-sync-page.ts
new file mode 100644
index 0000000000..95502eb33c
--- /dev/null
+++ b/packages/desktop-client/e2e/page-models/mobile-bank-sync-page.ts
@@ -0,0 +1,28 @@
+import { type Locator, type Page } from '@playwright/test';
+
+export class MobileBankSyncPage {
+ readonly page: Page;
+ readonly searchBox: Locator;
+ readonly accountsList: Locator;
+
+ constructor(page: Page) {
+ this.page = page;
+ this.searchBox = page.getByPlaceholder(/Filter accounts/i);
+ this.accountsList = page.getByRole('main');
+ }
+
+ async waitFor(options?: {
+ state?: 'attached' | 'detached' | 'visible' | 'hidden';
+ timeout?: number;
+ }) {
+ await this.accountsList.waitFor(options);
+ }
+
+ async waitToLoad() {
+ await this.page.waitForSelector('text=Bank Sync', { timeout: 10000 });
+ }
+
+ async searchFor(term: string) {
+ await this.searchBox.fill(term);
+ }
+}
diff --git a/packages/desktop-client/e2e/page-models/mobile-navigation.ts b/packages/desktop-client/e2e/page-models/mobile-navigation.ts
index fdc880f5c0..dcda9d9d73 100644
--- a/packages/desktop-client/e2e/page-models/mobile-navigation.ts
+++ b/packages/desktop-client/e2e/page-models/mobile-navigation.ts
@@ -2,6 +2,7 @@ import { type Locator, type Page } from '@playwright/test';
import { MobileAccountPage } from './mobile-account-page';
import { MobileAccountsPage } from './mobile-accounts-page';
+import { MobileBankSyncPage } from './mobile-bank-sync-page';
import { MobileBudgetPage } from './mobile-budget-page';
import { MobilePayeesPage } from './mobile-payees-page';
import { MobileReportsPage } from './mobile-reports-page';
@@ -15,6 +16,7 @@ const NAV_LINKS_HIDDEN_BY_DEFAULT = [
'Schedules',
'Payees',
'Rules',
+ 'Bank Sync',
'Settings',
];
const ROUTES_BY_PAGE = {
@@ -24,6 +26,7 @@ const ROUTES_BY_PAGE = {
Reports: '/reports',
Payees: '/payees',
Rules: '/rules',
+ 'Bank Sync': '/bank-sync',
Settings: '/settings',
};
@@ -182,6 +185,13 @@ export class MobileNavigation {
);
}
+ async goToBankSyncPage() {
+ return await this.navigateToPage(
+ 'Bank Sync',
+ () => new MobileBankSyncPage(this.page),
+ );
+ }
+
async goToSettingsPage() {
return await this.navigateToPage(
'Settings',
diff --git a/packages/desktop-client/e2e/page-models/navigation.ts b/packages/desktop-client/e2e/page-models/navigation.ts
index 5b1081da02..f13ffcdeea 100644
--- a/packages/desktop-client/e2e/page-models/navigation.ts
+++ b/packages/desktop-client/e2e/page-models/navigation.ts
@@ -1,6 +1,7 @@
import { type Page } from '@playwright/test';
import { AccountPage } from './account-page';
+import { BankSyncPage } from './bank-sync-page';
import { PayeesPage } from './payees-page';
import { ReportsPage } from './reports-page';
import { RulesPage } from './rules-page';
@@ -66,6 +67,19 @@ export class Navigation {
return new PayeesPage(this.page);
}
+ async goToBankSyncPage() {
+ const bankSyncLink = this.page.getByRole('link', { name: 'Bank Sync' });
+
+ // Expand the "more" menu only if it is not already expanded
+ if (!(await bankSyncLink.isVisible())) {
+ await this.page.getByRole('button', { name: 'More' }).click();
+ }
+
+ await bankSyncLink.click();
+
+ return new BankSyncPage(this.page);
+ }
+
async goToSettingsPage() {
const settingsLink = this.page.getByRole('link', { name: 'Settings' });
diff --git a/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-1-chromium-linux.png
index 98a756543f..f046376ac0 100644
Binary files a/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-1-chromium-linux.png and b/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-2-chromium-linux.png b/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-2-chromium-linux.png
index 9f6e5f47bd..994ff9fbbb 100644
Binary files a/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-2-chromium-linux.png and b/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-3-chromium-linux.png b/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-3-chromium-linux.png
index 61de822d5e..0bcf955193 100644
Binary files a/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-3-chromium-linux.png and b/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-4-chromium-linux.png b/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-4-chromium-linux.png
index 0676d55a6b..0c9541ed46 100644
Binary files a/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-4-chromium-linux.png and b/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-4-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-5-chromium-linux.png b/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-5-chromium-linux.png
index 399c38bc0f..96d6c8c569 100644
Binary files a/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-5-chromium-linux.png and b/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-5-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-6-chromium-linux.png b/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-6-chromium-linux.png
index eddfcc2b7a..7c1eb042ba 100644
Binary files a/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-6-chromium-linux.png and b/packages/desktop-client/e2e/payees.test.ts-snapshots/Payees-checks-the-payees-page-visuals-6-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-checks-the-page-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-checks-the-page-visuals-1-chromium-linux.png
index bf812243c4..71331c82fa 100644
Binary files a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-checks-the-page-visuals-1-chromium-linux.png and b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-checks-the-page-visuals-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-checks-the-page-visuals-2-chromium-linux.png b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-checks-the-page-visuals-2-chromium-linux.png
index 299b4db909..b30798fd43 100644
Binary files a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-checks-the-page-visuals-2-chromium-linux.png and b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-checks-the-page-visuals-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-checks-the-page-visuals-3-chromium-linux.png b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-checks-the-page-visuals-3-chromium-linux.png
index 963d73ab0d..72c8123a7d 100644
Binary files a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-checks-the-page-visuals-3-chromium-linux.png and b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-checks-the-page-visuals-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-1-chromium-linux.png b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-1-chromium-linux.png
index 3ab6726d4e..9a193b1ec3 100644
Binary files a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-1-chromium-linux.png and b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-2-chromium-linux.png b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-2-chromium-linux.png
index 9bf1c51a8c..e3c27077cb 100644
Binary files a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-2-chromium-linux.png and b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-3-chromium-linux.png b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-3-chromium-linux.png
index cf72c29978..fd719a54f3 100644
Binary files a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-3-chromium-linux.png and b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-4-chromium-linux.png b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-4-chromium-linux.png
index d866aebce9..f83c4e5910 100644
Binary files a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-4-chromium-linux.png and b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-4-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-5-chromium-linux.png b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-5-chromium-linux.png
index ba4eb6de92..a7ddeeb645 100644
Binary files a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-5-chromium-linux.png and b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-5-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-6-chromium-linux.png b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-6-chromium-linux.png
index fe667fd714..bd942eca81 100644
Binary files a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-6-chromium-linux.png and b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-6-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-1-chromium-linux.png b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-1-chromium-linux.png
index ab43b1d7d7..6cacc4f82e 100644
Binary files a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-1-chromium-linux.png and b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-2-chromium-linux.png b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-2-chromium-linux.png
index af8709749d..97d6be5123 100644
Binary files a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-2-chromium-linux.png and b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-3-chromium-linux.png b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-3-chromium-linux.png
index 741fd45550..e4f873e3ae 100644
Binary files a/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-3-chromium-linux.png and b/packages/desktop-client/e2e/rules.test.ts-snapshots/Rules-creates-a-split-transaction-rule-and-makes-sure-it-is-applied-when-creating-a-transaction-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-full-list-of-schedules-1-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-full-list-of-schedules-1-chromium-linux.png
index 7369105f0a..bfc953d1de 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-full-list-of-schedules-1-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-full-list-of-schedules-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-full-list-of-schedules-2-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-full-list-of-schedules-2-chromium-linux.png
index 6a5b8b8208..af93d0d281 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-full-list-of-schedules-2-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-full-list-of-schedules-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-full-list-of-schedules-3-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-full-list-of-schedules-3-chromium-linux.png
index 5ba720b6b8..370dbf3ac2 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-full-list-of-schedules-3-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-full-list-of-schedules-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-10-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-10-chromium-linux.png
index 0475e8ac9e..f0e9335252 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-10-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-10-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-11-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-11-chromium-linux.png
index 5db6825996..46ee0fbb09 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-11-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-11-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-12-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-12-chromium-linux.png
index 922aa864fd..e37a884fa9 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-12-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-12-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-1-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-1-chromium-linux.png
index e3df63ad0d..44316ef467 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-1-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-10-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-10-chromium-linux.png
index 491aad6e59..7f98e92776 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-10-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-10-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-11-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-11-chromium-linux.png
index 77f0b9acac..cbbc1386a1 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-11-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-11-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-12-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-12-chromium-linux.png
index 0a34ab03fb..94b1f63e9c 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-12-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-12-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-13-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-13-chromium-linux.png
index f0ab946f87..6f4bcef7d9 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-13-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-13-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-14-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-14-chromium-linux.png
index 9bded9a441..65ddc166bb 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-14-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-14-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-15-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-15-chromium-linux.png
index 296ee94c5e..0b3fd554c3 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-15-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-15-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-16-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-16-chromium-linux.png
index f0ab946f87..58453e9220 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-16-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-16-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-17-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-17-chromium-linux.png
index a991d7e031..3b31d75510 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-17-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-17-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-18-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-18-chromium-linux.png
index 3da33969e1..993d062071 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-18-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-18-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-2-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-2-chromium-linux.png
index abafdf2683..8ce05cb239 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-2-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-3-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-3-chromium-linux.png
index 9b4cb0f380..19eb816c89 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-3-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-4-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-4-chromium-linux.png
index e3df63ad0d..44316ef467 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-4-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-4-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-5-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-5-chromium-linux.png
index abafdf2683..8ce05cb239 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-5-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-5-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-6-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-6-chromium-linux.png
index 9b4cb0f380..19eb816c89 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-6-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-6-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-7-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-7-chromium-linux.png
index 5df84c3809..21cbf9ac05 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-7-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-7-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-8-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-8-chromium-linux.png
index 0c84198dde..0b33831aef 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-8-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-8-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-9-chromium-linux.png b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-9-chromium-linux.png
index 5bd7ed008d..72d917f1bc 100644
Binary files a/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-9-chromium-linux.png and b/packages/desktop-client/e2e/schedules.test.ts-snapshots/Schedules-creates-two-new-schedules-posts-both-transactions-and-later-completes-one-9-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png
index 823dcbb22e..26434416f4 100644
Binary files a/packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png and b/packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-2-chromium-linux.png b/packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-2-chromium-linux.png
index 911f71548e..ba55747b4f 100644
Binary files a/packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-2-chromium-linux.png and b/packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-3-chromium-linux.png b/packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-3-chromium-linux.png
index 4a02c72da9..2b532c1eba 100644
Binary files a/packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-3-chromium-linux.png and b/packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-3-chromium-linux.png differ
diff --git a/packages/desktop-client/src/components/FinancesApp.tsx b/packages/desktop-client/src/components/FinancesApp.tsx
index f61e6f1b1b..99670f7a65 100644
--- a/packages/desktop-client/src/components/FinancesApp.tsx
+++ b/packages/desktop-client/src/components/FinancesApp.tsx
@@ -10,10 +10,10 @@ import { View } from '@actual-app/components/view';
import * as undo from 'loot-core/platform/client/undo';
import { UserAccessPage } from './admin/UserAccess/UserAccessPage';
-import { BankSync } from './banksync';
import { BankSyncStatus } from './BankSyncStatus';
import { CommandBar } from './CommandBar';
import { GlobalKeys } from './GlobalKeys';
+import { MobileBankSyncAccountEditPage } from './mobile/banksync/MobileBankSyncAccountEditPage';
import { MobileNavTabs } from './mobile/MobileNavTabs';
import { TransactionEdit } from './mobile/transactions/TransactionEdit';
import { Notifications } from './Notifications';
@@ -278,7 +278,18 @@ export function FinancesApp() {
path="/rules/:id"
element={<NarrowAlternate name="RuleEdit" />}
/>
- <Route path="/bank-sync" element={<BankSync />} />
+ <Route
+ path="/bank-sync"
+ element={<NarrowAlternate name="BankSync" />}
+ />
+ <Route
+ path="/bank-sync/account/:accountId/edit"
+ element={
+ <WideNotSupported redirectTo="/bank-sync">
+ <MobileBankSyncAccountEditPage />
+ </WideNotSupported>
+ }
+ />
<Route path="/tags" element={<ManageTagsPage />} />
<Route path="/settings" element={<Settings />} />
@@ -347,6 +358,7 @@ export function FinancesApp() {
<Route path="/accounts" element={<MobileNavTabs />} />
<Route path="/settings" element={<MobileNavTabs />} />
<Route path="/reports" element={<MobileNavTabs />} />
+ <Route path="/bank-sync" element={<MobileNavTabs />} />
<Route path="/rules" element={<MobileNavTabs />} />
<Route path="/payees" element={<MobileNavTabs />} />
<Route path="*" element={null} />
diff --git a/packages/desktop-client/src/components/banksync/AccountRow.tsx b/packages/desktop-client/src/components/banksync/AccountRow.tsx
index c04f6d8d4b..f24381189a 100644
--- a/packages/desktop-client/src/components/banksync/AccountRow.tsx
+++ b/packages/desktop-client/src/components/banksync/AccountRow.tsx
@@ -89,6 +89,7 @@ export const AccountRow = memo(
textDecorationColor: theme.pageTextSubdued,
textUnderlineOffset: '4px',
}}
+ data-vrt-mask
>
{lastSyncString}
</Cell>
diff --git a/packages/desktop-client/src/components/banksync/BankSyncCheckboxOptions.tsx b/packages/desktop-client/src/components/banksync/BankSyncCheckboxOptions.tsx
new file mode 100644
index 0000000000..0d42119c32
--- /dev/null
+++ b/packages/desktop-client/src/components/banksync/BankSyncCheckboxOptions.tsx
@@ -0,0 +1,214 @@
+import React, { useState, type ReactNode } from 'react';
+import { useTranslation, Trans } from 'react-i18next';
+
+import { Button } from '@actual-app/components/button';
+import { SvgQuestion } from '@actual-app/components/icons/v1';
+import { Stack } from '@actual-app/components/stack';
+import { Text } from '@actual-app/components/text';
+import { theme } from '@actual-app/components/theme';
+import { Tooltip } from '@actual-app/components/tooltip';
+
+import { LabeledCheckbox } from '@desktop-client/components/forms/LabeledCheckbox';
+import { ToggleField } from '@desktop-client/components/mobile/MobileForms';
+
+type CheckboxOptionProps = {
+ id: string;
+ checked: boolean;
+ onChange: () => void;
+ disabled?: boolean;
+ helpMode?: 'desktop' | 'mobile';
+ children: ReactNode;
+};
+
+function CheckboxOption({
+ id,
+ checked,
+ onChange,
+ disabled,
+ helpMode = 'desktop',
+ children,
+}: CheckboxOptionProps) {
+ if (helpMode === 'mobile') {
+ return (
+ <Stack
+ direction="row"
+ align="center"
+ justify="space-between"
+ style={{ marginBottom: 5 }}
+ >
+ <Text>{children}</Text>
+ <ToggleField
+ id={id}
+ isOn={checked}
+ onToggle={onChange}
+ isDisabled={disabled}
+ />
+ </Stack>
+ );
+ }
+
+ return (
+ <LabeledCheckbox
+ id={id}
+ checked={checked}
+ onChange={onChange}
+ disabled={disabled}
+ >
+ {children}
+ </LabeledCheckbox>
+ );
+}
+
+type CheckboxOptionWithHelpProps = {
+ id: string;
+ checked: boolean;
+ onChange: () => void;
+ disabled?: boolean;
+ helpText: string;
+ helpMode: 'desktop' | 'mobile';
+ children: ReactNode;
+};
+
+function CheckboxOptionWithHelp({
+ id,
+ checked,
+ onChange,
+ disabled,
+ helpText,
+ helpMode,
+ children,
+}: CheckboxOptionWithHelpProps) {
+ const { t } = useTranslation();
+ const [showHelp, setShowHelp] = useState(false);
+
+ if (helpMode === 'desktop') {
+ return (
+ <LabeledCheckbox
+ id={id}
+ checked={checked}
+ onChange={onChange}
+ disabled={disabled}
+ >
+ <Tooltip content={helpText}>
+ <Stack direction="row" align="center" spacing={1}>
+ <Text>{children}</Text>
+ <SvgQuestion height={12} width={12} cursor="pointer" />
+ </Stack>
+ </Tooltip>
+ </LabeledCheckbox>
+ );
+ }
+
+ return (
+ <Stack direction="column" spacing={1} style={{ marginBottom: 5 }}>
+ <Stack direction="row" align="center" justify="space-between">
+ <Stack direction="row" align="center" spacing={1}>
+ <Text>{children}</Text>
+ <Button
+ variant="bare"
+ aria-label={t('Help')}
+ onPress={() => setShowHelp(!showHelp)}
+ style={{
+ padding: 0,
+ height: 'auto',
+ minHeight: 'auto',
+ }}
+ >
+ <SvgQuestion height={12} width={12} />
+ </Button>
+ </Stack>
+ <ToggleField
+ id={id}
+ isOn={checked}
+ onToggle={onChange}
+ isDisabled={disabled}
+ />
+ </Stack>
+ {showHelp && (
+ <Text
+ style={{
+ fontSize: 13,
+ color: theme.pageTextSubdued,
+ }}
+ >
+ {helpText}
+ </Text>
+ )}
+ </Stack>
+ );
+}
+
+type BankSyncCheckboxOptionsProps = {
+ importPending: boolean;
+ setImportPending: (value: boolean) => void;
+ importNotes: boolean;
+ setImportNotes: (value: boolean) => void;
+ reimportDeleted: boolean;
+ setReimportDeleted: (value: boolean) => void;
+ importTransactions: boolean;
+ setImportTransactions: (value: boolean) => void;
+ helpMode?: 'desktop' | 'mobile';
+};
+
+export function BankSyncCheckboxOptions({
+ importPending,
+ setImportPending,
+ importNotes,
+ setImportNotes,
+ reimportDeleted,
+ setReimportDeleted,
+ importTransactions,
+ setImportTransactions,
+ helpMode = 'desktop',
+}: BankSyncCheckboxOptionsProps) {
+ const { t } = useTranslation();
+
+ return (
+ <>
+ <CheckboxOption
+ id="form_pending"
+ checked={importPending}
+ onChange={() => setImportPending(!importPending)}
+ disabled={!importTransactions}
+ helpMode={helpMode}
+ >
+ <Trans>Import pending transactions</Trans>
+ </CheckboxOption>
+
+ <CheckboxOption
+ id="form_notes"
+ checked={importNotes}
+ onChange={() => setImportNotes(!importNotes)}
+ disabled={!importTransactions}
+ helpMode={helpMode}
+ >
+ <Trans>Import transaction notes</Trans>
+ </CheckboxOption>
+
+ <CheckboxOptionWithHelp
+ id="form_reimport_deleted"
+ checked={reimportDeleted}
+ onChange={() => setReimportDeleted(!reimportDeleted)}
+ disabled={!importTransactions}
+ helpText={t(
+ 'By default imported transactions that you delete will be re-imported with the next bank sync operation. To disable this behaviour - untick this box.',
+ )}
+ helpMode={helpMode}
+ >
+ <Trans>Reimport deleted transactions</Trans>
+ </CheckboxOptionWithHelp>
+
+ <CheckboxOptionWithHelp
+ id="form_import_transactions"
+ checked={!importTransactions}
+ onChange={() => setImportTransactions(!importTransactions)}
+ helpText={t(
+ 'Selecting this option will disable importing transactions and only import the account balance for use in reconciliation',
+ )}
+ helpMode={helpMode}
+ >
+ <Trans>Investment Account</Trans>
+ </CheckboxOptionWithHelp>
+ </>
+ );
+}
diff --git a/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx b/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx
index 003513dc04..ce769d52da 100644
--- a/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx
+++ b/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx
@@ -1,27 +1,17 @@
-import React, { useMemo, useState } from 'react';
+import React from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { Button } from '@actual-app/components/button';
-import { SvgQuestion } from '@actual-app/components/icons/v1';
import { Stack } from '@actual-app/components/stack';
import { Text } from '@actual-app/components/text';
import { theme } from '@actual-app/components/theme';
-import { Tooltip } from '@actual-app/components/tooltip';
import { View } from '@actual-app/components/view';
-import {
- defaultMappings,
- type Mappings,
- mappingsFromString,
- mappingsToString,
-} from 'loot-core/server/util/custom-sync-mapping';
-import { q } from 'loot-core/shared/query';
-import {
- type TransactionEntity,
- type AccountEntity,
-} from 'loot-core/types/models';
+import { type AccountEntity } from 'loot-core/types/models';
+import { BankSyncCheckboxOptions } from './BankSyncCheckboxOptions';
import { FieldMapping } from './FieldMapping';
+import { useBankSyncAccountSettings } from './useBankSyncAccountSettings';
import { unlinkAccount } from '@desktop-client/accounts/accountsSlice';
import {
@@ -29,9 +19,6 @@ import {
ModalCloseButton,
ModalHeader,
} from '@desktop-client/components/common/Modal';
-import { CheckboxOption } from '@desktop-client/components/modals/ImportTransactionsModal/CheckboxOption';
-import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
-import { useTransactions } from '@desktop-client/hooks/useTransactions';
import { pushModal } from '@desktop-client/modals/modalsSlice';
import { useDispatch } from '@desktop-client/redux';
@@ -39,7 +26,7 @@ export type TransactionDirection = 'payment' | 'deposit';
type MappableActualFields = 'date' | 'payee' | 'notes';
-export type MappableField = {
+type MappableField = {
actualField: MappableActualFields;
syncFields: string[];
};
@@ -107,15 +94,39 @@ const mappableFields: MappableField[] = [
},
];
-const getFields = (transaction: TransactionEntity) =>
+function getByPath(obj: unknown, path: string): unknown {
+ if (obj == null) {
+ return undefined;
+ }
+
+ const keys = path.split('.');
+ let current: unknown = obj;
+
+ for (const key of keys) {
+ if (current == null || typeof current !== 'object') {
+ return undefined;
+ }
+ current = (current as Record<string, unknown>)[key];
+ }
+
+ return current;
+}
+
+export const getFields = (
+ transaction: Record<string, unknown>,
+): MappableFieldWithExample[] =>
mappableFields.map(field => ({
actualField: field.actualField,
syncFields: field.syncFields
- .filter(syncField => transaction[syncField as keyof TransactionEntity])
- .map(syncField => ({
- field: syncField,
- example: transaction[syncField as keyof TransactionEntity],
- })),
+ .map(syncField => {
+ const value = getByPath(transaction, syncField);
+ return value !== undefined
+ ? { field: syncField, example: String(value) }
+ : null;
+ })
+ .filter(
+ (item): item is { field: string; example: string } => item !== null,
+ ),
}));
export type EditSyncAccountProps = {
@@ -124,79 +135,30 @@ export type EditSyncAccountProps = {
export function EditSyncAccount({ account }: EditSyncAccountProps) {
const { t } = useTranslation();
+ const dispatch = useDispatch();
- const [savedMappings = mappingsToString(defaultMappings), setSavedMappings] =
- useSyncedPref(`custom-sync-mappings-${account.id}`);
- const [savedImportNotes = true, setSavedImportNotes] = useSyncedPref(
- `sync-import-notes-${account.id}`,
- );
- const [savedImportPending = true, setSavedImportPending] = useSyncedPref(
- `sync-import-pending-${account.id}`,
- );
- const [savedReimportDeleted = true, setSavedReimportDeleted] = useSyncedPref(
- `sync-reimport-deleted-${account.id}`,
- );
- const [savedImportTransactions = true, setSavedImportTransactions] =
- useSyncedPref(`sync-import-transactions-${account.id}`);
-
- const [transactionDirection, setTransactionDirection] =
- useState<TransactionDirection>('payment');
- const [importPending, setImportPending] = useState(
- String(savedImportPending) === 'true',
- );
- const [importNotes, setImportNotes] = useState(
- String(savedImportNotes) === 'true',
- );
- const [reimportDeleted, setReimportDeleted] = useState(
- String(savedReimportDeleted) === 'true',
- );
- const [mappings, setMappings] = useState<Mappings>(
- mappingsFromString(savedMappings),
- );
- const [importTransactions, setImportTransactions] = useState(
- String(savedImportTransactions) === 'true',
- );
-
- const transactionQuery = useMemo(
- () =>
- q('transactions')
- .filter({
- account: account.id,
- amount: transactionDirection === 'payment' ? { $lte: 0 } : { $gt: 0 },
- raw_synced_data: { $ne: null },
- })
- .options({ splits: 'none' })
- .select('*'),
- [account.id, transactionDirection],
- );
-
- const { transactions } = useTransactions({
- query: transactionQuery,
- });
-
- const exampleTransaction = useMemo(() => {
- const data = transactions?.[0]?.raw_synced_data;
- if (!data) return undefined;
- try {
- return JSON.parse(data);
- } catch (error) {
- console.error('Failed to parse transaction data:', error);
- return undefined;
- }
- }, [transactions]);
+ const {
+ transactionDirection,
+ setTransactionDirection,
+ importPending,
+ setImportPending,
+ importNotes,
+ setImportNotes,
+ reimportDeleted,
+ setReimportDeleted,
+ importTransactions,
+ setImportTransactions,
+ mappings,
+ setMapping,
+ fields,
+ saveSettings,
+ } = useBankSyncAccountSettings(account.id);
const onSave = async (close: () => void) => {
- const mappingsStr = mappingsToString(mappings);
- setSavedMappings(mappingsStr);
- setSavedImportPending(String(importPending));
- setSavedImportNotes(String(importNotes));
- setSavedReimportDeleted(String(reimportDeleted));
- setSavedImportTransactions(String(importTransactions));
+ saveSettings();
close();
};
- const dispatch = useDispatch();
-
const onUnlink = async (close: () => void) => {
dispatch(
pushModal({
@@ -215,19 +177,11 @@ export function EditSyncAccount({ account }: EditSyncAccountProps) {
);
};
- const setMapping = (field: string, value: string) => {
- setMappings(prev => {
- const updated = new Map(prev);
- updated?.get(transactionDirection)?.set(field, value);
- return updated;
- });
- };
-
const potentiallyTruncatedAccountName =
account.name.length > 30 ? account.name.slice(0, 30) + '...' : account.name;
- const fields = exampleTransaction ? getFields(exampleTransaction) : [];
- const mapping = mappings.get(transactionDirection);
+ const mapping =
+ mappings.get(transactionDirection) ?? new Map<string, string>();
return (
<Modal
@@ -250,83 +204,27 @@ export function EditSyncAccount({ account }: EditSyncAccountProps) {
<FieldMapping
transactionDirection={transactionDirection}
setTransactionDirection={setTransactionDirection}
- fields={fields as MappableFieldWithExample[]}
- mapping={mapping!}
+ fields={fields}
+ mapping={mapping}
setMapping={setMapping}
+ selectMinWidth={300}
/>
<Text style={{ fontSize: 15, margin: '1em 0 .5em 0' }}>
<Trans>Options</Trans>
</Text>
- <CheckboxOption
- id="form_pending"
- checked={importPending && importTransactions}
- onChange={() => setImportPending(!importPending)}
- disabled={!importTransactions}
- >
- <Trans>Import pending transactions</Trans>
- </CheckboxOption>
-
- <CheckboxOption
- id="form_notes"
- checked={importNotes && importTransactions}
- onChange={() => setImportNotes(!importNotes)}
- disabled={!importTransactions}
- >
- <Trans>Import transaction notes</Trans>
- </CheckboxOption>
-
- <CheckboxOption
- id="form_reimport_deleted"
- checked={reimportDeleted && importTransactions}
- onChange={() => setReimportDeleted(!reimportDeleted)}
- disabled={!importTransactions}
- >
- <Tooltip
- content={t(
- 'By default imported transactions that you delete will be re-imported with the next bank sync operation. To disable this behaviour - untick this box.',
- )}
- >
- <View
- style={{
- display: 'flex',
- flexWrap: 'nowrap',
- flexDirection: 'row',
- alignItems: 'center',
- gap: 4,
- }}
- >
- <Trans>Reimport deleted transactions</Trans>
- <SvgQuestion height={12} width={12} cursor="pointer" />
- </View>
- </Tooltip>
- </CheckboxOption>
-
- <CheckboxOption
- id="form_import_transactions"
- checked={!importTransactions}
- onChange={() => setImportTransactions(!importTransactions)}
- >
- <Tooltip
- content={t(
- `Selecting this option will disable importing transactions and only import the account balance for use in reconciliation`,
- )}
- >
- <View
- style={{
- display: 'flex',
- flexWrap: 'nowrap',
- flexDirection: 'row',
- alignItems: 'center',
- gap: 4,
- }}
- >
- <Trans>Investment Account</Trans>
- <SvgQuestion height={12} width={12} cursor="pointer" />
- </View>
- </Tooltip>
- </CheckboxOption>
+ <BankSyncCheckboxOptions
+ importPending={importPending}
+ setImportPending={setImportPending}
+ importNotes={importNotes}
+ setImportNotes={setImportNotes}
+ reimportDeleted={reimportDeleted}
+ setReimportDeleted={setReimportDeleted}
+ importTransactions={importTransactions}
+ setImportTransactions={setImportTransactions}
+ helpMode="desktop"
+ />
<View
style={{
diff --git a/packages/desktop-client/src/components/banksync/FieldMapping.tsx b/packages/desktop-client/src/components/banksync/FieldMapping.tsx
index 69d6098169..31798fdea6 100644
--- a/packages/desktop-client/src/components/banksync/FieldMapping.tsx
+++ b/packages/desktop-client/src/components/banksync/FieldMapping.tsx
@@ -6,6 +6,7 @@ import { SvgEquals } from '@actual-app/components/icons/v1';
import { Select } from '@actual-app/components/select';
import { Text } from '@actual-app/components/text';
import { theme } from '@actual-app/components/theme';
+import { View } from '@actual-app/components/view';
import {
type MappableFieldWithExample,
@@ -37,6 +38,8 @@ type FieldMappingProps = {
fields: MappableFieldWithExample[];
mapping: Map<string, string>;
setMapping: (field: string, value: string) => void;
+ selectMinWidth?: number;
+ isMobile?: boolean;
};
export function FieldMapping({
@@ -45,11 +48,35 @@ export function FieldMapping({
fields,
mapping,
setMapping,
+ selectMinWidth = 50,
+ isMobile = false,
}: FieldMappingProps) {
const { t } = useTranslation();
const { transactionDirectionOptions } = useTransactionDirectionOptions();
+ const iconSpacing = isMobile ? 8 : 20;
+ const iconPadding = isMobile ? 8 : 6;
+ const arrowIconWidth = 15;
+ const equalsIconWidth = 12;
+
+ const calculatedSelectWidth = Math.max(
+ selectMinWidth,
+ ...fields.flatMap(field =>
+ field.syncFields.map(({ field }) => field.length * 8 + 30),
+ ),
+ );
+
+ const calculatedActualFieldWidth = isMobile
+ ? Math.max(50, ...fields.map(field => field.actualField.length * 8 + 20))
+ : Math.max(75, ...fields.map(field => field.actualField.length * 8 + 20));
+
+ const arrowCellWidth = arrowIconWidth + iconSpacing + iconPadding;
+ const equalsCellWidth = equalsIconWidth + iconSpacing + iconPadding;
+
+ const commonCellStyle = { height: '100%', border: 0 };
+ const iconCellStyle = { ...commonCellStyle };
+
return (
<>
<Select
@@ -62,6 +89,7 @@ export function FieldMapping({
style={{
width: '25%',
margin: '1em 0',
+ minWidth: '100px',
}}
/>
@@ -76,19 +104,27 @@ export function FieldMapping({
<>
<TableHeader>
<Cell
- value={t('Actual field')}
- width={100}
+ width={calculatedActualFieldWidth}
style={{ paddingLeft: '10px' }}
- />
+ plain
+ >
+ <Text
+ style={{ whiteSpace: 'nowrap', fontSize: 13, fontWeight: 500 }}
+ >
+ {calculatedActualFieldWidth > 70 ? t('Actual field') : 'Actual'}
+ </Text>
+ </Cell>
+ <Cell value="" width={arrowCellWidth} style={{ padding: 0 }} />
<Cell
value={t('Bank field')}
- width={330}
- style={{ paddingLeft: '10px' }}
+ width={calculatedSelectWidth}
+ style={{ paddingLeft: 0 }}
/>
+ <Cell value="" width={equalsCellWidth} style={{ padding: 0 }} />
<Cell
value={t('Example')}
width="flex"
- style={{ paddingLeft: '10px' }}
+ style={{ paddingLeft: 0 }}
/>
</TableHeader>
@@ -107,46 +143,69 @@ export function FieldMapping({
collapsed={true}
>
<Cell
- value={field.actualField}
- width={75}
- style={{ paddingLeft: '10px', height: '100%', border: 0 }}
- />
-
- <Text>
- <SvgRightArrow2
+ width={calculatedActualFieldWidth}
+ style={{ ...commonCellStyle, paddingLeft: '10px' }}
+ plain
+ >
+ <Text style={{ whiteSpace: 'nowrap', fontSize: 13 }}>
+ {field.actualField}
+ </Text>
+ </Cell>
+
+ <Cell width={arrowCellWidth} style={iconCellStyle} plain>
+ <View
+ style={{
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}
+ >
+ <SvgRightArrow2
+ style={{
+ width: arrowIconWidth,
+ height: 15,
+ color: theme.tableText,
+ }}
+ />
+ </View>
+ </Cell>
+
+ <Cell width={calculatedSelectWidth} style={iconCellStyle} plain>
+ <Select
+ aria-label={t('Synced field to map to {{field}}', {
+ field: field.actualField,
+ })}
+ options={field.syncFields.map(({ field }) => [
+ field,
+ field,
+ ])}
+ value={mapping.get(field.actualField)}
style={{
- width: 15,
- height: 15,
- color: theme.tableText,
- marginRight: '20px',
+ width: calculatedSelectWidth,
+ }}
+ onChange={newValue => {
+ if (newValue) setMapping(field.actualField, newValue);
}}
/>
- </Text>
-
- <Select
- aria-label={t('Synced field to map to {{field}}', {
- field: field.actualField,
- })}
- options={field.syncFields.map(({ field }) => [field, field])}
- value={mapping.get(field.actualField)}
- style={{
- width: 290,
- }}
- onChange={newValue => {
- if (newValue) setMapping(field.actualField, newValue);
- }}
- />
+ </Cell>
- <Text>
- <SvgEquals
+ <Cell width={equalsCellWidth} style={iconCellStyle} plain>
+ <View
style={{
- width: 12,
- height: 12,
- color: theme.tableText,
- marginLeft: '20px',
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
}}
- />
- </Text>
+ >
+ <SvgEquals
+ style={{
+ width: equalsIconWidth,
+ height: 12,
+ color: theme.tableText,
+ }}
+ />
+ </View>
+ </Cell>
<Cell
value={
@@ -155,7 +214,7 @@ export function FieldMapping({
)?.example
}
width="flex"
- style={{ paddingLeft: '10px', height: '100%', border: 0 }}
+ style={{ ...commonCellStyle, paddingLeft: 0 }}
/>
</Row>
);
diff --git a/packages/desktop-client/src/components/banksync/useBankSyncAccountSettings.ts b/packages/desktop-client/src/components/banksync/useBankSyncAccountSettings.ts
new file mode 100644
index 0000000000..b532f36241
--- /dev/null
+++ b/packages/desktop-client/src/components/banksync/useBankSyncAccountSettings.ts
@@ -0,0 +1,119 @@
+import { useState } from 'react';
+
+import {
+ defaultMappings,
+ type Mappings,
+ mappingsFromString,
+ mappingsToString,
+} from 'loot-core/server/util/custom-sync-mapping';
+import { q } from 'loot-core/shared/query';
+
+import {
+ type TransactionDirection,
+ type MappableFieldWithExample,
+ getFields,
+} from './EditSyncAccount';
+
+import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
+import { useTransactions } from '@desktop-client/hooks/useTransactions';
+
+export function useBankSyncAccountSettings(accountId: string) {
+ const [savedMappings = mappingsToString(defaultMappings), setSavedMappings] =
+ useSyncedPref(`custom-sync-mappings-${accountId}`);
+ const [savedImportNotes = true, setSavedImportNotes] = useSyncedPref(
+ `sync-import-notes-${accountId}`,
+ );
+ const [savedImportPending = true, setSavedImportPending] = useSyncedPref(
+ `sync-import-pending-${accountId}`,
+ );
+ const [savedReimportDeleted = true, setSavedReimportDeleted] = useSyncedPref(
+ `sync-reimport-deleted-${accountId}`,
+ );
+ const [savedImportTransactions = true, setSavedImportTransactions] =
+ useSyncedPref(`sync-import-transactions-${accountId}`);
+
+ const [transactionDirection, setTransactionDirection] =
+ useState<TransactionDirection>('payment');
+ const [importPending, setImportPending] = useState(
+ String(savedImportPending) === 'true',
+ );
+ const [importNotes, setImportNotes] = useState(
+ String(savedImportNotes) === 'true',
+ );
+ const [reimportDeleted, setReimportDeleted] = useState(
+ String(savedReimportDeleted) === 'true',
+ );
+ const [mappings, setMappings] = useState<Mappings>(
+ mappingsFromString(savedMappings),
+ );
+ const [importTransactions, setImportTransactions] = useState(
+ String(savedImportTransactions) === 'true',
+ );
+
+ const transactionQuery = q('transactions')
+ .filter({
+ account: accountId,
+ amount: transactionDirection === 'payment' ? { $lte: 0 } : { $gt: 0 },
+ raw_synced_data: { $ne: null },
+ })
+ .options({ splits: 'none' })
+ .select('*');
+
+ const { transactions } = useTransactions({
+ query: transactionQuery,
+ });
+
+ const data = transactions?.[0]?.raw_synced_data;
+ let exampleTransaction;
+ if (data) {
+ try {
+ exampleTransaction = JSON.parse(data);
+ } catch (error) {
+ console.error('Failed to parse transaction data:', error);
+ }
+ }
+
+ const fields: MappableFieldWithExample[] = exampleTransaction
+ ? getFields(exampleTransaction)
+ : [];
+
+ const saveSettings = () => {
+ const mappingsStr = mappingsToString(mappings);
+ setSavedMappings(mappingsStr);
+ setSavedImportPending(String(importPending));
+ setSavedImportNotes(String(importNotes));
+ setSavedReimportDeleted(String(reimportDeleted));
+ setSavedImportTransactions(String(importTransactions));
+ };
+
+ const setMapping = (field: string, value: string) => {
+ setMappings(prev => {
+ const updated = new Map(prev);
+ const directionMap = updated.get(transactionDirection);
+ if (directionMap) {
+ const newDirectionMap = new Map(directionMap);
+ newDirectionMap.set(field, value);
+ updated.set(transactionDirection, newDirectionMap);
+ }
+ return updated;
+ });
+ };
+
+ return {
+ transactionDirection,
+ setTransactionDirection,
+ importPending,
+ setImportPending,
+ importNotes,
+ setImportNotes,
+ reimportDeleted,
+ setReimportDeleted,
+ importTransactions,
+ setImportTransactions,
+ mappings,
+ setMapping,
+ exampleTransaction,
+ fields,
+ saveSettings,
+ };
+}
diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/CheckboxOption.tsx b/packages/desktop-client/src/components/forms/LabeledCheckbox.tsx
similarity index 87%
rename from packages/desktop-client/src/components/modals/ImportTransactionsModal/CheckboxOption.tsx
rename to packages/desktop-client/src/components/forms/LabeledCheckbox.tsx
index b3eddcc3aa..b32a0e8127 100644
--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/CheckboxOption.tsx
+++ b/packages/desktop-client/src/components/forms/LabeledCheckbox.tsx
@@ -7,9 +7,9 @@ import React, {
import { theme } from '@actual-app/components/theme';
import { View } from '@actual-app/components/view';
-import { Checkbox } from '@desktop-client/components/forms';
+import { Checkbox } from './index';
-type CheckboxOptionProps = {
+type LabeledCheckboxProps = {
id: string;
checked?: ComponentProps<typeof Checkbox>['checked'];
disabled?: ComponentProps<typeof Checkbox>['disabled'];
@@ -18,14 +18,14 @@ type CheckboxOptionProps = {
style?: CSSProperties;
};
-export function CheckboxOption({
+export function LabeledCheckbox({
id,
checked,
disabled,
onChange,
children,
style,
-}: CheckboxOptionProps) {
+}: LabeledCheckboxProps) {
return (
<View
style={{
diff --git a/packages/desktop-client/src/components/forms.tsx b/packages/desktop-client/src/components/forms/index.tsx
similarity index 100%
rename from packages/desktop-client/src/components/forms.tsx
rename to packages/desktop-client/src/components/forms/index.tsx
diff --git a/packages/desktop-client/src/components/mobile/MobileNavTabs.tsx b/packages/desktop-client/src/components/mobile/MobileNavTabs.tsx
index 11106bc6ac..c06ec55da1 100644
--- a/packages/desktop-client/src/components/mobile/MobileNavTabs.tsx
+++ b/packages/desktop-client/src/components/mobile/MobileNavTabs.tsx
@@ -13,6 +13,7 @@ import { useResponsive } from '@actual-app/components/hooks/useResponsive';
import {
SvgAdd,
SvgCog,
+ SvgCreditCard,
SvgPiggyBank,
SvgReports,
SvgStoreFront,
@@ -25,7 +26,10 @@ import { theme } from '@actual-app/components/theme';
import { View } from '@actual-app/components/view';
import { useDrag } from '@use-gesture/react';
+import * as Platform from 'loot-core/shared/platform';
+
import { useScrollListener } from '@desktop-client/components/ScrollProvider';
+import { useSyncServerStatus } from '@desktop-client/hooks/useSyncServerStatus';
const COLUMN_COUNT = 3;
const PILL_HEIGHT = 15;
@@ -40,6 +44,9 @@ export const MOBILE_NAV_HEIGHT = ROW_HEIGHT + PILL_HEIGHT;
export function MobileNavTabs() {
const { t } = useTranslation();
const { isNarrowWidth } = useResponsive();
+ const syncServerStatus = useSyncServerStatus();
+ const isUsingServer =
+ syncServerStatus !== 'no-server' || Platform.isPlaywright;
const [navbarState, setNavbarState] = useState<'default' | 'open' | 'hidden'>(
'default',
);
@@ -134,6 +141,16 @@ export function MobileNavTabs() {
style: navTabStyle,
Icon: SvgTuning,
},
+ ...(isUsingServer
+ ? [
+ {
+ name: t('Bank Sync'),
+ path: '/bank-sync',
+ style: navTabStyle,
+ Icon: SvgCreditCard,
+ },
+ ]
+ : []),
{
name: t('Settings'),
path: '/settings',
diff --git a/packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsList.tsx b/packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsList.tsx
new file mode 100644
index 0000000000..1e8c875d17
--- /dev/null
+++ b/packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsList.tsx
@@ -0,0 +1,98 @@
+import { Trans } from 'react-i18next';
+
+import { Text } from '@actual-app/components/text';
+import { theme } from '@actual-app/components/theme';
+import { View } from '@actual-app/components/view';
+
+import { type AccountEntity } from 'loot-core/types/models';
+
+import { BankSyncAccountsListItem } from './BankSyncAccountsListItem';
+
+import { MOBILE_NAV_HEIGHT } from '@desktop-client/components/mobile/MobileNavTabs';
+
+type SyncProviders = 'goCardless' | 'simpleFin' | 'pluggyai' | 'unlinked';
+
+type BankSyncAccountsListProps = {
+ groupedAccounts: Record<SyncProviders, AccountEntity[]>;
+ syncSourceReadable: Record<SyncProviders, string>;
+ onAction: (account: AccountEntity, action: 'link' | 'edit') => void;
+};
+
+export function BankSyncAccountsList({
+ groupedAccounts,
+ syncSourceReadable,
+ onAction,
+}: BankSyncAccountsListProps) {
+ const allAccounts = Object.values(groupedAccounts).flat();
+
+ if (allAccounts.length === 0) {
+ return (
+ <View
+ style={{
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ paddingHorizontal: 20,
+ }}
+ >
+ <Text
+ style={{
+ fontSize: 16,
+ color: theme.pageTextSubdued,
+ textAlign: 'center',
+ }}
+ >
+ <Trans>No accounts found matching your search.</Trans>
+ </Text>
+ </View>
+ );
+ }
+
+ const shouldShowProviderHeaders = Object.keys(groupedAccounts).length > 1;
+
+ return (
+ <div
+ style={{ flex: 1, overflow: 'auto', paddingBottom: MOBILE_NAV_HEIGHT }}
+ >
+ {(
+ Object.entries(groupedAccounts) as [SyncProviders, AccountEntity[]][]
+ ).map(([provider, accounts]) => (
+ <div key={provider}>
+ {shouldShowProviderHeaders && (
+ <div
+ style={{
+ backgroundColor: theme.mobilePageBackground,
+ padding: '12px 16px',
+ borderBottom: `1px solid ${theme.tableBorder}`,
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
+ minHeight: 40,
+ }}
+ >
+ <Text
+ style={{
+ fontSize: 14,
+ fontWeight: 600,
+ color: theme.pageTextLight,
+ textTransform: 'uppercase',
+ letterSpacing: 0.5,
+ }}
+ >
+ {syncSourceReadable[provider]}
+ </Text>
+ </div>
+ )}
+ {accounts.map(account => (
+ <BankSyncAccountsListItem
+ key={account.id}
+ account={account}
+ onAction={onAction}
+ isLinked={!!account.account_sync_source}
+ />
+ ))}
+ </div>
+ ))}
+ </div>
+ );
+}
diff --git a/packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsListItem.tsx b/packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsListItem.tsx
new file mode 100644
index 0000000000..1d4bb12fce
--- /dev/null
+++ b/packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsListItem.tsx
@@ -0,0 +1,97 @@
+import { Trans } from 'react-i18next';
+
+import { Stack } from '@actual-app/components/stack';
+import { Text } from '@actual-app/components/text';
+import { theme } from '@actual-app/components/theme';
+
+import { tsToRelativeTime } from 'loot-core/shared/util';
+import { type AccountEntity } from 'loot-core/types/models';
+
+import { useLocale } from '@desktop-client/hooks/useLocale';
+
+type BankSyncAccountsListItemProps = {
+ account: AccountEntity;
+ onAction: (account: AccountEntity, action: 'link' | 'edit') => void;
+ isLinked: boolean;
+};
+
+export function BankSyncAccountsListItem({
+ account,
+ onAction,
+ isLinked,
+}: BankSyncAccountsListItemProps) {
+ const locale = useLocale();
+
+ const lastSyncString = isLinked
+ ? tsToRelativeTime(account.last_sync, locale, {
+ capitalize: true,
+ })
+ : null;
+
+ return (
+ <Stack
+ data-testid="bank-sync-account"
+ direction="row"
+ align="center"
+ spacing={12}
+ style={{
+ backgroundColor: theme.tableBackground,
+ borderBottomWidth: 1,
+ borderBottomColor: theme.tableBorder,
+ borderBottomStyle: 'solid',
+ padding: 16,
+ width: '100%',
+ cursor: 'pointer',
+ }}
+ onClick={() => onAction(account, isLinked ? 'edit' : 'link')}
+ >
+ <Stack spacing={1} style={{ flex: 1 }}>
+ <Text
+ style={{
+ fontSize: 15,
+ fontWeight: 500,
+ color: theme.tableText,
+ }}
+ >
+ {account.name}
+ </Text>
+ {isLinked && account.bankName && (
+ <Text
+ style={{
+ fontSize: 13,
+ color: theme.pageTextSubdued,
+ }}
+ >
+ {account.bankName}
+ </Text>
+ )}
+ {isLinked && lastSyncString && (
+ <Text
+ style={{
+ fontSize: 13,
+ color: theme.pageTextSubdued,
+ }}
+ data-vrt-mask
+ >
+ <Trans>Last sync: {{ time: lastSyncString }}</Trans>
+ </Text>
+ )}
+ </Stack>
+
+ <span
+ style={{
+ borderRadius: 4,
+ padding: '5px 10px',
+ backgroundColor: theme.noticeBackground,
+ border: '1px solid ' + theme.noticeBackground,
+ color: theme.noticeTextDark,
+ fontSize: 13,
+ fontWeight: 500,
+ flexShrink: 0,
+ }}
+ >
+ {isLinked ? <Trans>Edit</Trans> : <Trans>Link account</Trans>}
+ </span>
+ </Stack>
+ );
+}
diff --git a/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncAccountEditPage.tsx b/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncAccountEditPage.tsx
new file mode 100644
index 0000000000..a22d29efba
--- /dev/null
+++ b/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncAccountEditPage.tsx
@@ -0,0 +1,187 @@
+import React from 'react';
+import { useTranslation, Trans } from 'react-i18next';
+import { useParams } from 'react-router';
+
+import { Button } from '@actual-app/components/button';
+import { Stack } from '@actual-app/components/stack';
+import { Text } from '@actual-app/components/text';
+import { theme } from '@actual-app/components/theme';
+import { View } from '@actual-app/components/view';
+
+import { unlinkAccount } from '@desktop-client/accounts/accountsSlice';
+import { BankSyncCheckboxOptions } from '@desktop-client/components/banksync/BankSyncCheckboxOptions';
+import { FieldMapping } from '@desktop-client/components/banksync/FieldMapping';
+import { useBankSyncAccountSettings } from '@desktop-client/components/banksync/useBankSyncAccountSettings';
+import { MobileBackButton } from '@desktop-client/components/mobile/MobileBackButton';
+import { MobilePageHeader, Page } from '@desktop-client/components/Page';
+import { useAccount } from '@desktop-client/hooks/useAccount';
+import { useNavigate } from '@desktop-client/hooks/useNavigate';
+import { pushModal } from '@desktop-client/modals/modalsSlice';
+import { useDispatch } from '@desktop-client/redux';
+
+export function MobileBankSyncAccountEditPage() {
+ const { t } = useTranslation();
+ const navigate = useNavigate();
+ const dispatch = useDispatch();
+ const { accountId } = useParams<{ accountId: string }>();
+ const account = useAccount(accountId!);
+
+ const {
+ transactionDirection,
+ setTransactionDirection,
+ importPending,
+ setImportPending,
+ importNotes,
+ setImportNotes,
+ reimportDeleted,
+ setReimportDeleted,
+ importTransactions,
+ setImportTransactions,
+ mappings,
+ setMapping,
+ fields,
+ saveSettings,
+ } = useBankSyncAccountSettings(accountId!);
+
+ const handleCancel = () => {
+ navigate('/bank-sync');
+ };
+
+ const handleSave = async () => {
+ saveSettings();
+ navigate('/bank-sync');
+ };
+
+ const handleUnlink = () => {
+ dispatch(
+ pushModal({
+ modal: {
+ name: 'confirm-unlink-account',
+ options: {
+ accountName: account?.name || '',
+ isViewBankSyncSettings: true,
+ onUnlink: () => {
+ if (accountId) {
+ dispatch(unlinkAccount({ id: accountId }));
+ navigate('/bank-sync');
+ }
+ },
+ },
+ },
+ }),
+ );
+ };
+
+ if (!account) {
+ return (
+ <Page
+ header={
+ <MobilePageHeader
+ title={t('Account not found')}
+ leftContent={<MobileBackButton onPress={handleCancel} />}
+ />
+ }
+ padding={0}
+ >
+ <View
+ style={{
+ flex: 1,
+ backgroundColor: theme.mobilePageBackground,
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}
+ >
+ <Text>
+ <Trans>Account not found</Trans>
+ </Text>
+ </View>
+ </Page>
+ );
+ }
+
+ const mapping =
+ mappings.get(transactionDirection) ?? new Map<string, string>();
+
+ return (
+ <Page
+ header={
+ <MobilePageHeader
+ title={account.name}
+ leftContent={<MobileBackButton onPress={handleCancel} />}
+ />
+ }
+ padding={0}
+ >
+ <View style={{ flex: 1, backgroundColor: theme.mobilePageBackground }}>
+ <View
+ style={{
+ flex: 1,
+ overflow: 'auto',
+ }}
+ >
+ <View style={{ padding: 16 }}>
+ <Text style={{ fontSize: 15, marginBottom: 10 }}>
+ <Trans>Field mapping</Trans>
+ </Text>
+
+ <FieldMapping
+ transactionDirection={transactionDirection}
+ setTransactionDirection={setTransactionDirection}
+ fields={fields}
+ mapping={mapping}
+ setMapping={setMapping}
+ isMobile
+ />
+
+ <Text style={{ fontSize: 15, marginTop: 20, marginBottom: 10 }}>
+ <Trans>Options</Trans>
+ </Text>
+
+ <BankSyncCheckboxOptions
+ importPending={importPending}
+ setImportPending={setImportPending}
+ importNotes={importNotes}
+ setImportNotes={setImportNotes}
+ reimportDeleted={reimportDeleted}
+ setReimportDeleted={setReimportDeleted}
+ importTransactions={importTransactions}
+ setImportTransactions={setImportTransactions}
+ helpMode="mobile"
+ />
+ </View>
+ </View>
+
+ <View
+ style={{
+ padding: 16,
+ paddingTop: 12,
+ borderTop: `1px solid ${theme.tableBorder}`,
+ backgroundColor: theme.mobilePageBackground,
+ display: 'flex',
+ flexDirection: 'row',
+ justifyContent: 'space-between',
+ alignItems: 'center',
+ }}
+ >
+ <Button
+ style={{
+ color: theme.errorText,
+ }}
+ onPress={handleUnlink}
+ >
+ <Trans>Unlink account</Trans>
+ </Button>
+
+ <Stack direction="row" style={{ gap: 10 }}>
+ <Button onPress={handleCancel}>
+ <Trans>Cancel</Trans>
+ </Button>
+ <Button variant="primary" onPress={handleSave}>
+ <Trans>Save</Trans>
+ </Button>
+ </Stack>
+ </View>
+ </View>
+ </Page>
+ );
+}
diff --git a/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncPage.tsx b/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncPage.tsx
new file mode 100644
index 0000000000..cfa30bde44
--- /dev/null
+++ b/packages/desktop-client/src/components/mobile/banksync/MobileBankSyncPage.tsx
@@ -0,0 +1,185 @@
+import { useMemo, useState, useCallback } from 'react';
+import { Trans, useTranslation } from 'react-i18next';
+
+import { styles } from '@actual-app/components/styles';
+import { Text } from '@actual-app/components/text';
+import { theme } from '@actual-app/components/theme';
+import { View } from '@actual-app/components/view';
+
+import {
+ type BankSyncProviders,
+ type AccountEntity,
+} from 'loot-core/types/models';
+
+import { BankSyncAccountsList } from './BankSyncAccountsList';
+
+import { Search } from '@desktop-client/components/common/Search';
+import { MobilePageHeader, Page } from '@desktop-client/components/Page';
+import { useAccounts } from '@desktop-client/hooks/useAccounts';
+import { useNavigate } from '@desktop-client/hooks/useNavigate';
+import { pushModal } from '@desktop-client/modals/modalsSlice';
+import { useDispatch } from '@desktop-client/redux';
+
+type SyncProviders = BankSyncProviders | 'unlinked';
+
+const useSyncSourceReadable = () => {
+ const { t } = useTranslation();
+
+ const syncSourceReadable: Record<SyncProviders, string> = {
+ goCardless: 'GoCardless',
+ simpleFin: 'SimpleFIN',
+ pluggyai: 'Pluggy.ai',
+ unlinked: t('Unlinked'),
+ };
+
+ return { syncSourceReadable };
+};
+
+export function MobileBankSyncPage() {
+ const { t } = useTranslation();
+ const navigate = useNavigate();
+ const dispatch = useDispatch();
+ const { syncSourceReadable } = useSyncSourceReadable();
+ const accounts = useAccounts();
+ const [filter, setFilter] = useState('');
+
+ const openAccounts = useMemo(
+ () => accounts.filter(a => !a.closed),
+ [accounts],
+ );
+
+ const groupedAccounts = useMemo(() => {
+ const unsorted = openAccounts.reduce(
+ (acc, a) => {
+ const syncSource = a.account_sync_source ?? 'unlinked';
+ acc[syncSource] = acc[syncSource] || [];
+ acc[syncSource].push(a);
+ return acc;
+ },
+ {} as Record<SyncProviders, AccountEntity[]>,
+ );
+
+ const sortedKeys = Object.keys(unsorted).sort((keyA, keyB) => {
+ if (keyA === 'unlinked') return 1;
+ if (keyB === 'unlinked') return -1;
+ return keyA.localeCompare(keyB);
+ });
+
+ return sortedKeys.reduce(
+ (sorted, key) => {
+ sorted[key as SyncProviders] = unsorted[key as SyncProviders];
+ return sorted;
+ },
+ {} as Record<SyncProviders, AccountEntity[]>,
+ );
+ }, [openAccounts]);
+
+ const filteredGroupedAccounts = useMemo(() => {
+ if (!filter) return groupedAccounts;
+
+ const filterLower = filter.toLowerCase();
+ const filtered: Record<SyncProviders, AccountEntity[]> = {} as Record<
+ SyncProviders,
+ AccountEntity[]
+ >;
+
+ Object.entries(groupedAccounts).forEach(([provider, accounts]) => {
+ const filteredAccounts = accounts.filter(
+ account =>
+ account.name.toLowerCase().includes(filterLower) ||
+ account.bankName?.toLowerCase().includes(filterLower),
+ );
+ if (filteredAccounts.length > 0) {
+ filtered[provider as SyncProviders] = filteredAccounts;
+ }
+ });
+
+ return filtered;
+ }, [groupedAccounts, filter]);
+
+ const onAction = useCallback(
+ (account: AccountEntity, action: 'link' | 'edit') => {
+ switch (action) {
+ case 'edit':
+ navigate(`/bank-sync/account/${account.id}/edit`);
+ break;
+ case 'link':
+ dispatch(
+ pushModal({
+ modal: {
+ name: 'add-account',
+ options: { upgradingAccountId: account.id },
+ },
+ }),
+ );
+ break;
+ default:
+ break;
+ }
+ },
+ [navigate, dispatch],
+ );
+
+ const onSearchChange = useCallback((value: string) => {
+ setFilter(value);
+ }, []);
+
+ return (
+ <Page header={<MobilePageHeader title={t('Bank Sync')} />} padding={0}>
+ <View
+ style={{
+ flexDirection: 'row',
+ alignItems: 'center',
+ backgroundColor: theme.mobilePageBackground,
+ padding: 10,
+ width: '100%',
+ borderBottomWidth: 2,
+ borderBottomStyle: 'solid',
+ borderBottomColor: theme.tableBorder,
+ }}
+ >
+ <Search
+ placeholder={t('Filter accounts…')}
+ value={filter}
+ onChange={onSearchChange}
+ width="100%"
+ height={styles.mobileMinHeight}
+ style={{
+ backgroundColor: theme.tableBackground,
+ borderColor: theme.formInputBorder,
+ }}
+ />
+ </View>
+
+ {openAccounts.length === 0 ? (
+ <View
+ style={{
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ paddingHorizontal: 20,
+ paddingTop: 40,
+ }}
+ >
+ <Text
+ style={{
+ fontSize: 16,
+ color: theme.pageTextSubdued,
+ textAlign: 'center',
+ }}
+ >
+ <Trans>
+ To use the bank syncing features, you must first add an account.
+ </Trans>
+ </Text>
+ </View>
+ ) : (
+ <BankSyncAccountsList
+ groupedAccounts={filteredGroupedAccounts}
+ syncSourceReadable={syncSourceReadable}
+ onAction={onAction}
+ />
+ )}
+ </Page>
+ );
+}
diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx
index 615d9100f7..480ff6bdae 100644
--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx
+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx
@@ -19,7 +19,6 @@ import { send } from 'loot-core/platform/client/fetch';
import { type ParseFileOptions } from 'loot-core/server/transactions/import/parse-file';
import { amountToInteger } from 'loot-core/shared/util';
-import { CheckboxOption } from './CheckboxOption';
import { DateFormatSelect } from './DateFormatSelect';
import { FieldMappings } from './FieldMappings';
import { InOutOption } from './InOutOption';
@@ -47,6 +46,7 @@ import {
ModalHeader,
} from '@desktop-client/components/common/Modal';
import { SectionLabel } from '@desktop-client/components/forms';
+import { LabeledCheckbox } from '@desktop-client/components/forms/LabeledCheckbox';
import {
TableHeader,
TableWithNavigator,
@@ -901,7 +901,7 @@ export function ImportTransactionsModal({
)}
{isOfxFile(filetype) && (
- <CheckboxOption
+ <LabeledCheckbox
id="form_fallback_missing_payee"
checked={fallbackMissingPayeeToMemo}
onChange={() => {
@@ -909,11 +909,11 @@ export function ImportTransactionsModal({
}}
>
<Trans>Use Memo as a fallback for empty Payees</Trans>
- </CheckboxOption>
+ </LabeledCheckbox>
)}
{filetype !== 'csv' && (
- <CheckboxOption
+ <LabeledCheckbox
id="import_notes"
checked={importNotes}
onChange={() => {
@@ -921,11 +921,11 @@ export function ImportTransactionsModal({
}}
>
<Trans>Import notes from file</Trans>
- </CheckboxOption>
+ </LabeledCheckbox>
)}
{(isOfxFile(filetype) || isCamtFile(filetype)) && (
- <CheckboxOption
+ <LabeledCheckbox
id="form_dont_reconcile"
checked={reconcile}
onChange={() => {
@@ -933,7 +933,7 @@ export function ImportTransactionsModal({
}}
>
<Trans>Merge with existing transactions</Trans>
- </CheckboxOption>
+ </LabeledCheckbox>
)}
{/*Import Options */}
@@ -1005,7 +1005,7 @@ export function ImportTransactionsModal({
style={{ width: 50 }}
/>
</label>
- <CheckboxOption
+ <LabeledCheckbox
id="form_has_header"
checked={hasHeaderRow}
onChange={() => {
@@ -1013,8 +1013,8 @@ export function ImportTransactionsModal({
}}
>
<Trans>File has header row</Trans>
- </CheckboxOption>
- <CheckboxOption
+ </LabeledCheckbox>
+ <LabeledCheckbox
id="clear_on_import"
checked={clearOnImport}
onChange={() => {
@@ -1022,8 +1022,8 @@ export function ImportTransactionsModal({
}}
>
<Trans>Clear transactions on import</Trans>
- </CheckboxOption>
- <CheckboxOption
+ </LabeledCheckbox>
+ <LabeledCheckbox
id="form_dont_reconcile"
checked={reconcile}
onChange={() => {
@@ -1031,7 +1031,7 @@ export function ImportTransactionsModal({
}}
>
<Trans>Merge with existing transactions</Trans>
- </CheckboxOption>
+ </LabeledCheckbox>
</View>
)}
@@ -1039,7 +1039,7 @@ export function ImportTransactionsModal({
<View style={{ marginRight: 10, gap: 5 }}>
<SectionLabel title={t('AMOUNT OPTIONS')} />
- <CheckboxOption
+ <LabeledCheckbox
id="form_flip"
checked={flipAmount}
onChange={() => {
@@ -1047,7 +1047,7 @@ export function ImportTransactionsModal({
}}
>
<Trans>Flip amount</Trans>
- </CheckboxOption>
+ </LabeledCheckbox>
<MultiplierOption
multiplierEnabled={multiplierEnabled}
multiplierAmount={multiplierAmount}
@@ -1059,7 +1059,7 @@ export function ImportTransactionsModal({
/>
{filetype === 'csv' && (
<>
- <CheckboxOption
+ <LabeledCheckbox
id="form_split"
checked={splitMode}
onChange={() => {
@@ -1069,7 +1069,7 @@ export function ImportTransactionsModal({
<Trans>
Split amount into separate inflow/outflow columns
</Trans>
- </CheckboxOption>
+ </LabeledCheckbox>
<InOutOption
inOutMode={inOutMode}
outValue={outValue}
diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/InOutOption.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/InOutOption.tsx
index 9c64a95ded..5d017466fb 100644
--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/InOutOption.tsx
+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/InOutOption.tsx
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
import { Input } from '@actual-app/components/input';
import { View } from '@actual-app/components/view';
-import { CheckboxOption } from './CheckboxOption';
+import { LabeledCheckbox } from '@desktop-client/components/forms/LabeledCheckbox';
type InOutOptionProps = {
inOutMode: boolean;
@@ -25,7 +25,7 @@ export function InOutOption({
return (
<View style={{ flexDirection: 'row', gap: 10, height: 28 }}>
- <CheckboxOption
+ <LabeledCheckbox
id="form_inOut"
checked={inOutMode}
disabled={disabled}
@@ -34,7 +34,7 @@ export function InOutOption({
{inOutMode
? t('In/Out outflow value')
: t('Select column to specify if amount goes in/out')}
- </CheckboxOption>
+ </LabeledCheckbox>
{inOutMode && (
<Input
type="text"
diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/MultiplierOption.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/MultiplierOption.tsx
index 31c8a24d85..7175c0e2f4 100644
--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/MultiplierOption.tsx
+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/MultiplierOption.tsx
@@ -4,12 +4,12 @@ import { Trans, useTranslation } from 'react-i18next';
import { Input } from '@actual-app/components/input';
import { View } from '@actual-app/components/view';
-import { CheckboxOption } from './CheckboxOption';
+import { LabeledCheckbox } from '@desktop-client/components/forms/LabeledCheckbox';
type MultiplierOptionProps = {
multiplierEnabled: boolean;
multiplierAmount: string;
- onToggle: ComponentProps<typeof CheckboxOption>['onChange'];
+ onToggle: ComponentProps<typeof LabeledCheckbox>['onChange'];
onChangeAmount: (newValue: string) => void;
};
@@ -22,13 +22,13 @@ export function MultiplierOption({
const { t } = useTranslation();
return (
<View style={{ flexDirection: 'row', gap: 10, height: 28 }}>
- <CheckboxOption
+ <LabeledCheckbox
id="add_multiplier"
checked={multiplierEnabled}
onChange={onToggle}
>
<Trans>Multiply amount</Trans>
- </CheckboxOption>
+ </LabeledCheckbox>
<Input
type="text"
style={{ display: multiplierEnabled ? 'inherit' : 'none' }}
diff --git a/packages/desktop-client/src/components/responsive/narrow.ts b/packages/desktop-client/src/components/responsive/narrow.ts
index e0b48a0244..14f722f2f6 100644
--- a/packages/desktop-client/src/components/responsive/narrow.ts
+++ b/packages/desktop-client/src/components/responsive/narrow.ts
@@ -8,3 +8,5 @@ export { MobileRuleEditPage as RuleEdit } from '../mobile/rules/MobileRuleEditPa
export { CategoryPage as Category } from '../mobile/budget/CategoryPage';
export { MobilePayeesPage as Payees } from '../mobile/payees/MobilePayeesPage';
+export { MobileBankSyncPage as BankSync } from '../mobile/banksync/MobileBankSyncPage';
+export { MobileBankSyncAccountEditPage as BankSyncAccountEdit } from '../mobile/banksync/MobileBankSyncAccountEditPage';
diff --git a/packages/desktop-client/src/components/responsive/wide.ts b/packages/desktop-client/src/components/responsive/wide.ts
index fe7f63f325..d9b8d59f24 100644
--- a/packages/desktop-client/src/components/responsive/wide.ts
+++ b/packages/desktop-client/src/components/responsive/wide.ts
@@ -10,6 +10,7 @@ export { Account } from '../accounts/Account';
export { ManageRulesPage as Rules } from '../ManageRulesPage';
export { ManageRulesPage as RuleEdit } from '../ManageRulesPage';
export { ManagePayeesPage as Payees } from '../payees/ManagePayeesPage';
+export { BankSync } from '../banksync';
export { UserDirectoryPage } from '../admin/UserDirectory/UserDirectoryPage';
diff --git a/packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx b/packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx
index f8cec43e51..f1cebeda14 100644
--- a/packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx
+++ b/packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx
@@ -16,6 +16,8 @@ import {
import { SvgCalendar3 } from '@actual-app/components/icons/v2';
import { View } from '@actual-app/components/view';
+import * as Platform from 'loot-core/shared/platform';
+
import { Item } from './Item';
import { SecondaryItem } from './SecondaryItem';
@@ -28,7 +30,8 @@ export function PrimaryButtons() {
const location = useLocation();
const syncServerStatus = useSyncServerStatus();
- const isUsingServer = syncServerStatus !== 'no-server';
+ const isUsingServer =
+ syncServerStatus !== 'no-server' || Platform.isPlaywright;
const isActive = [
'/payees',
diff --git a/upcoming-release-notes/5978.md b/upcoming-release-notes/5978.md
new file mode 100644
index 0000000000..6d881b1ca9
--- /dev/null
+++ b/upcoming-release-notes/5978.md
@@ -0,0 +1,6 @@
+---
+category: Features
+authors: [matt-fidd]
+---
+
+Add bank sync settings to mobile