mirror of
https://github.com/chartdb/chartdb.git
synced 2025-10-27 18:14:01 +00:00
Compare commits
1 Commits
release-pl
...
jf/wrong_i
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
595e3db0b3 |
@@ -87,6 +87,8 @@ export const ImportDatabase: React.FC<ImportDatabaseProps> = ({
|
|||||||
|
|
||||||
const [showSSMSInfoDialog, setShowSSMSInfoDialog] = useState(false);
|
const [showSSMSInfoDialog, setShowSSMSInfoDialog] = useState(false);
|
||||||
|
|
||||||
|
const helpButtonRef = React.useRef<HTMLButtonElement>(null);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const loadScripts = async () => {
|
const loadScripts = async () => {
|
||||||
const { importMetadataScripts } = await import(
|
const { importMetadataScripts } = await import(
|
||||||
@@ -134,6 +136,11 @@ export const ImportDatabase: React.FC<ImportDatabaseProps> = ({
|
|||||||
if (inputValue.length === 65535) {
|
if (inputValue.length === 65535) {
|
||||||
setShowSSMSInfoDialog(true);
|
setShowSSMSInfoDialog(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show instructions when input contains "WITH fk_info as"
|
||||||
|
if (inputValue.toLowerCase().includes('with fk_info as')) {
|
||||||
|
helpButtonRef.current?.click();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[setScriptResult]
|
[setScriptResult]
|
||||||
);
|
);
|
||||||
@@ -398,7 +405,11 @@ export const ImportDatabase: React.FC<ImportDatabaseProps> = ({
|
|||||||
)}
|
)}
|
||||||
{isDesktop ? (
|
{isDesktop ? (
|
||||||
<ZoomableImage src="/load-new-db-instructions.gif">
|
<ZoomableImage src="/load-new-db-instructions.gif">
|
||||||
<Button type="button" variant="link">
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="link"
|
||||||
|
ref={helpButtonRef}
|
||||||
|
>
|
||||||
{t(
|
{t(
|
||||||
'new_diagram_dialog.import_database.instructions_link'
|
'new_diagram_dialog.import_database.instructions_link'
|
||||||
)}
|
)}
|
||||||
@@ -450,7 +461,11 @@ export const ImportDatabase: React.FC<ImportDatabaseProps> = ({
|
|||||||
|
|
||||||
{!isDesktop ? (
|
{!isDesktop ? (
|
||||||
<ZoomableImage src="/load-new-db-instructions.gif">
|
<ZoomableImage src="/load-new-db-instructions.gif">
|
||||||
<Button type="button" variant="link">
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="link"
|
||||||
|
ref={helpButtonRef}
|
||||||
|
>
|
||||||
{t(
|
{t(
|
||||||
'new_diagram_dialog.import_database.instructions_link'
|
'new_diagram_dialog.import_database.instructions_link'
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user