-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
110 additions
and
18 deletions.
There are no files selected for viewing
17 changes: 9 additions & 8 deletions
17
webapp/packages/core-blocks/src/Overlay/OverlayMessage.m.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
.message { | ||
flex-shrink: 0; | ||
padding: 24px 0px 24px 24px; | ||
overflow: auto; | ||
flex: 1; | ||
flex-shrink: 0; | ||
padding: 24px 0px 24px 24px; | ||
overflow: auto; | ||
white-space: pre-wrap; | ||
flex: 1; | ||
|
||
&:not(:first-child) { | ||
padding-top: 0px; | ||
} | ||
&:not(:first-child) { | ||
padding-top: 0px; | ||
} | ||
} | ||
|
||
.messageBox { | ||
padding-right: 24px; | ||
padding-right: 24px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
webapp/packages/plugin-sql-editor/src/SqlEditorOpenOverlay.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* CloudBeaver - Cloud Database Manager | ||
* Copyright (C) 2020-2024 DBeaver Corp and others | ||
* | ||
* Licensed under the Apache License, Version 2.0. | ||
* you may not use this file except in compliance with the License. | ||
*/ | ||
import { observer } from 'mobx-react-lite'; | ||
|
||
import { | ||
Button, | ||
Fill, | ||
Overlay, | ||
OverlayActions, | ||
OverlayHeader, | ||
OverlayHeaderIcon, | ||
OverlayHeaderTitle, | ||
OverlayMessage, | ||
useTranslate, | ||
} from '@cloudbeaver/core-blocks'; | ||
|
||
import type { ISqlDataSource } from './SqlDataSource/ISqlDataSource'; | ||
|
||
interface Props { | ||
dataSource: ISqlDataSource | undefined; | ||
} | ||
|
||
// TODO: probably we need to combine this component with SqlEditorOverlay and use common API for overlays | ||
export const SqlEditorOpenOverlay = observer<Props>(function SqlEditorOpenOverlay({ dataSource }) { | ||
const translate = useTranslate(); | ||
|
||
function openHandler() { | ||
dataSource?.open(); | ||
} | ||
|
||
return ( | ||
<Overlay active={!dataSource?.isOpened()}> | ||
<OverlayHeader> | ||
<OverlayHeaderIcon icon={dataSource?.icon} /> | ||
<OverlayHeaderTitle>{translate('plugin_sql_editor_action_overlay_title')}</OverlayHeaderTitle> | ||
</OverlayHeader> | ||
<OverlayMessage>{translate('plugin_sql_editor_action_overlay_description')}</OverlayMessage> | ||
<OverlayActions> | ||
<Fill /> | ||
<Button type="button" mod={['unelevated']} loading={dataSource?.isLoading()} loader onClick={openHandler}> | ||
{translate('ui_open')} | ||
</Button> | ||
</OverlayActions> | ||
</Overlay> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters