From 013f53b1a5199e03b663bb555889227b6fce76b1 Mon Sep 17 00:00:00 2001 From: Mike Clark Date: Mon, 7 Oct 2024 22:18:42 +0100 Subject: [PATCH 1/8] add a modal to say client is wrong version, accept the risks to continue using --- .../desktop-client/src/components/Modals.tsx | 5 ++ .../modals/OutOfSyncMigrationsModal.tsx | 51 +++++++++++++++++++ .../loot-core/src/client/actions/budgets.ts | 4 +- .../src/client/state-types/modals.d.ts | 2 + packages/loot-core/src/server/main.ts | 3 ++ 5 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx diff --git a/packages/desktop-client/src/components/Modals.tsx b/packages/desktop-client/src/components/Modals.tsx index 59af5cd24a2..50109572a90 100644 --- a/packages/desktop-client/src/components/Modals.tsx +++ b/packages/desktop-client/src/components/Modals.tsx @@ -51,6 +51,7 @@ import { ImportYNAB5Modal } from './modals/manager/ImportYNAB5Modal'; import { ManageRulesModal } from './modals/ManageRulesModal'; import { MergeUnusedPayeesModal } from './modals/MergeUnusedPayeesModal'; import { NotesModal } from './modals/NotesModal'; +import { OutOfSyncMigrationsModal } from './modals/OutOfSyncMigrationsModal'; import { PayeeAutocompleteModal } from './modals/PayeeAutocompleteModal'; import { ScheduledTransactionMenuModal } from './modals/ScheduledTransactionMenuModal'; import { SelectLinkedAccountsModal } from './modals/SelectLinkedAccountsModal'; @@ -600,6 +601,10 @@ export function Modals() { watchUpdates={false} /> ); + case 'out-of-sync-migrations': + return ( + + ); default: throw new Error('Unknown modal'); diff --git a/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx new file mode 100644 index 00000000000..1970b563848 --- /dev/null +++ b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx @@ -0,0 +1,51 @@ +import React from 'react'; + +import { Button } from '../common/Button2'; +import { + Modal, + ModalCloseButton, + ModalHeader, + ModalTitle, +} from '../common/Modal'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; + +type OutOfSyncMigrationsModalProps = { + budgetId: string; +}; + +export function OutOfSyncMigrationsModal({ + budgetId, +}: OutOfSyncMigrationsModalProps) { + return ( + + {({ state: { close } }) => ( + <> + } + rightContent={} + /> + + + You are using an old version of the client. Please update to the + latest. If you wish to continue using this client, please accept + that the app may not function correctly. + + + + + )} + + ); +} diff --git a/packages/loot-core/src/client/actions/budgets.ts b/packages/loot-core/src/client/actions/budgets.ts index 0fdcd5dafaa..91d5d57b196 100644 --- a/packages/loot-core/src/client/actions/budgets.ts +++ b/packages/loot-core/src/client/actions/budgets.ts @@ -57,7 +57,9 @@ export function loadBudget(id: string, options = {}) { if (error) { const message = getSyncError(error, id); - if (error === 'out-of-sync-migrations' || error === 'out-of-sync-data') { + if (error === 'out-of-sync-migrations') { + dispatch(pushModal('out-of-sync-migrations', { budgetId: id })); + } else if (error === 'out-of-sync-data') { // confirm is not available on iOS if (typeof window.confirm !== 'undefined') { const showBackups = window.confirm( diff --git a/packages/loot-core/src/client/state-types/modals.d.ts b/packages/loot-core/src/client/state-types/modals.d.ts index c7ccf14f232..e7856894af3 100644 --- a/packages/loot-core/src/client/state-types/modals.d.ts +++ b/packages/loot-core/src/client/state-types/modals.d.ts @@ -86,6 +86,8 @@ type FinanceModals = { 'import-actual': null; + 'out-of-sync-migrations': { budgetId: string }; + 'files-settings': null; 'confirm-change-document-dir': { diff --git a/packages/loot-core/src/server/main.ts b/packages/loot-core/src/server/main.ts index a2a547173af..3768412fcc6 100644 --- a/packages/loot-core/src/server/main.ts +++ b/packages/loot-core/src/server/main.ts @@ -1933,6 +1933,9 @@ async function loadBudget(id) { } try { + // check here if server and if server version is compatible + // if server version is different, then if the server had less migrations than we do, block it + // if server version is same or higher, then migrate await updateVersion(); } catch (e) { console.warn('Error updating', e); From a21cc2834b9d34b0367777ae27b599889a868457 Mon Sep 17 00:00:00 2001 From: Mike Clark Date: Tue, 8 Oct 2024 20:36:12 +0100 Subject: [PATCH 2/8] user friendly error --- .../desktop-client/src/components/Modals.tsx | 4 +- .../src/components/manager/BudgetList.tsx | 1 + .../modals/OutOfSyncMigrationsModal.tsx | 99 ++++++++++++++----- .../src/client/state-types/modals.d.ts | 2 +- 4 files changed, 75 insertions(+), 31 deletions(-) diff --git a/packages/desktop-client/src/components/Modals.tsx b/packages/desktop-client/src/components/Modals.tsx index 50109572a90..6ec07b6adaa 100644 --- a/packages/desktop-client/src/components/Modals.tsx +++ b/packages/desktop-client/src/components/Modals.tsx @@ -602,9 +602,7 @@ export function Modals() { /> ); case 'out-of-sync-migrations': - return ( - - ); + return ; default: throw new Error('Unknown modal'); diff --git a/packages/desktop-client/src/components/manager/BudgetList.tsx b/packages/desktop-client/src/components/manager/BudgetList.tsx index 1cd0f5e3c96..fa23e181bbd 100644 --- a/packages/desktop-client/src/components/manager/BudgetList.tsx +++ b/packages/desktop-client/src/components/manager/BudgetList.tsx @@ -416,6 +416,7 @@ export function BudgetList({ showHeader = true, quickSwitchMode = false }) { }; const refresh = () => { + dispatch(pushModal('out-of-sync-migrations')); dispatch(getUserData()); dispatch(loadAllFiles()); }; diff --git a/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx index 1970b563848..1a2d946ee5e 100644 --- a/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx +++ b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx @@ -1,48 +1,93 @@ import React from 'react'; +import { Trans } from 'react-i18next'; +import { useDispatch } from 'react-redux'; +import { closeBudget } from 'loot-core/src/client/actions'; + +import { theme } from '../../style'; import { Button } from '../common/Button2'; -import { - Modal, - ModalCloseButton, - ModalHeader, - ModalTitle, -} from '../common/Modal'; +import { Modal, ModalHeader, ModalTitle } from '../common/Modal'; +import { Paragraph } from '../common/Paragraph'; import { Text } from '../common/Text'; import { View } from '../common/View'; -type OutOfSyncMigrationsModalProps = { - budgetId: string; -}; +export function OutOfSyncMigrationsModal() { + const dispatch = useDispatch(); + const acceptAndContinue = (close: () => void) => { + // Logic here to allow the user to continue with the outdated version + close(); + }; + + const closeBudgetAndModal = (close: () => void) => { + dispatch(closeBudget()); + close(); + }; -export function OutOfSyncMigrationsModal({ - budgetId, -}: OutOfSyncMigrationsModalProps) { return ( {({ state: { close } }) => ( <> - } - rightContent={} - /> + } /> - + + It looks like you're using an outdated version of the + Actual. Your data has been updated, but your client hasn't. + To ensure the best experience, please update Actual to the + latest version. + + + + - You are using an old version of the client. Please update to the - latest. If you wish to continue using this client, please accept - that the app may not function correctly. - - + + If you choose to continue with this version, be aware + that some features may not work as expected. + + + + + + )} diff --git a/packages/loot-core/src/client/state-types/modals.d.ts b/packages/loot-core/src/client/state-types/modals.d.ts index e7856894af3..3cdbd3819f1 100644 --- a/packages/loot-core/src/client/state-types/modals.d.ts +++ b/packages/loot-core/src/client/state-types/modals.d.ts @@ -86,7 +86,7 @@ type FinanceModals = { 'import-actual': null; - 'out-of-sync-migrations': { budgetId: string }; + 'out-of-sync-migrations': null; 'files-settings': null; From f08d0ed6f860556184c966378b7fdafc120c2d1e Mon Sep 17 00:00:00 2001 From: Mike Clark Date: Tue, 8 Oct 2024 21:43:57 +0100 Subject: [PATCH 3/8] hooking parts up - untested --- .../modals/OutOfSyncMigrationsModal.tsx | 11 ++++++++-- .../loot-core/src/client/actions/budgets.ts | 7 +++++-- packages/loot-core/src/server/main.ts | 20 ++++++++++++++----- .../loot-core/src/types/server-handlers.d.ts | 5 ++++- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx index 1a2d946ee5e..35225dccfe2 100644 --- a/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx +++ b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Trans } from 'react-i18next'; import { useDispatch } from 'react-redux'; -import { closeBudget } from 'loot-core/src/client/actions'; +import { loadBudget, closeBudget } from 'loot-core/client/actions'; import { theme } from '../../style'; import { Button } from '../common/Button2'; @@ -11,10 +11,17 @@ import { Paragraph } from '../common/Paragraph'; import { Text } from '../common/Text'; import { View } from '../common/View'; -export function OutOfSyncMigrationsModal() { +type OutOfSyncMigrationsModalProps = { + budgetId: string; +}; + +export function OutOfSyncMigrationsModal({ + budgetId, +}: OutOfSyncMigrationsModalProps) { const dispatch = useDispatch(); const acceptAndContinue = (close: () => void) => { // Logic here to allow the user to continue with the outdated version + dispatch(loadBudget(budgetId, { allowOutOfSyncMigrations: true })); close(); }; diff --git a/packages/loot-core/src/client/actions/budgets.ts b/packages/loot-core/src/client/actions/budgets.ts index 91d5d57b196..863808bc1ae 100644 --- a/packages/loot-core/src/client/actions/budgets.ts +++ b/packages/loot-core/src/client/actions/budgets.ts @@ -48,7 +48,10 @@ export function loadAllFiles() { }; } -export function loadBudget(id: string, options = {}) { +export function loadBudget( + id: string, + options: { allowOutOfSyncMigrations?: boolean } = {}, +) { return async (dispatch: Dispatch) => { dispatch(setAppState({ loadingText: t('Loading...') })); @@ -58,7 +61,7 @@ export function loadBudget(id: string, options = {}) { if (error) { const message = getSyncError(error, id); if (error === 'out-of-sync-migrations') { - dispatch(pushModal('out-of-sync-migrations', { budgetId: id })); + dispatch(pushModal('out-of-sync-migrations')); } else if (error === 'out-of-sync-data') { // confirm is not available on iOS if (typeof window.confirm !== 'undefined') { diff --git a/packages/loot-core/src/server/main.ts b/packages/loot-core/src/server/main.ts index 3768412fcc6..9684a2c3f59 100644 --- a/packages/loot-core/src/server/main.ts +++ b/packages/loot-core/src/server/main.ts @@ -1731,7 +1731,10 @@ handlers['sync-budget'] = async function () { return result; }; -handlers['load-budget'] = async function ({ id }) { +handlers['load-budget'] = async function ({ + id, + allowOutOfSyncMigrations = false, +}) { const currentPrefs = prefs.getPrefs(); if (currentPrefs) { @@ -1744,7 +1747,7 @@ handlers['load-budget'] = async function ({ id }) { } } - const res = await loadBudget(id); + const res = await loadBudget(id, allowOutOfSyncMigrations); return res; }; @@ -1897,7 +1900,10 @@ handlers['export-budget'] = async function () { } }; -async function loadBudget(id) { +async function loadBudget( + id: string, + allowOutOfSyncMigrations: boolean = false, +) { let dir; try { dir = fs.getBudgetDir(id); @@ -1951,8 +1957,12 @@ async function loadBudget(id) { result = { error: 'loading-budget' }; } - await handlers['close-budget'](); - return result; + if (result.error === 'out-of-sync-migrations' && allowOutOfSyncMigrations) { + console.info('Allowing out of sync migrations'); + } else { + await handlers['close-budget'](); + return result; + } } await db.loadClock(); diff --git a/packages/loot-core/src/types/server-handlers.d.ts b/packages/loot-core/src/types/server-handlers.d.ts index 3536dada439..59133b68c1e 100644 --- a/packages/loot-core/src/types/server-handlers.d.ts +++ b/packages/loot-core/src/types/server-handlers.d.ts @@ -305,7 +305,10 @@ export interface ServerHandlers { error?: { message: string; reason: string; meta: unknown }; }>; - 'load-budget': (arg: { id: string }) => Promise<{ error }>; + 'load-budget': (arg: { + id: string; + allowOutOfSyncMigrations?: boolean; + }) => Promise<{ error }>; 'create-demo-budget': () => Promise; From cd260bd990010c187b03af8e90564f0164574b4f Mon Sep 17 00:00:00 2001 From: Mike Clark Date: Wed, 9 Oct 2024 21:33:25 +0100 Subject: [PATCH 4/8] changed approach --- .../src/components/manager/BudgetList.tsx | 1 - .../modals/OutOfSyncMigrationsModal.tsx | 39 +++++-------------- .../loot-core/src/client/actions/budgets.ts | 8 ++-- .../src/client/state-types/modals.d.ts | 1 + packages/loot-core/src/server/main.ts | 21 +++------- .../loot-core/src/types/server-handlers.d.ts | 5 +-- 6 files changed, 21 insertions(+), 54 deletions(-) diff --git a/packages/desktop-client/src/components/manager/BudgetList.tsx b/packages/desktop-client/src/components/manager/BudgetList.tsx index fa23e181bbd..1cd0f5e3c96 100644 --- a/packages/desktop-client/src/components/manager/BudgetList.tsx +++ b/packages/desktop-client/src/components/manager/BudgetList.tsx @@ -416,7 +416,6 @@ export function BudgetList({ showHeader = true, quickSwitchMode = false }) { }; const refresh = () => { - dispatch(pushModal('out-of-sync-migrations')); dispatch(getUserData()); dispatch(loadAllFiles()); }; diff --git a/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx index 35225dccfe2..11bd60f021f 100644 --- a/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx +++ b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx @@ -2,28 +2,17 @@ import React from 'react'; import { Trans } from 'react-i18next'; import { useDispatch } from 'react-redux'; -import { loadBudget, closeBudget } from 'loot-core/client/actions'; +import { closeBudget } from 'loot-core/client/actions'; -import { theme } from '../../style'; 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'; -type OutOfSyncMigrationsModalProps = { - budgetId: string; -}; - -export function OutOfSyncMigrationsModal({ - budgetId, -}: OutOfSyncMigrationsModalProps) { +export function OutOfSyncMigrationsModal() { const dispatch = useDispatch(); - const acceptAndContinue = (close: () => void) => { - // Logic here to allow the user to continue with the outdated version - dispatch(loadBudget(budgetId, { allowOutOfSyncMigrations: true })); - close(); - }; const closeBudgetAndModal = (close: () => void) => { dispatch(closeBudget()); @@ -57,14 +46,17 @@ export function OutOfSyncMigrationsModal({ - If you choose to continue with this version, be aware - that some features may not work as expected. + If you can't update Actual at this time but need to use it + you can find the latest release at{' '} + + app.actualbudget.org + + - diff --git a/packages/loot-core/src/client/actions/budgets.ts b/packages/loot-core/src/client/actions/budgets.ts index 863808bc1ae..5dd27e8e8bd 100644 --- a/packages/loot-core/src/client/actions/budgets.ts +++ b/packages/loot-core/src/client/actions/budgets.ts @@ -48,15 +48,13 @@ export function loadAllFiles() { }; } -export function loadBudget( - id: string, - options: { allowOutOfSyncMigrations?: boolean } = {}, -) { +export function loadBudget(id: string, options = {}) { return async (dispatch: Dispatch) => { dispatch(setAppState({ loadingText: t('Loading...') })); // Loading a budget may fail - const { error } = await send('load-budget', { id, ...options }); + let { error } = await send('load-budget', { id, ...options }); + error = 'out-of-sync-migrations'; if (error) { const message = getSyncError(error, id); diff --git a/packages/loot-core/src/client/state-types/modals.d.ts b/packages/loot-core/src/client/state-types/modals.d.ts index 3cdbd3819f1..8b4478c2eb3 100644 --- a/packages/loot-core/src/client/state-types/modals.d.ts +++ b/packages/loot-core/src/client/state-types/modals.d.ts @@ -50,6 +50,7 @@ type FinanceModals = { ); 'load-backup': EmptyObject; + 'manager-load-backup': { budgetId: string }; 'manage-rules': { payeeId?: string }; 'edit-rule': { diff --git a/packages/loot-core/src/server/main.ts b/packages/loot-core/src/server/main.ts index 9684a2c3f59..4b9d2eede61 100644 --- a/packages/loot-core/src/server/main.ts +++ b/packages/loot-core/src/server/main.ts @@ -1731,10 +1731,7 @@ handlers['sync-budget'] = async function () { return result; }; -handlers['load-budget'] = async function ({ - id, - allowOutOfSyncMigrations = false, -}) { +handlers['load-budget'] = async function ({ id }) { const currentPrefs = prefs.getPrefs(); if (currentPrefs) { @@ -1747,7 +1744,7 @@ handlers['load-budget'] = async function ({ } } - const res = await loadBudget(id, allowOutOfSyncMigrations); + const res = await loadBudget(id); return res; }; @@ -1900,10 +1897,7 @@ handlers['export-budget'] = async function () { } }; -async function loadBudget( - id: string, - allowOutOfSyncMigrations: boolean = false, -) { +async function loadBudget(id: string) { let dir; try { dir = fs.getBudgetDir(id); @@ -1942,6 +1936,7 @@ async function loadBudget( // check here if server and if server version is compatible // if server version is different, then if the server had less migrations than we do, block it // if server version is same or higher, then migrate + console.info('loading migrations from server file'); await updateVersion(); } catch (e) { console.warn('Error updating', e); @@ -1957,12 +1952,8 @@ async function loadBudget( result = { error: 'loading-budget' }; } - if (result.error === 'out-of-sync-migrations' && allowOutOfSyncMigrations) { - console.info('Allowing out of sync migrations'); - } else { - await handlers['close-budget'](); - return result; - } + await handlers['close-budget'](); + return result; } await db.loadClock(); diff --git a/packages/loot-core/src/types/server-handlers.d.ts b/packages/loot-core/src/types/server-handlers.d.ts index 59133b68c1e..3536dada439 100644 --- a/packages/loot-core/src/types/server-handlers.d.ts +++ b/packages/loot-core/src/types/server-handlers.d.ts @@ -305,10 +305,7 @@ export interface ServerHandlers { error?: { message: string; reason: string; meta: unknown }; }>; - 'load-budget': (arg: { - id: string; - allowOutOfSyncMigrations?: boolean; - }) => Promise<{ error }>; + 'load-budget': (arg: { id: string }) => Promise<{ error }>; 'create-demo-budget': () => Promise; From d8f42081ca5ee25d94677a1b9fb72beefd9febe3 Mon Sep 17 00:00:00 2001 From: Mike Clark Date: Wed, 9 Oct 2024 22:14:22 +0100 Subject: [PATCH 5/8] release notes --- .../components/modals/OutOfSyncMigrationsModal.tsx | 11 ++++++----- packages/loot-core/src/client/actions/budgets.ts | 3 +-- upcoming-release-notes/3600.md | 6 ++++++ 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 upcoming-release-notes/3600.md diff --git a/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx index 11bd60f021f..9e2c8c313fe 100644 --- a/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx +++ b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx @@ -37,9 +37,9 @@ export function OutOfSyncMigrationsModal() { It looks like you're using an outdated version of the - Actual. Your data has been updated, but your client hasn't. - To ensure the best experience, please update Actual to the - latest version. + Actual. 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. @@ -49,11 +49,12 @@ export function OutOfSyncMigrationsModal() { }} > - If you can't update Actual at this time but need to use it - you can find the latest release at{' '} + If you can't update Actual at this time you can find the + latest release at{' '} app.actualbudget.org + . You can use it until your client is updated. diff --git a/packages/loot-core/src/client/actions/budgets.ts b/packages/loot-core/src/client/actions/budgets.ts index 5dd27e8e8bd..96dc92434a2 100644 --- a/packages/loot-core/src/client/actions/budgets.ts +++ b/packages/loot-core/src/client/actions/budgets.ts @@ -53,8 +53,7 @@ export function loadBudget(id: string, options = {}) { dispatch(setAppState({ loadingText: t('Loading...') })); // Loading a budget may fail - let { error } = await send('load-budget', { id, ...options }); - error = 'out-of-sync-migrations'; + const { error } = await send('load-budget', { id, ...options }); if (error) { const message = getSyncError(error, id); diff --git a/upcoming-release-notes/3600.md b/upcoming-release-notes/3600.md new file mode 100644 index 00000000000..b3f531afb36 --- /dev/null +++ b/upcoming-release-notes/3600.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [MikesGlitch] +--- + +Add a guidance modal for when migrations are out of sync From e0ba62ba7a8fbf9bf68670c874beabe79bcf16a9 Mon Sep 17 00:00:00 2001 From: Mike Clark Date: Wed, 9 Oct 2024 22:26:01 +0100 Subject: [PATCH 6/8] removing old comments --- packages/loot-core/src/server/main.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/loot-core/src/server/main.ts b/packages/loot-core/src/server/main.ts index 4b9d2eede61..a2a547173af 100644 --- a/packages/loot-core/src/server/main.ts +++ b/packages/loot-core/src/server/main.ts @@ -1897,7 +1897,7 @@ handlers['export-budget'] = async function () { } }; -async function loadBudget(id: string) { +async function loadBudget(id) { let dir; try { dir = fs.getBudgetDir(id); @@ -1933,10 +1933,6 @@ async function loadBudget(id: string) { } try { - // check here if server and if server version is compatible - // if server version is different, then if the server had less migrations than we do, block it - // if server version is same or higher, then migrate - console.info('loading migrations from server file'); await updateVersion(); } catch (e) { console.warn('Error updating', e); From dc2881de4c53eea1ecc7c736a2b485bda6c2f5f9 Mon Sep 17 00:00:00 2001 From: Mike Clark Date: Wed, 9 Oct 2024 22:27:04 +0100 Subject: [PATCH 7/8] cleanup old code --- packages/desktop-client/src/components/Modals.tsx | 9 --------- packages/loot-core/src/client/state-types/modals.d.ts | 1 - 2 files changed, 10 deletions(-) diff --git a/packages/desktop-client/src/components/Modals.tsx b/packages/desktop-client/src/components/Modals.tsx index 6ec07b6adaa..f5e3dec9408 100644 --- a/packages/desktop-client/src/components/Modals.tsx +++ b/packages/desktop-client/src/components/Modals.tsx @@ -592,15 +592,6 @@ export function Modals() { return ; case 'import-actual': return ; - case 'manager-load-backup': - return ( - - ); case 'out-of-sync-migrations': return ; diff --git a/packages/loot-core/src/client/state-types/modals.d.ts b/packages/loot-core/src/client/state-types/modals.d.ts index 8b4478c2eb3..3cdbd3819f1 100644 --- a/packages/loot-core/src/client/state-types/modals.d.ts +++ b/packages/loot-core/src/client/state-types/modals.d.ts @@ -50,7 +50,6 @@ type FinanceModals = { ); 'load-backup': EmptyObject; - 'manager-load-backup': { budgetId: string }; 'manage-rules': { payeeId?: string }; 'edit-rule': { From a478899165863586581b21c2d483290f824ab90c Mon Sep 17 00:00:00 2001 From: Mike Clark Date: Thu, 10 Oct 2024 19:27:21 +0100 Subject: [PATCH 8/8] feedback --- .../modals/OutOfSyncMigrationsModal.tsx | 18 ++++++++++++------ upcoming-release-notes/3600.md | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx index 9e2c8c313fe..60bd9fc054c 100644 --- a/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx +++ b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Trans } from 'react-i18next'; +import { Trans, useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; import { closeBudget } from 'loot-core/client/actions'; @@ -14,6 +14,8 @@ import { View } from '../common/View'; export function OutOfSyncMigrationsModal() { const dispatch = useDispatch(); + const { t } = useTranslation(); + const closeBudgetAndModal = (close: () => void) => { dispatch(closeBudget()); close(); @@ -23,7 +25,9 @@ export function OutOfSyncMigrationsModal() { {({ state: { close } }) => ( <> - } /> + } + /> - It looks like you're using an outdated version of the - Actual. 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. + + 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. + diff --git a/upcoming-release-notes/3600.md b/upcoming-release-notes/3600.md index b3f531afb36..70cf5dbf62d 100644 --- a/upcoming-release-notes/3600.md +++ b/upcoming-release-notes/3600.md @@ -1,5 +1,5 @@ --- -category: Maintenance +category: Enhancements authors: [MikesGlitch] ---