mirror of
https://github.com/netbirdio/dashboard.git
synced 2026-01-26 01:21:04 +00:00
Correct wording for popups
This commit is contained in:
@@ -98,9 +98,9 @@ export const Peers = () => {
|
||||
if (deletedPeer.loading) {
|
||||
message.loading({ content: 'Deleting...', key: deleteKey, style });
|
||||
} else if (deletedPeer.success) {
|
||||
message.success({ content: 'Peer deleted with success!', key: deleteKey, duration: 2, style });
|
||||
message.success({ content: 'Peer has been successfully removed.', key: deleteKey, duration: 2, style });
|
||||
} else if (deletedPeer.error) {
|
||||
message.error({ content: 'Error! Something wrong to delete peer.', key: deleteKey, duration: 2, style });
|
||||
message.error({ content: 'Failed to delete peer. You might not have enough permissions.', key: deleteKey, duration: 2, style });
|
||||
}
|
||||
}, [deletedPeer])
|
||||
|
||||
|
||||
@@ -95,10 +95,10 @@ export const SetupKeys = () => {
|
||||
if (deletedSetupKey.loading) {
|
||||
message.loading({ content: 'Deleting...', key: deleteKey, style: styleNotification });
|
||||
} else if (deletedSetupKey.success) {
|
||||
message.success({ content: 'SetupKey deleted with success!', key: deleteKey, duration: 2, style: styleNotification });
|
||||
message.success({ content: 'Setup key has been successfully removed.', key: deleteKey, duration: 2, style: styleNotification });
|
||||
dispatch(setupKeyActions.setDeleteSetupKey({ ...deletedSetupKey, success: false }));
|
||||
} else if (deletedSetupKey.error) {
|
||||
message.error({ content: 'Error! Something wrong to delete setupKey.', key: deleteKey, duration: 2, style: styleNotification });
|
||||
message.error({ content: 'Failed to delete setup key. You might not have enough permissions.', key: deleteKey, duration: 2, style: styleNotification });
|
||||
dispatch(setupKeyActions.setDeleteSetupKey({ ...deletedSetupKey, error: null }));
|
||||
}
|
||||
}, [deletedSetupKey])
|
||||
@@ -106,12 +106,12 @@ export const SetupKeys = () => {
|
||||
const revokeKey = 'creating';
|
||||
useEffect(() => {
|
||||
if (revokedSetupKey.loading) {
|
||||
message.loading({ content: 'Creating...', key: revokeKey, duration: 0, style: styleNotification });
|
||||
message.loading({ content: 'Revoking...', key: revokeKey, duration: 0, style: styleNotification });
|
||||
} else if (revokedSetupKey.success) {
|
||||
message.success({ content: 'Key was revoked with success!', key: revokeKey, duration: 2, style: styleNotification });
|
||||
message.success({ content: 'Setup key has been successfully revoked.', key: revokeKey, duration: 2, style: styleNotification });
|
||||
dispatch(setupKeyActions.setRevokeSetupKey({ ...revokedSetupKey, success: false }));
|
||||
} else if (revokedSetupKey.error) {
|
||||
message.error({ content: 'Error! Something wrong to revoke key.', key: revokeKey, duration: 2, style: styleNotification });
|
||||
message.error({ content: 'Failed to revoke setup key. You might not have enough permissions.', key: revokeKey, duration: 2, style: styleNotification });
|
||||
dispatch(setupKeyActions.setRevokeSetupKey({ ...revokedSetupKey, error: null }));
|
||||
}
|
||||
}, [revokedSetupKey])
|
||||
@@ -121,11 +121,11 @@ export const SetupKeys = () => {
|
||||
if (createdSetupKey.loading) {
|
||||
message.loading({ content: 'Creating...', key: createKey, duration: 0, style: styleNotification });
|
||||
} else if (createdSetupKey.success) {
|
||||
message.success({ content: 'Key created with success!', key: createKey, duration: 2, style: styleNotification });
|
||||
message.success({ content: 'Setup key has been successfully created.', key: createKey, duration: 2, style: styleNotification });
|
||||
dispatch(setupKeyActions.setSetupNewKeyVisible(false));
|
||||
dispatch(setupKeyActions.setCreateSetupKey({ ...createdSetupKey, success: false }));
|
||||
} else if (createdSetupKey.error) {
|
||||
message.error({ content: 'Error! Something wrong to create key.', key: createKey, duration: 2, style: styleNotification });
|
||||
message.error({ content: 'Failed to create setup key. You might not have enough permissions.', key: createKey, duration: 2, style: styleNotification });
|
||||
dispatch(setupKeyActions.setCreateSetupKey({ ...createdSetupKey, error: null }));
|
||||
}
|
||||
}, [createdSetupKey])
|
||||
|
||||
Reference in New Issue
Block a user