From 075f7d507b29c4ea6fbb8a8116a5c98e7ece2bc4 Mon Sep 17 00:00:00 2001 From: Yaros Date: Thu, 26 Mar 2026 19:20:11 +0100 Subject: [PATCH] refactor: use primary toast --- web/src/lib/utils/asset-utils.ts | 38 +++++++++++--------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/web/src/lib/utils/asset-utils.ts b/web/src/lib/utils/asset-utils.ts index 79b5c207fa..946fc66dec 100644 --- a/web/src/lib/utils/asset-utils.ts +++ b/web/src/lib/utils/asset-utils.ts @@ -435,21 +435,15 @@ export const toggleArchive = async (asset: AssetResponseDto) => { asset.isArchived = data.isArchived; if (asset.isArchived) { - toastManager.custom( + toastManager.primary( { - component: ToastAction, - props: { - title: $t('success'), - description: $t('added_to_archive'), - color: 'success', - button: { - color: 'secondary', - text: $t('undo'), - onClick: () => - undoArchiveAssets([asset.id], () => { - asset.isArchived = false; - }), - }, + description: $t('added_to_archive'), + button: { + label: $t('undo'), + onclick: () => + undoArchiveAssets([asset.id], () => { + asset.isArchived = false; + }), }, }, { timeout: 5000 }, @@ -498,18 +492,12 @@ export const archiveAssets = async ( } if (visibility === AssetVisibility.Archive) { - toastManager.custom( + toastManager.primary( { - component: ToastAction, - props: { - title: $t('success'), - description: $t('archived_count', { values: { count: ids.length } }), - color: 'success', - button: { - color: 'secondary', - text: $t('undo'), - onClick: () => undoArchiveAssets(ids, onUndoArchive), - }, + description: $t('archived_count', { values: { count: ids.length } }), + button: { + label: $t('undo'), + onclick: () => undoArchiveAssets(ids, onUndoArchive), }, }, { timeout: 5000 },