diff --git a/packages/desktop/views/login/components/ProfileCardActionsMenu.svelte b/packages/desktop/views/login/components/ProfileCardActionsMenu.svelte index 0ff50687eb..09628b7b54 100644 --- a/packages/desktop/views/login/components/ProfileCardActionsMenu.svelte +++ b/packages/desktop/views/login/components/ProfileCardActionsMenu.svelte @@ -3,7 +3,7 @@ import { deleteProfile } from '@contexts/settings/actions' import { localize } from '@core/i18n' import { IPersistedProfile } from '@core/profile' - import { PopupId, openPopup } from '@desktop/auxiliary/popup' + import { PopupId, closePopup, openPopup } from '@desktop/auxiliary/popup' export let profile: IPersistedProfile @@ -26,10 +26,13 @@ id: PopupId.Confirmation, props: { variant: 'danger', - title: localize('popups.deleteProfile.title'), + title: localize('popups.deleteProfile.title', { name: profile.name }), alert: { variant: 'warning', text: localize('popups.deleteProfile.confirmation') }, confirmText: localize('actions.delete'), - onConfirm: () => deleteProfile(profile.id), + onConfirm: () => { + deleteProfile(profile.id) + closePopup() + }, }, }, false, @@ -48,7 +51,7 @@ { variant: 'danger', icon: IconName.Trash, - title: localize('popups.deleteProfile.title'), + title: localize('views.settings.deleteProfile.title'), onClick: onDeleteClick, }, ]} diff --git a/packages/shared/src/lib/contexts/settings/actions/deleteProfile.ts b/packages/shared/src/lib/contexts/settings/actions/deleteProfile.ts index ff7351c02f..ce6b1da019 100644 --- a/packages/shared/src/lib/contexts/settings/actions/deleteProfile.ts +++ b/packages/shared/src/lib/contexts/settings/actions/deleteProfile.ts @@ -4,7 +4,6 @@ import { logout, removeAllProfileData } from '@core/profile/actions' import { profiles } from '@core/profile/stores' import { routerManager } from '@core/router/stores' import { get } from 'svelte/store' -import { closePopup } from '../../../../../../desktop/lib/auxiliary/popup' /** * It removes the active profile from the app's list of profiles, removes the profile's directory from @@ -31,7 +30,6 @@ export async function deleteProfile(profileId: string): Promise { */ await removeProfileFolder(profileId) - closePopup() /** * NOTE: If there are no more profiles, then the user should be * routed to the welcome screen. diff --git a/packages/shared/src/locales/en.json b/packages/shared/src/locales/en.json index 06f68cb2d3..e32e2ade0e 100644 --- a/packages/shared/src/locales/en.json +++ b/packages/shared/src/locales/en.json @@ -991,7 +991,7 @@ "empty": "The error log is empty." }, "deleteProfile": { - "title": "Delete profile", + "title": "Delete {name} profile", "confirmation": "Are you sure you want to delete this profile? This operation cannot be undone.", "typePassword": "Type your password to confirm." },