mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
Merge remote-tracking branch 'origin/devel' into devel
This commit is contained in:
@@ -46,7 +46,7 @@ export const TabList: React.FC<Props> = observer(function TabList({
|
||||
component={tabInfo.tab?.()}
|
||||
{...state.props}
|
||||
style={style}
|
||||
disabled={tabInfo.isDisabled?.(tabInfo.key, state.props)}
|
||||
disabled={props.disabled || tabInfo.isDisabled?.(tabInfo.key, state.props)}
|
||||
onOpen={tabInfo.onOpen}
|
||||
onClose={tabInfo.onClose}
|
||||
/>
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ const styles = composes(
|
||||
padding: 24px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 630px;
|
||||
height: 640px;
|
||||
}
|
||||
`
|
||||
);
|
||||
|
||||
+1
@@ -55,6 +55,7 @@ const styles = composes(
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 16px;
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import styled, { css } from 'reshadow';
|
||||
|
||||
import {
|
||||
TabsState, TabList,
|
||||
Button, BORDER_TAB_STYLES, TabPanelList, Placeholder, useObjectRef
|
||||
Button, UNDERLINE_TAB_STYLES, TabPanelList, Placeholder, useObjectRef
|
||||
} from '@cloudbeaver/core-blocks';
|
||||
import { useService } from '@cloudbeaver/core-di';
|
||||
import { useTranslate } from '@cloudbeaver/core-localization';
|
||||
@@ -24,12 +24,8 @@ import { useConnectionFormState } from './useConnectionFormState';
|
||||
|
||||
const styles = composes(
|
||||
css`
|
||||
Tab {
|
||||
composes: theme-ripple theme-background-secondary theme-text-on-secondary from global;
|
||||
}
|
||||
|
||||
TabList {
|
||||
composes: theme-background-surface theme-text-on-surface from global;
|
||||
composes: theme-border-color-background theme-background-secondary theme-text-on-secondary from global;
|
||||
}
|
||||
|
||||
box {
|
||||
@@ -42,7 +38,23 @@ const styles = composes(
|
||||
`,
|
||||
css`
|
||||
TabList {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
border-bottom: solid 2px;
|
||||
border-color: inherit;
|
||||
}
|
||||
}
|
||||
Tab {
|
||||
height: 46px!important;
|
||||
text-transform: uppercase;
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
box {
|
||||
display: flex;
|
||||
@@ -74,6 +86,7 @@ interface Props {
|
||||
options: IConnectionFormOptions;
|
||||
onCancel?: () => void;
|
||||
onSave?: (config: ConnectionConfig) => void;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export const ConnectionForm = observer(function ConnectionForm({
|
||||
@@ -81,9 +94,10 @@ export const ConnectionForm = observer(function ConnectionForm({
|
||||
options,
|
||||
onCancel = () => {},
|
||||
onSave = () => {},
|
||||
className,
|
||||
}: Props) {
|
||||
const props = useObjectRef({ onSave });
|
||||
const style = [styles, BORDER_TAB_STYLES];
|
||||
const style = [styles, UNDERLINE_TAB_STYLES];
|
||||
const translate = useTranslate();
|
||||
const service = useService(ConnectionFormService);
|
||||
const formState = useConnectionFormState(data, options);
|
||||
@@ -108,8 +122,8 @@ export const ConnectionForm = observer(function ConnectionForm({
|
||||
form={formState}
|
||||
options={options}
|
||||
>
|
||||
<box as='div'>
|
||||
<TabList style={style}>
|
||||
<box as='div' className={className}>
|
||||
<TabList style={style} disabled={formState.form.disabled}>
|
||||
<fill as="div" />
|
||||
<Placeholder container={service.actionsContainer} data={data} form={formState.form} options={options} />
|
||||
<Button
|
||||
|
||||
+5
-2
@@ -12,7 +12,7 @@ import styled from 'reshadow';
|
||||
import { css } from 'reshadow';
|
||||
|
||||
import { Loader, useMapResource } from '@cloudbeaver/core-blocks';
|
||||
import { ConnectionInfoResource, ConnectionForm, useConnectionFormData, IConnectionFormDataOptions, IConnectionFormOptions, IConnectionFormSubmitData } from '@cloudbeaver/core-connections';
|
||||
import { ConnectionInfoResource, ConnectionForm, useConnectionFormData, IConnectionFormDataOptions, IConnectionFormOptions } from '@cloudbeaver/core-connections';
|
||||
import { useService } from '@cloudbeaver/core-di';
|
||||
import type { ConnectionConfig } from '@cloudbeaver/core-sdk';
|
||||
|
||||
@@ -22,6 +22,9 @@ const styles = css`
|
||||
Loader {
|
||||
height: 100%;
|
||||
}
|
||||
ConnectionForm {
|
||||
padding-top: 16px;
|
||||
}
|
||||
`;
|
||||
|
||||
interface Props {
|
||||
@@ -46,7 +49,7 @@ const PublicConnectionFormRenderer: React.FC<Props> = observer(function PublicCo
|
||||
|
||||
return styled(styles)(
|
||||
<Loader state={connection}>
|
||||
{() => (
|
||||
{() => styled(styles)(
|
||||
<ConnectionForm
|
||||
data={data}
|
||||
options={options}
|
||||
|
||||
Reference in New Issue
Block a user