-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrations out of sync modal #3600
Merged
MikesGlitch
merged 10 commits into
actualbudget:master
from
MikesGlitch:electron/client-version-out-of-sync
Oct 10, 2024
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
013f53b
add a modal to say client is wrong version, accept the risks to conti…
MikesGlitch e8e1dfd
Merge branch 'master' of https://github.com/MikesGlitch/actual into e…
MikesGlitch a21cc28
user friendly error
MikesGlitch f08d0ed
hooking parts up - untested
MikesGlitch cd260bd
changed approach
MikesGlitch d8f4208
release notes
MikesGlitch ee7d982
Merge branch 'master' of https://github.com/MikesGlitch/actual into e…
MikesGlitch e0ba62b
removing old comments
MikesGlitch dc2881d
cleanup old code
MikesGlitch a478899
feedback
MikesGlitch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import React from 'react'; | ||
import { Trans, useTranslation } from 'react-i18next'; | ||
import { useDispatch } from 'react-redux'; | ||
|
||
import { closeBudget } from 'loot-core/client/actions'; | ||
|
||
import { Button } from '../common/Button2'; | ||
import { Link } from '../common/Link'; | ||
import { Modal, ModalHeader, ModalTitle } from '../common/Modal'; | ||
import { Paragraph } from '../common/Paragraph'; | ||
import { Text } from '../common/Text'; | ||
import { View } from '../common/View'; | ||
|
||
export function OutOfSyncMigrationsModal() { | ||
const dispatch = useDispatch(); | ||
|
||
const { t } = useTranslation(); | ||
|
||
const closeBudgetAndModal = (close: () => void) => { | ||
dispatch(closeBudget()); | ||
close(); | ||
}; | ||
|
||
return ( | ||
<Modal name="out-of-sync-migrations"> | ||
{({ state: { close } }) => ( | ||
<> | ||
<ModalHeader | ||
title={<ModalTitle title={t('Please update Actual!')} />} | ||
/> | ||
<View | ||
style={{ | ||
padding: 15, | ||
gap: 15, | ||
paddingTop: 0, | ||
paddingBottom: 25, | ||
maxWidth: 550, | ||
lineHeight: '1.5em', | ||
}} | ||
> | ||
<Text> | ||
<Paragraph style={{ fontSize: 16 }}> | ||
<Trans> | ||
It looks like you're using an outdated version of the | ||
Actual client. Your budget data has been updated by another | ||
client, but this client is still on the old verison. For the | ||
best experience, please update Actual to the latest version. | ||
</Trans> | ||
</Paragraph> | ||
</Text> | ||
|
||
<Paragraph | ||
style={{ | ||
fontSize: 16, | ||
}} | ||
> | ||
<Trans> | ||
If you can't update Actual at this time you can find the | ||
latest release at{' '} | ||
<Link variant="external" to="https://app.actualbudget.org"> | ||
app.actualbudget.org | ||
</Link> | ||
. You can use it until your client is updated. | ||
</Trans> | ||
</Paragraph> | ||
|
||
<View | ||
style={{ | ||
display: 'flex', | ||
gap: '1rem', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
flexDirection: 'row', | ||
}} | ||
> | ||
<Button | ||
variant="primary" | ||
style={{ | ||
padding: '10px 30px', | ||
}} | ||
onPress={() => closeBudgetAndModal(close)} | ||
> | ||
<Trans>Close Budget</Trans> | ||
</Button> | ||
</View> | ||
</View> | ||
</> | ||
)} | ||
</Modal> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
category: Enhancements | ||
authors: [MikesGlitch] | ||
--- | ||
|
||
Add a guidance modal for when migrations are out of sync |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't used anywhere, cleaning it up