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