From e792afb1fdb302add44b006e326d58342986e746 Mon Sep 17 00:00:00 2001 From: HansiWursti <marvinkraemer@gmx.de> Date: Wed, 10 Jan 2024 00:06:24 +0100 Subject: [PATCH] ReAdd Mobile Account Error Page (#2204) * Add "error" Page for special accounts in Mobile --- .../src/components/accounts/MobileAccount.jsx | 26 ++++++++++++++++++- upcoming-release-notes/2204.md | 6 +++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 upcoming-release-notes/2204.md diff --git a/packages/desktop-client/src/components/accounts/MobileAccount.jsx b/packages/desktop-client/src/components/accounts/MobileAccount.jsx index 37285271b..aaaed0db5 100644 --- a/packages/desktop-client/src/components/accounts/MobileAccount.jsx +++ b/packages/desktop-client/src/components/accounts/MobileAccount.jsx @@ -22,7 +22,10 @@ import { import { useCategories } from '../../hooks/useCategories'; import { useNavigate } from '../../hooks/useNavigate'; import { useSetThemeColor } from '../../hooks/useSetThemeColor'; -import { theme } from '../../style'; +import { theme, styles } from '../../style'; +import { Button } from '../common/Button'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { AccountDetails } from './MobileAccountDetails'; @@ -171,6 +174,27 @@ export function Account(props) { return null; } + if ( + accountId === 'budgeted' || + accountId === 'offbudget' || + accountId === 'uncategorized' + ) { + return ( + <View style={{ flex: 1, padding: 30 }}> + <Text style={(styles.text, { textAlign: 'center' })}> + There is no Mobile View at the moment + </Text> + <Button + type="normal" + style={{ fontSize: 15, marginLeft: 10, marginTop: 10 }} + onClick={() => navigate('/accounts')} + > + Go back to Mobile Accounts + </Button> + </View> + ); + } + const account = accounts.find(acct => acct.id === accountId); const isNewTransaction = id => { diff --git a/upcoming-release-notes/2204.md b/upcoming-release-notes/2204.md new file mode 100644 index 000000000..34922bfef --- /dev/null +++ b/upcoming-release-notes/2204.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [HansiWursti] +--- + +Re implemented the mobile Account Error Page introduced in #2114 and reverted in #2186 \ No newline at end of file -- GitLab