A local-first personal finance app
Mobile pages standardized (Colors/UI) (#1874)
Neile8055bbc35fb
diff --git a/packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-closes-an-account-1-chromium-linux.png b/packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-closes-an-account-1-chromium-linux.pngindex 1358b92826..f2f0865d47 100644Binary files a/packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-closes-an-account-1-chromium-linux.png and b/packages/desktop-client/e2e/accounts.test.js-snapshots/Accounts-closes-an-account-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-1-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-1-chromium-linux.pngindex 83c7dd47bb..5574f459f0 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-1-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.pngindex f52c2aec88..996545fab4 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-3-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-3-chromium-linux.pngindex b5934abb60..64807bb85f 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-3-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-3-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-4-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-4-chromium-linux.pngindex 2f8703bb8a..e37fc6eeda 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-4-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-4-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-from-accounts-id-page-1-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-from-accounts-id-page-1-chromium-linux.pngindex 6abd408273..4c8580acc0 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-from-accounts-id-page-1-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-from-accounts-id-page-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-from-accounts-id-page-2-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-from-accounts-id-page-2-chromium-linux.pngindex bba9c46663..b7ad27a318 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-from-accounts-id-page-2-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-from-accounts-id-page-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-1-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-1-chromium-linux.pngindex e2981f282c..a40f412056 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-1-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-2-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-2-chromium-linux.pngindex a7777737ad..db11cd19ec 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-2-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-3-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-3-chromium-linux.pngindex 01f9ba542a..306ba76c01 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-3-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-3-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-4-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-4-chromium-linux.pngindex 0071e75e91..21eb731925 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-4-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-4-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-5-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-5-chromium-linux.pngindex 4f9429c520..c1571693f8 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-5-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-5-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-6-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-6-chromium-linux.pngindex a9550879a2..6486bdb5c3 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-6-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-creates-a-transaction-via-footer-button-6-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-loads-the-budget-page-with-budgeted-amounts-1-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-loads-the-budget-page-with-budgeted-amounts-1-chromium-linux.pngindex c8f465f9d2..653a64dc02 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-loads-the-budget-page-with-budgeted-amounts-1-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-loads-the-budget-page-with-budgeted-amounts-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-loads-the-budget-page-with-budgeted-amounts-2-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-loads-the-budget-page-with-budgeted-amounts-2-chromium-linux.pngindex 5540f29045..dfd683c674 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-loads-the-budget-page-with-budgeted-amounts-2-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-loads-the-budget-page-with-budgeted-amounts-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-1-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-1-chromium-linux.pngindex 6747d2985a..f1610b7cbd 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-1-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-2-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-2-chromium-linux.pngindex b4ac3b47f3..e17c4e161d 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-2-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-3-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-3-chromium-linux.pngindex 061d910343..5bd758cae7 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-3-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-3-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-4-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-4-chromium-linux.pngindex 47f1dd9c98..16ce74065f 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-4-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-4-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-5-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-5-chromium-linux.pngindex 3f9ef206aa..549b92b566 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-5-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-5-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-6-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-6-chromium-linux.pngindex 6f82bce4b3..364eee5d42 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-6-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-individual-account-page-and-checks-that-filtering-is-working-6-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-1-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-1-chromium-linux.pngindex 0019449738..5f3d2ce786 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-1-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-2-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-2-chromium-linux.pngindex 0cef62b3ed..4b35b1090e 100644Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-2-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-opens-the-accounts-page-and-asserts-on-balances-2-chromium-linux.png differdiff --git a/packages/desktop-client/src/components/AnimatedRefresh.tsx b/packages/desktop-client/src/components/AnimatedRefresh.tsxindex b80bd955a7..4daa078247 100644--- a/packages/desktop-client/src/components/AnimatedRefresh.tsx+++ b/packages/desktop-client/src/components/AnimatedRefresh.tsx@@ -15,17 +15,25 @@ let spin = keyframes({type AnimatedRefreshProps = {animating: boolean;iconStyle?: CSSProperties;+ width?: number;+ height?: number;};export default function AnimatedRefresh({animating,iconStyle,+ width,+ height,}: AnimatedRefreshProps) {return (<Viewstyle={{ animation: animating ? `${spin} 1s infinite linear` : null }}>- <Refresh width={14} height={14} style={iconStyle} />+ <Refresh+ width={width ? width : 14}+ height={height ? height : 14}+ style={iconStyle}+ /></View>);}diff --git a/packages/desktop-client/src/components/Titlebar.tsx b/packages/desktop-client/src/components/Titlebar.tsxindex b318396349..816753b0c3 100644--- a/packages/desktop-client/src/components/Titlebar.tsx+++ b/packages/desktop-client/src/components/Titlebar.tsx@@ -22,7 +22,7 @@ import SvgEye from '../icons/v2/Eye';import SvgEyeSlashed from '../icons/v2/EyeSlashed';import NavigationMenu from '../icons/v2/NavigationMenu';import { useResponsive } from '../ResponsiveProvider';-import { theme, type CSSProperties } from '../style';+import { theme, type CSSProperties, styles } from '../style';import AccountSyncCheck from './accounts/AccountSyncCheck';import AnimatedRefresh from './AnimatedRefresh';@@ -163,8 +163,8 @@ export function SyncButton({ style, isMobile = false }: SyncButtonProps) {: syncState === 'disabled' ||syncState === 'offline' ||syncState === 'local'- ? theme.sidebarItemText- : style.color;+ ? theme.mobileHeaderTextSubdued+ : theme.mobileHeaderText;const desktopColor =syncState === 'error'? theme.errorTextDark@@ -180,6 +180,28 @@ export function SyncButton({ style, isMobile = false }: SyncButtonProps) {}: {};+ const hoveredStyle = isMobile+ ? {+ color: mobileColor,+ background: theme.mobileHeaderTextHover,+ }+ : {};++ const mobileIconStyle = {+ color: mobileColor,+ justifyContent: 'center',+ margin: 10,+ paddingLeft: 5,+ paddingRight: 3,+ };++ const mobileTextStyle = {+ ...styles.text,+ fontWeight: 500,+ marginLeft: 2,+ marginRight: 5,+ };+return (<><KeyHandlers@@ -192,21 +214,35 @@ export function SyncButton({ style, isMobile = false }: SyncButtonProps) {<Buttontype="bare"- style={{- ...style,- WebkitAppRegion: 'none',- color: isMobile ? mobileColor : desktopColor,- }}- hoveredStyle={activeStyle}+ style={+ isMobile+ ? {+ ...style,+ WebkitAppRegion: 'none',+ ...mobileIconStyle,+ }+ : {+ ...style,+ WebkitAppRegion: 'none',+ color: desktopColor,+ }+ }+ hoveredStyle={hoveredStyle}activeStyle={activeStyle}onClick={sync}>- {syncState === 'error' ? (+ {isMobile ? (+ syncState === 'error' ? (+ <AlertTriangle width={14} height={14} />+ ) : (+ <AnimatedRefresh width={18} height={18} animating={syncing} />+ )+ ) : syncState === 'error' ? (<AlertTriangle width={13} />) : (<AnimatedRefresh animating={syncing} />)}- <Text style={{ marginLeft: 3 }}>+ <Text style={isMobile ? { ...mobileTextStyle } : { marginLeft: 3 }}>{syncState === 'disabled'? 'Disabled': syncState === 'offline'diff --git a/packages/desktop-client/src/components/accounts/MobileAccount.js b/packages/desktop-client/src/components/accounts/MobileAccount.jsindex fcf3a487e4..794c59a4c0 100644--- a/packages/desktop-client/src/components/accounts/MobileAccount.js+++ b/packages/desktop-client/src/components/accounts/MobileAccount.js@@ -165,7 +165,7 @@ export default function Account(props) {useEffect(updateSearchQuery, [searchText, currentQuery, state.dateFormat]);- useSetThemeColor(theme.mobileAccountViewTheme);+ useSetThemeColor(theme.mobileViewTheme);if (!accounts || !accounts.length) {return null;diff --git a/packages/desktop-client/src/components/accounts/MobileAccountDetails.js b/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsindex b5cbcc4e3a..bde2acfceb 100644--- a/packages/desktop-client/src/components/accounts/MobileAccountDetails.js+++ b/packages/desktop-client/src/components/accounts/MobileAccountDetails.js@@ -6,6 +6,7 @@ import Add from '../../icons/v1/Add';import CheveronLeft from '../../icons/v1/CheveronLeft';import SearchAlternate from '../../icons/v2/SearchAlternate';import { theme, styles } from '../../style';+import Button from '../common/Button';import ButtonLink from '../common/ButtonLink';import InputWithContent from '../common/InputWithContent';import Label from '../common/Label';@@ -23,9 +24,8 @@ function TransactionSearchInput({ accountName, onSearch }) {style={{flexDirection: 'row',alignItems: 'center',- backgroundColor: theme.tableHeaderBackground,+ backgroundColor: theme.mobilePageBackground,margin: '11px auto 4px',- borderRadius: 4,padding: 10,width: '100%',}}@@ -50,7 +50,7 @@ function TransactionSearchInput({ accountName, onSearch }) {}}placeholder={`Search ${accountName}`}style={{- backgroundColor: theme.formInputBackground,+ backgroundColor: theme.tableBackground,border: `1px solid ${theme.formInputBorder}`,fontSize: 15,flex: 1,@@ -64,6 +64,8 @@ function TransactionSearchInput({ accountName, onSearch }) {}const LEFT_RIGHT_FLEX_WIDTH = 70;+const BUDGET_HEADER_HEIGHT = 50;+export default function AccountDetails({account,prependTransactions,@@ -91,9 +93,9 @@ export default function AccountDetails({<Viewstyle={{flex: 1,- backgroundColor: theme.tableHeaderBackground,+ backgroundColor: theme.mobilePageBackground,overflowY: 'hidden',- width: '100%',+ flexGrow: 1,}}><View@@ -101,52 +103,111 @@ export default function AccountDetails({alignItems: 'center',flexShrink: 0,overflowY: 'hidden',- paddingTop: 10,top: 0,- width: '100%',}}><Viewstyle={{- alignItems: 'center',flexDirection: 'row',- justifyContent: 'space-between',+ flexShrink: 0,+ height: BUDGET_HEADER_HEIGHT,width: '100%',+ backgroundColor: theme.mobileHeaderBackground,}}>- <Link- to={-1}+ <Viewstyle={{- color: theme.formLabelText,- alignItems: 'center',- display: 'flex',- textDecoration: 'none',width: LEFT_RIGHT_FLEX_WIDTH,+ flexDirection: 'row',}}>- <CheveronLeft style={{ width: 32, height: 32 }} />- <Text style={{ ...styles.text, fontWeight: 500 }}>Back</Text>- </Link>+ <Button+ type="bare"+ style={{+ color: theme.mobileHeaderText,+ justifyContent: 'center',+ margin: 10,+ paddingLeft: 5,+ paddingRight: 3,+ }}+ hoveredStyle={{+ color: theme.mobileHeaderText,+ background: theme.mobileHeaderTextHover,+ }}+ >+ <Link+ to={-1}+ style={{+ alignItems: 'center',+ display: 'flex',+ textDecoration: 'none',+ }}+ >+ <CheveronLeft+ style={{ width: 30, height: 30, margin: -10, marginLeft: -5 }}+ />+ <Text+ style={{+ ...styles.text,+ fontWeight: 500,+ marginLeft: 5,+ marginRight: 5,+ }}+ >+ Back+ </Text>+ </Link>+ </Button>+ <View+ style={{+ flex: 1,+ }}+ />+ </View><Viewstyle={{+ flex: 1,fontSize: 16,fontWeight: 500,+ alignItems: 'center',+ justifyContent: 'center',+ color: theme.mobileHeaderText,}}role="heading">{account.name}</View>- <ButtonLink- to="transactions/new"- type="bare"- aria-label="Add Transaction"- style={{ justifyContent: 'center', width: LEFT_RIGHT_FLEX_WIDTH }}- hoveredStyle={{ background: 'transparent' }}- activeStyle={{ background: 'transparent' }}+ <View+ style={{+ width: LEFT_RIGHT_FLEX_WIDTH,+ flexDirection: 'row',+ }}>- <Add width={20} height={20} />- </ButtonLink>+ <View+ style={{+ flex: 1,+ }}+ />+ <ButtonLink+ to="transactions/new"+ type="bare"+ aria-label="Add Transaction"+ style={{+ justifyContent: 'center',+ padding: 10,+ margin: 10,+ color: theme.mobileHeaderText,+ }}+ hoveredStyle={{+ color: theme.mobileHeaderText,+ background: theme.mobileHeaderTextHover,+ }}+ activeStyle={{ background: 'transparent' }}+ >+ <Add width={20} height={20} style={{ margin: -5 }} />+ </ButtonLink>+ </View></View><Label title="BALANCE" style={{ marginTop: 10 }} /><CellValuediff --git a/packages/desktop-client/src/components/accounts/MobileAccounts.js b/packages/desktop-client/src/components/accounts/MobileAccounts.jsindex 09364b154e..186583d3a7 100644--- a/packages/desktop-client/src/components/accounts/MobileAccounts.js+++ b/packages/desktop-client/src/components/accounts/MobileAccounts.js@@ -23,6 +23,7 @@ function AccountHeader({ name, amount, style = {} }) {flex: '1 0 auto',flexDirection: 'row',marginTop: 10,+ marginRight: 10,color: theme.pageTextLight,...style,}}@@ -58,6 +59,7 @@ function AccountCard({ account, updated, getBalanceQuery, onSelect }) {boxShadow: `0 1px 1px ${theme.mobileAccountShadow}`,borderRadius: 6,marginTop: 10,+ marginRight: 10,}}data-testid="account">@@ -170,8 +172,15 @@ function AccountList({}return (- <View style={{ flex: 1 }}>- <Page title="Accounts">+ <View style={{ flex: 1, backgroundColor: theme.mobilePageBackground }}>+ <Page+ title="Accounts"+ titleStyle={{+ backgroundColor: theme.mobileHeaderBackground,+ color: theme.mobileHeaderText,+ fontSize: 16,+ }}+ ><PullToRefresh onRefresh={syncAndDownload}><AccountHeader name="For Budget" amount={getOnBudgetBalance()} />{budgetedAccounts.map(acct => (@@ -233,7 +242,7 @@ export default function Accounts() {navigate(`/transaction/${transaction}`);};- useSetThemeColor(theme.mobileAccountsViewTheme);+ useSetThemeColor(theme.mobileViewTheme);return (<View style={{ flex: 1 }}>diff --git a/packages/desktop-client/src/components/budget/MobileBudget.js b/packages/desktop-client/src/components/budget/MobileBudget.jsindex c992a255fc..0f3d526861 100644--- a/packages/desktop-client/src/components/budget/MobileBudget.js+++ b/packages/desktop-client/src/components/budget/MobileBudget.js@@ -340,7 +340,7 @@ class Budget extends Component {<Viewstyle={{flex: 1,- backgroundColor: theme.pageBackgroundLineTop,+ backgroundColor: theme.mobilePageBackground,alignItems: 'center',justifyContent: 'center',marginBottom: 25,@@ -400,7 +400,7 @@ export default function BudgetWrapper() {let actions = useActions();let spreadsheet = useSpreadsheet();- useSetThemeColor(theme.mobileBudgetViewTheme);+ useSetThemeColor(theme.mobileViewTheme);return (<BudgetcategoryGroups={categoryGroups}diff --git a/packages/desktop-client/src/components/budget/MobileBudgetTable.js b/packages/desktop-client/src/components/budget/MobileBudgetTable.jsindex 318dd416ea..36c18087a4 100644--- a/packages/desktop-client/src/components/budget/MobileBudgetTable.js+++ b/packages/desktop-client/src/components/budget/MobileBudgetTable.js@@ -1634,7 +1634,7 @@ export function BudgetTable(props) {flex: '0 0 auto',padding: 10,paddingRight: 14,- backgroundColor: 'white',+ backgroundColor: theme.tableRowHeaderBackground,borderBottomWidth: 1,borderColor: theme.tableBorder,}}@@ -1831,6 +1831,7 @@ export function BudgetTable(props) {);}+const LEFT_RIGHT_FLEX_WIDTH = 80;const BUDGET_HEADER_HEIGHT = 50;function BudgetHeader({@@ -1849,9 +1850,8 @@ function BudgetHeader({let nextEnabled = currentMonth < monthUtils.subMonths(monthBounds.end, 1);let buttonStyle = {- paddingLeft: 15,- paddingRight: 15,- backgroundColor: 'transparent',+ padding: 10,+ margin: 2,};let toggleHiddenCategories = () => {@@ -1882,13 +1882,12 @@ function BudgetHeader({flexDirection: 'row',flexShrink: 0,height: BUDGET_HEADER_HEIGHT,- backgroundColor: theme.buttonPrimaryBackground,+ backgroundColor: theme.mobileHeaderBackground,}}><Viewstyle={{- flexBasis: '25%',- justifyContent: 'flex-start',+ width: LEFT_RIGHT_FLEX_WIDTH,flexDirection: 'row',}}>@@ -1896,17 +1895,21 @@ function BudgetHeader({<SyncButtonisMobilestyle={{- color: 'white',- backgroundColor: 'transparent',+ color: theme.mobileHeaderText,paddingLeft: 12,paddingRight: 12,}}/>)}+ <View+ style={{+ flex: 1,+ }}+ /></View><Viewstyle={{- flexBasis: '50%',+ flex: 1,justifyContent: 'center',alignItems: 'center',flexDirection: 'row',@@ -1919,19 +1922,21 @@ function BudgetHeader({style={{...buttonStyle,opacity: prevEnabled ? 1 : 0.6,+ color: theme.mobileHeaderText,+ }}+ hoveredStyle={{+ color: theme.mobileHeaderText,+ background: theme.mobileHeaderTextHover,}}>- <ArrowThinLeft- style={{ color: theme.formInputTextReadOnlySelection }}- width="15"- height="15"- />+ <ArrowThinLeft width="15" height="15" style={{ margin: -5 }} /></Button><Textstyle={{- ...styles.mediumText,- color: theme.formInputTextSelected,+ color: theme.mobileHeaderText,textAlign: 'center',+ fontSize: 16,+ fontWeight: 500,// zIndex: -1}}>@@ -1942,37 +1947,49 @@ function BudgetHeader({type="bare"onClick={nextEnabled && onNextMonth}// hitSlop={{ top: 5, bottom: 5, left: 30, right: 5 }}- style={{ ...buttonStyle, opacity: nextEnabled ? 1 : 0.6 }}+ style={{+ ...buttonStyle,+ opacity: nextEnabled ? 1 : 0.6,+ color: theme.mobileHeaderText,+ }}+ hoveredStyle={{+ color: theme.mobileHeaderText,+ background: theme.mobileHeaderTextHover,+ }}>- <ArrowThinRight- style={{ color: theme.formInputTextReadOnlySelection }}- width="15"- height="15"- />+ <ArrowThinRight width="15" height="15" style={{ margin: -5 }} /></Button></View><Viewstyle={{- flexBasis: '25%',- justifyContent: 'flex-end',+ width: LEFT_RIGHT_FLEX_WIDTH,flexDirection: 'row',}}>+ <View+ style={{+ flex: 1,+ }}+ />{!editMode ? (<><Buttontype="bare"+ hoveredStyle={{+ color: theme.mobileHeaderText,+ background: theme.mobileHeaderTextHover,+ }}style={{- backgroundColor: 'transparent',- paddingLeft: 12,- paddingRight: 12,+ paddingTop: 15,+ paddingBottom: 15,+ margin: 10,}}{...tooltip.getOpenEvents()}><DotsHorizontalTriplewidth="20"height="20"- style={{ color: 'white' }}+ style={{ color: theme.mobileHeaderText }}/></Button>{tooltip.isOpen && (@@ -1998,12 +2015,18 @@ function BudgetHeader({) : (<Buttontype="bare"+ hoveredStyle={{+ color: theme.mobileHeaderText,+ background: theme.mobileHeaderTextHover,+ }}style={{backgroundColor: 'transparent',- paddingLeft: 12,- paddingRight: 12,- ...styles.mediumText,- color: 'white',+ padding: 10,+ paddingTop: 15,+ paddingBottom: 15,+ margin: 10,+ ...styles.text,+ color: theme.mobileHeaderText,}}onClick={() => onEditMode?.(false)}>diff --git a/packages/desktop-client/src/components/mobile/MobileAmountInput.js b/packages/desktop-client/src/components/mobile/MobileAmountInput.jsindex c882b44637..386f4a71be 100644--- a/packages/desktop-client/src/components/mobile/MobileAmountInput.js+++ b/packages/desktop-client/src/components/mobile/MobileAmountInput.js@@ -165,7 +165,7 @@ class AmountInput extends PureComponent {borderColor: theme.pillBorderSelected,borderRadius: 4,padding: 5,- backgroundColor: 'white',+ backgroundColor: theme.tableBackground,...style,}}>diff --git a/packages/desktop-client/src/components/mobile/MobileForms.js b/packages/desktop-client/src/components/mobile/MobileForms.jsindex 66f5bd780f..f0092359a6 100644--- a/packages/desktop-client/src/components/mobile/MobileForms.js+++ b/packages/desktop-client/src/components/mobile/MobileForms.js@@ -54,9 +54,10 @@ export const InputField = forwardRef(function InputField(style={{...valueStyle,...style,+ color: disabled ? theme.tableTextInactive : theme.tableText,backgroundColor: disabled? theme.formInputTextReadOnlySelection- : 'white',+ : theme.tableBackground,}}{...props}/>@@ -82,7 +83,7 @@ export function TapField({alignItems: 'center',...style,...valueStyle,- backgroundColor: 'white',+ backgroundColor: theme.tableBackground,...(disabled && {backgroundColor: theme.formInputTextReadOnlySelection,}),diff --git a/packages/desktop-client/src/components/settings/index.tsx b/packages/desktop-client/src/components/settings/index.tsxindex 26985c7807..e8e9d0623f 100644--- a/packages/desktop-client/src/components/settings/index.tsx+++ b/packages/desktop-client/src/components/settings/index.tsx@@ -137,10 +137,11 @@ export default function Settings() {const { isNarrowWidth } = useResponsive();const themesFlag = useFeatureFlag('themes');- useSetThemeColor(theme.mobileSettingsViewTheme);+ useSetThemeColor(theme.mobileViewTheme);return (<Viewstyle={{+ backgroundColor: isNarrowWidth && theme.mobilePageBackground,marginInline: floatingSidebar && !isNarrowWidth ? 'auto' : 0,}}>@@ -149,8 +150,10 @@ export default function Settings() {titleStyle={isNarrowWidth? {- backgroundColor: theme.menuItemBackground,- color: theme.menuItemText,+ backgroundColor: theme.mobileHeaderBackground,+ color: theme.mobileHeaderText,+ fontSize: 16,+ fontWeight: 500,}: undefined}diff --git a/packages/desktop-client/src/components/transactions/MobileTransaction.js b/packages/desktop-client/src/components/transactions/MobileTransaction.jsindex 4c54a5c0e7..688ff6f294 100644--- a/packages/desktop-client/src/components/transactions/MobileTransaction.js+++ b/packages/desktop-client/src/components/transactions/MobileTransaction.js@@ -162,6 +162,8 @@ function Status({ status }) {}const LEFT_RIGHT_FLEX_WIDTH = 70;+const BUDGET_HEADER_HEIGHT = 50;+class TransactionEditInner extends PureComponent {constructor(props) {super(props);@@ -324,11 +326,8 @@ class TransactionEditInner extends PureComponent {// <KeyboardAvoidingView><Viewstyle={{- margin: 10,- marginTop: 3,- backgroundColor: theme.tableHeaderBackground,- flex: 1,- borderRadius: 4,+ backgroundColor: theme.mobilePageBackground,+ flexGrow: 1,// This shadow make the card "pop" off of the screen below// it@@ -340,66 +339,97 @@ class TransactionEditInner extends PureComponent {><Viewstyle={{- borderRadius: 4,overflow: 'hidden',display: 'flex',- flex: 'auto',+ flexGrow: 1,}}><Viewstyle={{- borderBottomWidth: 1,- borderColor: theme.tableBorder,- backgroundColor: theme.tableBackground,- alignItems: 'center',- flexDirection: 'row',flexShrink: 0,- justifyContent: 'space-between',+ height: BUDGET_HEADER_HEIGHT,+ flexDirection: 'row',width: '100%',- padding: 10,+ backgroundColor: theme.mobileHeaderBackground,}}>- <Link- to={-1}+ <Viewstyle={{- alignItems: 'center',- display: 'flex',- textDecoration: 'none',width: LEFT_RIGHT_FLEX_WIDTH,+ flexDirection: 'row',}}>- <CheveronLeft+ <Button+ type="bare"style={{- color: theme.formLabelText,- width: 32,- height: 32,+ color: theme.mobileHeaderText,+ justifyContent: 'center',+ margin: 10,+ paddingLeft: 5,+ paddingRight: 3,}}- />- <Text- style={{- ...styles.text,- color: theme.formLabelText,- fontWeight: 500,+ hoveredStyle={{+ color: theme.mobileHeaderText,+ background: theme.mobileHeaderTextHover,}}>- Back- </Text>- </Link>- <TextOneLine+ <Link+ to={-1}+ style={{+ alignItems: 'center',+ display: 'flex',+ textDecoration: 'none',+ }}+ >+ <CheveronLeft+ style={{+ width: 30,+ height: 30,+ margin: -10,+ marginLeft: -5,+ }}+ />+ <Text+ style={{+ ...styles.text,+ fontWeight: 500,+ marginLeft: 5,+ marginRight: 5,+ }}+ >+ Back+ </Text>+ </Link>+ </Button>+ <View+ style={{+ flex: 1,+ }}+ />+ </View>+ <Viewstyle={{- color: theme.formInputText,- fontSize: 15,- fontWeight: 600,- userSelect: 'none',+ flex: 1,+ justifyContent: 'center',+ alignItems: 'center',+ color: theme.mobileHeaderText,}}- role="heading">- {payeeId == null- ? adding- ? 'New Transaction'- : 'Transaction'- : descriptionPretty}- </TextOneLine>+ <TextOneLine+ style={{+ fontSize: 16,+ fontWeight: 500,+ userSelect: 'none',+ }}+ role="heading"+ >+ {payeeId == null+ ? adding+ ? 'New Transaction'+ : 'Transaction'+ : descriptionPretty}+ </TextOneLine>+ </View>{/* For centering the transaction title */}<Viewstyle={{@@ -527,7 +557,7 @@ class TransactionEditInner extends PureComponent {<InputFieldtype="date"required- style={{ color: 'canvastext', minWidth: '150px' }}+ style={{ color: theme.tableText, minWidth: '150px' }}defaultValue={dateDefaultValue}onUpdate={value =>this.onEdit(@@ -573,6 +603,7 @@ class TransactionEditInner extends PureComponent {onChange={e =>this.onQueueChange(transaction, 'notes', e.target.value)}+ style={{ marginBottom: 10 }}/></View>@@ -585,7 +616,7 @@ class TransactionEditInner extends PureComponent {paddingVertical: 5,marginLeft: styles.mobileEditingPadding,marginRight: styles.mobileEditingPadding,- marginTop: 20,+ marginTop: 10,marginBottom: 15,backgroundColor: 'transparent',}}@@ -706,7 +737,7 @@ function TransactionEditUnconnected(props) {let transactions = [];let adding = false;let deleted = false;- useSetThemeColor(theme.mobileTransactionViewTheme);+ useSetThemeColor(theme.mobileViewTheme);useEffect(() => {// May as well update categories / accounts when transaction ID changes@@ -827,7 +858,7 @@ function TransactionEditUnconnected(props) {<Viewstyle={{flex: 1,- backgroundColor: theme.buttonPrimaryBackground,+ backgroundColor: theme.pageBackground,}}><TransactionEditInner@@ -931,7 +962,7 @@ class Transaction extends PureComponent {<ButtononClick={() => onSelect(transaction)}style={{- backgroundColor: 'white',+ backgroundColor: theme.tableBackground,border: 'none',width: '100%',}}@@ -1086,6 +1117,7 @@ export class TransactionList extends Component {display: 'flex',justifyContent: 'center',width: '100%',+ backgroundColor: theme.mobilePageBackground,}}><Text style={{ fontSize: 15 }}>No transactions</Text>@@ -1194,7 +1226,7 @@ function ListBoxSection({ section, state }) {<div{...headingProps}className={`${css(styles.smallText, {- backgroundColor: theme.mobileDateBackground,+ backgroundColor: theme.pageBackground,borderBottom: `1px solid ${theme.tableBorder}`,borderTop: `1px solid ${theme.tableBorder}`,color: theme.tableHeaderText,diff --git a/packages/desktop-client/src/style/themes/dark.ts b/packages/desktop-client/src/style/themes/dark.tsindex 871fe79141..7bd969e149 100644--- a/packages/desktop-client/src/style/themes/dark.ts+++ b/packages/desktop-client/src/style/themes/dark.ts@@ -64,6 +64,11 @@ export const menuAutoCompleteTextHeader = menuItemTextHeader;export const modalBackground = colorPalette.gray800;export const mobilePageBackground = colorPalette.navy800;export const modalBorder = colorPalette.navy600;+export const mobileHeaderBackground = colorPalette.purple800;+export const mobileHeaderText = colorPalette.navy150;+export const mobileHeaderTextSubdued = colorPalette.gray200;+export const mobileHeaderTextHover = 'rgba(200, 200, 200, .15)';+export const mobilePageBackground = colorPalette.navy700;export const mobileNavBackground = colorPalette.navy800;export const mobileNavItem = colorPalette.navy150;export const mobileNavItemSelected = colorPalette.purple400;@@ -71,15 +76,10 @@ export const mobileAccountShadow = cardShadow;export const mobileAccountText = colorPalette.blue800;export const mobileModalBackground = colorPalette.navy900;export const mobileModalText = colorPalette.white;-export const mobileDateBackground = colorPalette.navy100;// Mobile view themes (for the top bar)-export const mobileAccountViewTheme = colorPalette.navy50;-export const mobileAccountsViewTheme = colorPalette.blue800;-export const mobileBudgetViewTheme = colorPalette.purple500;+export const mobileViewTheme = mobileHeaderBackground;export const mobileConfigServerViewTheme = colorPalette.purple500;-export const mobileSettingsViewTheme = colorPalette.navy50;-export const mobileTransactionViewTheme = colorPalette.purple500;export const markdownNormal = colorPalette.purple700;export const markdownDark = colorPalette.purple500;@@ -178,7 +178,7 @@ export const checkboxShadowSelected = colorPalette.purple500;export const pillBackground = colorPalette.navy800;export const pillText = colorPalette.navy200;-export const pillTextHighlighted = colorPalette.purple500;+export const pillTextHighlighted = colorPalette.purple300;export const pillBorder = colorPalette.navy700;export const pillBorderDark = pillBorder;export const pillBackgroundSelected = colorPalette.purple600;diff --git a/packages/desktop-client/src/style/themes/light.ts b/packages/desktop-client/src/style/themes/light.tsindex 8ac4c5374e..7bf1505dcc 100644--- a/packages/desktop-client/src/style/themes/light.ts+++ b/packages/desktop-client/src/style/themes/light.ts@@ -64,6 +64,11 @@ export const menuAutoCompleteTextHeader = colorPalette.orange150;export const modalBackground = colorPalette.white;export const mobilePageBackground = colorPalette.blue800;export const modalBorder = colorPalette.white;+export const mobileHeaderBackground = colorPalette.purple400;+export const mobileHeaderText = colorPalette.navy50;+export const mobileHeaderTextSubdued = colorPalette.gray200;+export const mobileHeaderTextHover = 'rgba(200, 200, 200, .15)';+export const mobilePageBackground = colorPalette.navy50;export const mobileNavBackground = colorPalette.white;export const mobileNavItem = colorPalette.gray300;export const mobileNavItemSelected = colorPalette.purple500;@@ -71,15 +76,10 @@ export const mobileAccountShadow = colorPalette.navy300;export const mobileAccountText = colorPalette.blue800;export const mobileModalBackground = colorPalette.navy900;export const mobileModalText = colorPalette.white;-export const mobileDateBackground = colorPalette.navy100;// Mobile view themes (for the top bar)-export const mobileAccountViewTheme = colorPalette.navy50;-export const mobileAccountsViewTheme = colorPalette.blue800;-export const mobileBudgetViewTheme = colorPalette.purple500;+export const mobileViewTheme = mobileHeaderBackground;export const mobileConfigServerViewTheme = colorPalette.purple500;-export const mobileSettingsViewTheme = colorPalette.navy50;-export const mobileTransactionViewTheme = colorPalette.purple500;export const markdownNormal = colorPalette.purple150;export const markdownDark = colorPalette.purple400;diff --git a/upcoming-release-notes/1874.md b/upcoming-release-notes/1874.mdnew file mode 100644index 0000000000..6271b4b9c5--- /dev/null+++ b/upcoming-release-notes/1874.md@@ -0,0 +1,6 @@+---+category: Enhancements+authors: [carkom]+---++Standardizes mobile colors so that the mobile view feels much more unified.\ No newline at end of file