feat: add navigation to forger password page, show password icon, toasts for different situations and changes of some styles
This commit is contained in:
@@ -49,7 +49,14 @@ export function ActiveDevicesPage() {
|
||||
ip: session.ipAddress,
|
||||
current: session.key === currentKey,
|
||||
}));
|
||||
setDevices(formattedDevices);
|
||||
|
||||
const sortedDevices = formattedDevices.sort((a, b) => {
|
||||
if (a.current && !b.current) return -1;
|
||||
if (!a.current && b.current) return 1;
|
||||
return 0;
|
||||
});
|
||||
|
||||
setDevices(sortedDevices);
|
||||
}
|
||||
}, [profileData, i18n.language, t]);
|
||||
|
||||
@@ -66,6 +73,7 @@ export function ActiveDevicesPage() {
|
||||
const { data } = await deleteSessions({ keys: [id] });
|
||||
if (data.success) {
|
||||
setDevices((prevDevices) => prevDevices.filter((d) => d.id !== id));
|
||||
showToast({ message: t('active.successDelete'), severity: 'success' });
|
||||
} else {
|
||||
showToast({
|
||||
message: data.message || t('active.deleteFailed'),
|
||||
@@ -73,7 +81,6 @@ export function ActiveDevicesPage() {
|
||||
});
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
// console.error('Delete error:', error);
|
||||
showToast({
|
||||
message: t('active.deleteFailed'),
|
||||
severity: 'error',
|
||||
|
||||
Reference in New Issue
Block a user