Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3348266
D10080.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10080.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D10080: [web] introduce temp onClickDisconnectKeyserver
Attached
Detach File
Event Timeline
Log In to Comment