Page MenuHomePhabricator

D11029.id37210.diff
No OneTemporary

D11029.id37210.diff

diff --git a/web/modals/keyserver-selection/add-keyserver-modal.css b/web/modals/keyserver-selection/add-keyserver-modal.css
--- a/web/modals/keyserver-selection/add-keyserver-modal.css
+++ b/web/modals/keyserver-selection/add-keyserver-modal.css
@@ -1,5 +1,5 @@
.container {
- padding: 32px;
+ padding: 16px 0;
}
.inputTitle {
@@ -7,11 +7,6 @@
margin-bottom: 8px;
}
-.buttonContainer {
- background-color: var(--modal-background-secondary-default);
- padding: 16px 32px;
-}
-
.button {
width: 100%;
}
diff --git a/web/modals/keyserver-selection/add-keyserver-modal.react.js b/web/modals/keyserver-selection/add-keyserver-modal.react.js
--- a/web/modals/keyserver-selection/add-keyserver-modal.react.js
+++ b/web/modals/keyserver-selection/add-keyserver-modal.react.js
@@ -84,9 +84,29 @@
);
}, [showErrorMessage]);
+ const addKeyserverButton = React.useMemo(
+ () => (
+ <Button
+ variant="filled"
+ buttonColor={buttonThemes.primary}
+ className={css.button}
+ onClick={onClickAddKeyserver}
+ disabled={!keyserverURL}
+ >
+ Add keyserver
+ </Button>
+ ),
+ [keyserverURL, onClickAddKeyserver],
+ );
+
const addKeyserverModal = React.useMemo(
() => (
- <Modal size="large" onClose={popModal} name="Add keyserver">
+ <Modal
+ size="large"
+ onClose={popModal}
+ name="Add keyserver"
+ primaryButton={addKeyserverButton}
+ >
<div className={css.container}>
<div className={css.inputTitle}>Keyserver URL</div>
<Input
@@ -97,24 +117,13 @@
/>
{errorMessage}
</div>
- <div className={css.buttonContainer}>
- <Button
- variant="filled"
- buttonColor={buttonThemes.primary}
- className={css.button}
- onClick={onClickAddKeyserver}
- disabled={!keyserverURL}
- >
- Add keyserver
- </Button>
- </div>
</Modal>
),
[
+ addKeyserverButton,
errorMessage,
keyserverURL,
onChangeKeyserverURL,
- onClickAddKeyserver,
popModal,
],
);

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 9:47 PM (22 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2535925
Default Alt Text
D11029.id37210.diff (2 KB)

Event Timeline