Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3370509
D10093.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
D10093.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
@@ -2,6 +2,7 @@
import * as React from 'react';
+import { setCustomServerActionType } from 'lib/actions/custom-server-actions.js';
import { removeKeyserverActionType } from 'lib/actions/keyserver-actions.js';
import { useModalContext } from 'lib/components/modal-provider.react.js';
import type { KeyserverInfo } from 'lib/types/keyserver-types.js';
@@ -12,6 +13,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 { useStaffCanSee } from '../../utils/staff-utils.js';
import Alert from '../alert.react.js';
import ConfirmationAlert from '../confirmation-alert.react.js';
import Modal from '../modal.react.js';
@@ -39,6 +41,8 @@
[pushModal],
);
+ const staffCanSee = useStaffCanSee();
+
const dispatch = useDispatch();
const onDeleteKeyserver = React.useCallback(() => {
@@ -49,8 +53,21 @@
},
});
+ if (staffCanSee) {
+ dispatch({
+ type: setCustomServerActionType,
+ payload: keyserverInfo.urlPrefix,
+ });
+ }
+
clearModals();
- }, [clearModals, dispatch, keyserverAdminUserInfo.id]);
+ }, [
+ clearModals,
+ dispatch,
+ keyserverAdminUserInfo.id,
+ keyserverInfo.urlPrefix,
+ staffCanSee,
+ ]);
const onClickRemoveKeyserver = React.useCallback(
() =>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 3:04 AM (14 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2587468
Default Alt Text
D10093.diff (1 KB)
Attached To
Mode
D10093: [web] save the recently deleted server url to customServer redux state
Attached
Detach File
Event Timeline
Log In to Comment