diff --git a/packages/web/src/index.css b/packages/web/src/index.css
index d420fc1f7..18ce2e20b 100644
--- a/packages/web/src/index.css
+++ b/packages/web/src/index.css
@@ -26,3 +26,27 @@ code {
.icon-invisible {
visibility: hidden;
}
+
+.largeFormMarker input[type='text'] {
+ width: 100%;
+ padding: 10px 10px;
+ font-size: 14px;
+ box-sizing: border-box;
+ border-radius: 4px;
+}
+
+.largeFormMarker input[type='password'] {
+ width: 100%;
+ padding: 10px 10px;
+ font-size: 14px;
+ box-sizing: border-box;
+ border-radius: 4px;
+}
+
+.largeFormMarker select {
+ width: 100%;
+ padding: 10px 10px;
+ font-size: 14px;
+ box-sizing: border-box;
+ border-radius: 4px;
+}
diff --git a/packages/web/src/modals/ConnectionModal.js b/packages/web/src/modals/ConnectionModal.js
index 4c03ceb7c..76e7bae5d 100644
--- a/packages/web/src/modals/ConnectionModal.js
+++ b/packages/web/src/modals/ConnectionModal.js
@@ -21,8 +21,29 @@ import { TabControl, TabPage } from '../widgets/TabControl';
import { usePlatformInfo } from '../utility/metadataLoaders';
import getElectron from '../utility/getElectron';
import { FormFieldTemplateLarge } from '../utility/formStyle';
+import styled from 'styled-components';
// import FormikForm from '../utility/FormikForm';
+const FlexContainer = styled.div`
+ display: flex;
+`;
+
+const TestResultContainer = styled.div`
+ margin-left: 10px;
+ align-self: center;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+`;
+
+const ButtonsContainer = styled.div`
+ flex-shrink: 0;
+`;
+
+const AgentInfoWrap = styled.div`
+ margin-left: 20px;
+`;
+
function DriverFields({ extensions }) {
const { values, setFieldValue } = useForm();
const { authType, engine } = values;
@@ -103,17 +124,6 @@ function SshTunnelFields() {
{sshMode == 'userPassword' && }
- {useSshTunnel &&
- sshMode == 'agent' &&
- (platformInfo.sshAuthSock ? (
-
- SSH Agent found
-
- ) : (
-
- SSH Agent not found
-
- ))}
{sshMode == 'keyFile' && (
@@ -122,6 +132,20 @@ function SshTunnelFields() {
{sshMode == 'keyFile' && (
)}
+
+ {useSshTunnel && sshMode == 'agent' && (
+
+ {platformInfo.sshAuthSock ? (
+
+ SSH Agent found
+
+ ) : (
+
+ SSH Agent not found
+
+ )}
+
+ )}
>
);
}
@@ -175,6 +199,26 @@ export default function ConnectionModal({ modalState, connection = undefined })
+
+
+
+
+
+
+
+
+
+
+ {isTesting ? (
+
+ ) : (
+
+ )}
+
+
+
+
+
{!isTesting && sqlConnectResult && sqlConnectResult.msgtype == 'connected' && (
Connected: {sqlConnectResult.version}
@@ -185,22 +229,13 @@ export default function ConnectionModal({ modalState, connection = undefined })
Connect failed: {sqlConnectResult.error}
)}
- {isTesting && }
-
-
-
-
-
-
-
-
- {isTesting ? (
-
- ) : (
-
- )}
-
-
+ {isTesting && (
+
+ Testing connection
+
+ )}
+
+
diff --git a/packages/web/src/themes/ThemeHelmet.js b/packages/web/src/themes/ThemeHelmet.js
index 78704c6c9..4ebe05b99 100644
--- a/packages/web/src/themes/ThemeHelmet.js
+++ b/packages/web/src/themes/ThemeHelmet.js
@@ -50,6 +50,10 @@ export default function ThemeHelmet() {
border: 1px solid ${theme.border};
}
+ select[disabled] {
+ background-color: ${theme.input_background2};
+ }
+
textarea {
background-color: ${theme.input_background};
color: ${theme.input_font1};
diff --git a/packages/web/src/utility/formStyle.js b/packages/web/src/utility/formStyle.js
index ea4143584..ff4369e50 100644
--- a/packages/web/src/utility/formStyle.js
+++ b/packages/web/src/utility/formStyle.js
@@ -14,10 +14,10 @@ export const FormLabel = styled.div`
export const FormValue = styled.div``;
-export function FormFieldTemplateDefault({ label, children, type }) {
+export function FormFieldTemplateDefault({ label, children, onLabelClick, type }) {
return (
- {label}
+ {label}
{children}
);
@@ -36,49 +36,51 @@ export const FormValueTiny = styled.div`
margin-top: 3px;
`;
-export function FormFieldTemplateTiny({ label, children, type }) {
+export function FormFieldTemplateTiny({ label, children, onLabelClick, type }) {
const theme = useTheme();
if (type == 'checkbox') {
return (
- {children} {label}
+ {children} {label}
);
}
return (
- {label}
+
+ {label}
+
{children}
);
}
export const FormRowLarge = styled.div`
- margin: 5px;
+ margin: 20px;
`;
export const FormLabelLarge = styled.div`
+ margin-bottom: 3px;
color: ${props => props.theme.manager_font3};
`;
-export const FormValueLarge = styled.div`
- margin-left: 15px;
- margin-top: 3px;
-`;
+export const FormValueLarge = styled.div``;
-export function FormFieldTemplateLarge({ label, children, type }) {
+export function FormFieldTemplateLarge({ label, onLabelClick, children, type }) {
const theme = useTheme();
if (type == 'checkbox') {
return (
-
- {children} {label}
-
+
+ {children} {label}
+
);
}
return (
-
- {label}
- {children}
-
+
+
+ {label}
+
+ {children}
+
);
}
diff --git a/packages/web/src/utility/forms.js b/packages/web/src/utility/forms.js
index 0d6ef3c46..2ec24e24e 100644
--- a/packages/web/src/utility/forms.js
+++ b/packages/web/src/utility/forms.js
@@ -65,7 +65,7 @@ export function FormPasswordFieldRaw({ name, focused = false, ...other }) {
const isCrypted = value && value.startsWith('crypt:');
return (
- <>
+
-
- {!isCrypted && setShowPassword(x => !x)} />}
- >
+ {!isCrypted && (
+ setShowPassword(x => !x)}>
+
+
+ )}
+
);
}
@@ -110,9 +113,10 @@ export function FormCheckboxFieldRaw({ name = undefined, defaultValue = undefine
}
export function FormCheckboxField({ label, ...other }) {
+ const { values, setFieldValue } = useForm();
const FieldTemplate = useFormFieldTemplate();
return (
-
+ setFieldValue(other.name, !values[other.name])}>
);
@@ -329,7 +333,7 @@ export function FormArchiveFolderSelect({ name, additionalFolders = [], ...other
);
}
-export function FormElectronFileSelectorRaw({ name }) {
+export function FormElectronFileSelectorRaw({ name, ...other }) {
const { values, setFieldValue } = useForm();
const handleBrowse = () => {
const electron = getElectron();
@@ -343,7 +347,7 @@ export function FormElectronFileSelectorRaw({ name }) {
};
return (
-
+
Browse
);