diff --git a/packages/desktop/views/login/components/ProfileCardActionsMenu.svelte b/packages/desktop/views/login/components/ProfileCardActionsMenu.svelte index 00c333150a..09628b7b54 100644 --- a/packages/desktop/views/login/components/ProfileCardActionsMenu.svelte +++ b/packages/desktop/views/login/components/ProfileCardActionsMenu.svelte @@ -1,8 +1,9 @@
diff --git a/packages/desktop/views/settings/views/profile/DeleteProfile.svelte b/packages/desktop/views/settings/views/profile/DeleteProfile.svelte index 3f14d34c8b..01d28892f3 100644 --- a/packages/desktop/views/settings/views/profile/DeleteProfile.svelte +++ b/packages/desktop/views/settings/views/profile/DeleteProfile.svelte @@ -4,6 +4,7 @@ import { localize } from '@core/i18n' import { PopupId, openPopup } from '@desktop/auxiliary/popup' import SettingsSection from '../SettingsSection.svelte' + import { getActiveProfileId } from '@core/profile/stores' function onDeleteClick(): void { openPopup({ @@ -13,7 +14,7 @@ title: localize('popups.deleteProfile.title'), alert: { variant: 'warning', text: localize('popups.deleteProfile.confirmation') }, confirmText: localize('actions.delete'), - onConfirm: deleteProfile, + onConfirm: () => deleteProfile(getActiveProfileId() as string), }, }) } diff --git a/packages/shared/src/lib/contexts/settings/actions/deleteProfile.ts b/packages/shared/src/lib/contexts/settings/actions/deleteProfile.ts index 1438d0fa64..ce6b1da019 100644 --- a/packages/shared/src/lib/contexts/settings/actions/deleteProfile.ts +++ b/packages/shared/src/lib/contexts/settings/actions/deleteProfile.ts @@ -1,7 +1,7 @@ import { AppContext } from '@core/app/enums' import { removeProfileFolder } from '@core/profile' import { logout, removeAllProfileData } from '@core/profile/actions' -import { activeProfileId, profiles } from '@core/profile/stores' +import { profiles } from '@core/profile/stores' import { routerManager } from '@core/router/stores' import { get } from 'svelte/store' @@ -10,13 +10,8 @@ import { get } from 'svelte/store' * the file system, and logs the user out * @returns A Promise that resolves to void. */ -export async function deleteProfile(): Promise