From 3080e8e9961e7490ba16670b0677e9fe56f3117d Mon Sep 17 00:00:00 2001 From: Egor Date: Sat, 31 Jan 2026 19:52:08 +0300 Subject: [PATCH 1/3] Update successNotification.ts --- src/store/successNotification.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/store/successNotification.ts b/src/store/successNotification.ts index eb04ab0..1d7961c 100644 --- a/src/store/successNotification.ts +++ b/src/store/successNotification.ts @@ -5,7 +5,8 @@ export type SuccessNotificationType = | 'balance_topup' | 'subscription_activated' | 'subscription_renewed' - | 'subscription_purchased'; + | 'subscription_purchased' + | 'devices_purchased'; export interface SuccessNotificationData { type: SuccessNotificationType; @@ -21,6 +22,10 @@ export interface SuccessNotificationData { title?: string; /** Custom message override */ message?: string; + /** Number of devices added */ + devicesAdded?: number; + /** New total device limit */ + newDeviceLimit?: number; } interface SuccessNotificationState { From abe016c7b105c04d55dc13db3fa420b933aefa3a Mon Sep 17 00:00:00 2001 From: Egor Date: Sat, 31 Jan 2026 19:53:23 +0300 Subject: [PATCH 2/3] Add files via upload --- src/components/SuccessNotificationModal.tsx | 51 ++++++++++++++++++++- src/components/WebSocketNotifications.tsx | 15 ++++++ 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/src/components/SuccessNotificationModal.tsx b/src/components/SuccessNotificationModal.tsx index 8bd9ced..8249139 100644 --- a/src/components/SuccessNotificationModal.tsx +++ b/src/components/SuccessNotificationModal.tsx @@ -48,6 +48,16 @@ const RocketIcon = () => ( ); +const DevicesIcon = () => ( + + + +); + const CloseIcon = () => ( @@ -114,6 +124,7 @@ export default function SuccessNotificationModal() { data.type === 'subscription_activated' || data.type === 'subscription_renewed' || data.type === 'subscription_purchased'; + const isDevicesPurchased = data.type === 'devices_purchased'; // Format amount const formattedAmount = data.amountKopeks @@ -158,6 +169,10 @@ export default function SuccessNotificationModal() { title = t('successNotification.subscriptionPurchased.title', 'Subscription purchased!'); icon = ; gradientClass = 'from-accent-500 to-purple-600'; + } else if (data.type === 'devices_purchased') { + title = t('successNotification.devicesPurchased.title', 'Devices added!'); + icon = ; + gradientClass = 'from-blue-500 to-cyan-600'; } } @@ -211,7 +226,31 @@ export default function SuccessNotificationModal() { ? t('successNotification.amount', 'Amount') : t('successNotification.price', 'Price')} - +{formattedAmount} + + {isDevicesPurchased ? '' : '+'} + {formattedAmount} + + + )} + + {/* Devices info (for devices purchase) */} + {isDevicesPurchased && data.devicesAdded && ( +
+ + {t('successNotification.devicesAdded', 'Devices added')} + + +{data.devicesAdded} +
+ )} + + {isDevicesPurchased && data.newDeviceLimit && ( +
+ + {t('successNotification.totalDevices', 'Total devices')} + + {data.newDeviceLimit}
)} @@ -265,6 +304,16 @@ export default function SuccessNotificationModal() { )} + {isDevicesPurchased && ( + + )} +