mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 06:26:00 +00:00
translation-datagrid,filter,macros,newObject
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
import { isProApp } from '../utility/proTools';
|
||||
import ModalBase from './ModalBase.svelte';
|
||||
import { closeCurrentModal } from './modalTools';
|
||||
import { _t } from '../translations';
|
||||
|
||||
export let multiTabIndex = undefined;
|
||||
|
||||
@@ -14,8 +15,8 @@
|
||||
{
|
||||
icon: 'icon sql-file',
|
||||
colorClass: 'color-icon-blue',
|
||||
title: 'Query',
|
||||
description: 'SQL query editor',
|
||||
title: _t('common.query', { defaultMessage: 'Query' }),
|
||||
description: _t('common.queryEditor', { defaultMessage: 'SQL query editor' }),
|
||||
action: () => {
|
||||
newQuery({ multiTabIndex });
|
||||
},
|
||||
@@ -25,47 +26,47 @@
|
||||
{
|
||||
icon: 'icon connection',
|
||||
colorClass: 'color-icon-yellow',
|
||||
title: 'Connection',
|
||||
description: 'Database connection stored locally',
|
||||
title: _t('common.connection', { defaultMessage: 'Connection' }),
|
||||
description: _t('newObject.connectionLocal', { defaultMessage: 'Database connection stored locally' }),
|
||||
command: 'new.connection',
|
||||
changeWidget: 'database',
|
||||
testid: 'NewObjectModal_connection',
|
||||
disabledMessage: 'You are not allowed to create new connections',
|
||||
disabledMessage: _t('newObject.connectionLocalDisabled', { defaultMessage: 'You are not allowed to create new connections' }),
|
||||
},
|
||||
{
|
||||
icon: 'icon cloud-connection',
|
||||
colorClass: 'color-icon-blue',
|
||||
title: 'Connection on Cloud',
|
||||
description: 'Database connection stored on DbGate Cloud',
|
||||
title: _t('common.connectionOnCloud', { defaultMessage: 'Connection on Cloud' }),
|
||||
description: _t('newObject.connectionOnCloudDescription', { defaultMessage: 'Database connection stored on DbGate Cloud' }),
|
||||
command: 'new.connectionOnCloud',
|
||||
changeWidget: 'cloud-private',
|
||||
testid: 'NewObjectModal_connectionOnCloud',
|
||||
disabledMessage: 'For creating connections on DbGate Cloud, you need to be logged in',
|
||||
disabledMessage: _t('newObject.connectionOnCloudDisabled', { defaultMessage: 'For creating connections on DbGate Cloud, you need to be logged in' }),
|
||||
},
|
||||
{
|
||||
icon: 'icon query-design',
|
||||
colorClass: 'color-icon-red',
|
||||
title: 'Query Designer',
|
||||
description: 'Design SQL queries visually',
|
||||
title: _t('common.queryDesigner', { defaultMessage: 'Query Designer' }),
|
||||
description: _t('newObject.queryDesignerDescription', { defaultMessage: 'Design SQL queries visually' }),
|
||||
command: 'new.queryDesign',
|
||||
testid: 'NewObjectModal_queryDesign',
|
||||
disabledMessage: 'Query Designer is not available for current database',
|
||||
disabledMessage: _t('newObject.queryDesignerDisabled', { defaultMessage: 'Query Designer is not available for current database' }),
|
||||
isProFeature: true,
|
||||
},
|
||||
{
|
||||
icon: 'icon diagram',
|
||||
colorClass: 'color-icon-blue',
|
||||
title: 'ER Diagram',
|
||||
description: 'Visualize database structure',
|
||||
title: _t('common.erDiagram', { defaultMessage: 'ER Diagram' }),
|
||||
description: _t('newObject.erDiagramDescription', { defaultMessage: 'Visualize database structure' }),
|
||||
command: 'new.diagram',
|
||||
testid: 'NewObjectModal_diagram',
|
||||
disabledMessage: 'ER Diagram is not available for current database',
|
||||
disabledMessage: _t('newObject.erDiagramDisabled', { defaultMessage: 'ER Diagram is not available for current database' }),
|
||||
},
|
||||
{
|
||||
icon: 'icon perspective',
|
||||
colorClass: 'color-icon-yellow',
|
||||
title: 'Perspective',
|
||||
description: 'Join complex data from multiple databases',
|
||||
title: _t('common.perspective', { defaultMessage: 'Perspective' }),
|
||||
description: _t('newObject.perspectiveDescription', { defaultMessage: 'Join complex data from multiple databases' }),
|
||||
command: 'new.perspective',
|
||||
testid: 'NewObjectModal_perspective',
|
||||
isProFeature: true,
|
||||
@@ -73,55 +74,55 @@
|
||||
{
|
||||
icon: 'icon table',
|
||||
colorClass: 'color-icon-blue',
|
||||
title: 'Table',
|
||||
description: 'Create table in the current database',
|
||||
title: _t('common.table', { defaultMessage: 'Table' }),
|
||||
description: _t('newObject.tableDescription', { defaultMessage: 'Create table in the current database' }),
|
||||
command: 'new.table',
|
||||
testid: 'NewObjectModal_table',
|
||||
disabledMessage: 'Table creation is not available for current database',
|
||||
disabledMessage: _t('newObject.tableDisabled', { defaultMessage: 'Table creation is not available for current database' }),
|
||||
},
|
||||
{
|
||||
icon: 'icon sql-generator',
|
||||
colorClass: 'color-icon-green',
|
||||
title: 'SQL Generator',
|
||||
description: 'Generate SQL scripts for database objects',
|
||||
title: _t('common.sqlGenerator', { defaultMessage: 'SQL Generator' }),
|
||||
description: _t('newObject.sqlGeneratorDescription', { defaultMessage: 'Generate SQL scripts for database objects' }),
|
||||
command: 'sql.generator',
|
||||
testid: 'NewObjectModal_sqlGenerator',
|
||||
disabledMessage: 'SQL Generator is not available for current database',
|
||||
disabledMessage: _t('newObject.sqlGeneratorDisabled', { defaultMessage: 'SQL Generator is not available for current database' }),
|
||||
},
|
||||
{
|
||||
icon: 'icon export',
|
||||
colorClass: 'color-icon-green',
|
||||
title: 'Export database',
|
||||
description: 'Export to file like CSV, JSON, Excel, or other DB',
|
||||
title: _t('common.exportDatabase', { defaultMessage: 'Export database' }),
|
||||
description: _t('newObject.exportDescription', { defaultMessage: 'Export to file like CSV, JSON, Excel, or other DB' }),
|
||||
command: 'database.export',
|
||||
testid: 'NewObjectModal_databaseExport',
|
||||
disabledMessage: 'Export is not available for current database',
|
||||
disabledMessage: _t('newObject.exportDisabled', { defaultMessage: 'Export is not available for current database' }),
|
||||
},
|
||||
{
|
||||
icon: 'icon compare',
|
||||
colorClass: 'color-icon-red',
|
||||
title: 'Compare database',
|
||||
description: 'Compare database schemas',
|
||||
title: _t('common.compare', { defaultMessage: 'Compare database' }),
|
||||
description: _t('newObject.compareDescription', { defaultMessage: 'Compare database schemas' }),
|
||||
command: 'database.compare',
|
||||
testid: 'NewObjectModal_databaseCompare',
|
||||
disabledMessage: 'Database comparison is not available for current database',
|
||||
disabledMessage: _t('newObject.compareDisabled', { defaultMessage: 'Database comparison is not available for current database' }),
|
||||
isProFeature: true,
|
||||
},
|
||||
{
|
||||
icon: 'icon ai',
|
||||
colorClass: 'color-icon-blue',
|
||||
title: 'Database Chat',
|
||||
description: 'Chat with your database using AI',
|
||||
title: _t('common.databaseChat', { defaultMessage: 'Database Chat' }),
|
||||
description: _t('newObject.databaseChatDescription', { defaultMessage: 'Chat with your database using AI' }),
|
||||
command: 'database.chat',
|
||||
isProFeature: true,
|
||||
disabledMessage: 'Database chat is not available for current database',
|
||||
disabledMessage: _t('newObject.databaseChatDisabled', { defaultMessage: 'Database chat is not available for current database' }),
|
||||
testid: 'NewObjectModal_databaseChat',
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<ModalBase simplefix {...$$restProps}>
|
||||
<div class="create-header">Create new</div>
|
||||
<div class="create-header">{_t('common.createNew', { defaultMessage: 'Create new' })}</div>
|
||||
<div class="wrapper">
|
||||
{#each NEW_ITEMS as item}
|
||||
{@const enabled = item.command
|
||||
|
||||
Reference in New Issue
Block a user