Page MenuHomePhabricator

D10080.diff
No OneTemporary

D10080.diff

diff --git a/web/modals/keyserver-selection/keyserver-selection-modal.react.js b/web/modals/keyserver-selection/keyserver-selection-modal.react.js
--- a/web/modals/keyserver-selection/keyserver-selection-modal.react.js
+++ b/web/modals/keyserver-selection/keyserver-selection-modal.react.js
@@ -10,6 +10,7 @@
import Button, { buttonThemes } from '../../components/button.react.js';
import KeyserverPill from '../../components/keyserver-pill.react.js';
import StatusIndicator from '../../components/status-indicator.react.js';
+import Alert from '../alert.react.js';
import Modal from '../modal.react.js';
type Props = {
@@ -20,7 +21,20 @@
function KeyserverSelectionModal(props: Props): React.Node {
const { keyserverAdminUserInfo, keyserverInfo } = props;
- const { popModal } = useModalContext();
+ const { popModal, pushModal } = useModalContext();
+
+ const onClickDisconnectKeyserver = React.useCallback(
+ () =>
+ // TODO: update this function when we have a way to
+ // disconnect from a keyserver
+ pushModal(
+ <Alert title="Feature not ready">
+ Disconnecting from a keyserver is still not ready. Please come back
+ later.
+ </Alert>,
+ ),
+ [pushModal],
+ );
const { keyerverRemoveInfoText, keyserverRemoveButton } =
React.useMemo(() => {
@@ -72,6 +86,7 @@
variant="filled"
buttonColor={buttonThemes.danger}
className={css.button}
+ onClick={onClickDisconnectKeyserver}
>
Disconnect keyserver
</Button>
@@ -81,7 +96,7 @@
keyerverRemoveInfoText: removeInfoText,
keyserverRemoveButton: removeButton,
};
- }, [keyserverInfo.connection.status]);
+ }, [keyserverInfo.connection.status, onClickDisconnectKeyserver]);
return (
<Modal size="large" onClose={popModal} name="Keyserver details">

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 2:16 PM (19 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2571119
Default Alt Text
D10080.diff (1 KB)

Event Timeline