feat: implement MySQL driver for database management and add TransferContent UI component
This commit is contained in:
@@ -41,8 +41,9 @@ const TransferContent: React.FC<TransferContentProps> = ({ mode = 'both' }) => {
|
||||
const url = window.URL.createObjectURL(new Blob([response.data]));
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
const contextName = activeTable ? `${activeDatabase}-${activeTable}` : (activeDatabase || 'all');
|
||||
const filename = `backup-${contextName}-${new Date().toISOString().split('T')[0]}.sql`;
|
||||
const filename = activeTable
|
||||
? `${activeTable}-${new Date().toISOString().split('T')[0]}.sql`
|
||||
: `backup-${activeDatabase || 'all'}-${new Date().toISOString().split('T')[0]}.sql`;
|
||||
link.setAttribute('download', filename);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
|
||||
Reference in New Issue
Block a user