From 076a6a194bcfdeb8e383ea9f6318929f8b78668e Mon Sep 17 00:00:00 2001 From: Lyubov Voloshko Date: Tue, 5 May 2026 10:15:10 +0000 Subject: [PATCH 1/6] tables view: if no tables show ai-generate tables page --- .../dashboard/dashboard.component.html | 16 +- .../dashboard/dashboard.component.ts | 10 + .../db-generate-schema.component.css | 349 ++++++++++++++++++ .../db-generate-schema.component.html | 123 ++++++ .../db-generate-schema.component.ts | 140 +++++++ .../src/app/services/table-schema.service.ts | 50 +++ 6 files changed, 679 insertions(+), 9 deletions(-) create mode 100644 frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.css create mode 100644 frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.html create mode 100644 frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.ts create mode 100644 frontend/src/app/services/table-schema.service.ts diff --git a/frontend/src/app/components/dashboard/dashboard.component.html b/frontend/src/app/components/dashboard/dashboard.component.html index 184bba354..c5a8b7d90 100644 --- a/frontend/src/app/components/dashboard/dashboard.component.html +++ b/frontend/src/app/components/dashboard/dashboard.component.html @@ -1,4 +1,4 @@ - +
@@ -21,14 +21,12 @@
- -

Rocketadmin can not find any tables

-

- Rocketadmin don't have access to connection tables or there aren't any. - Please grant us access to required tables or create new table. - You can create a table with SQL editor -

-
+ + diff --git a/frontend/src/app/components/dashboard/dashboard.component.ts b/frontend/src/app/components/dashboard/dashboard.component.ts index a2ca9e898..52363fdbf 100644 --- a/frontend/src/app/components/dashboard/dashboard.component.ts +++ b/frontend/src/app/components/dashboard/dashboard.component.ts @@ -37,6 +37,7 @@ import { DbTableFiltersDialogComponent } from './db-table-view/db-table-filters- import { DbTableRowViewComponent } from './db-table-view/db-table-row-view/db-table-row-view.component'; import { DbTableViewComponent } from './db-table-view/db-table-view.component'; import { TablesDataSource } from './db-tables-data-source'; +import { DbGenerateSchemaComponent } from './db-generate-schema/db-generate-schema.component'; import { DbTablesListComponent } from './db-tables-list/db-tables-list.component'; interface DataToActivateActions { @@ -55,6 +56,7 @@ interface DataToActivateActions { MatIconModule, MatDialogModule, MatSidenavModule, + DbGenerateSchemaComponent, DbTablesListComponent, DbTableViewComponent, DbTableAiPanelComponent, @@ -447,4 +449,12 @@ export class DashboardComponent implements OnInit, OnDestroy { this.shownTableTitles = !this.shownTableTitles; this._uiSettings.updateConnectionSetting(this.connectionID, 'shownTableTitles', this.shownTableTitles); } + + onSchemaApplied() { + setTimeout(() => { + this.noTablesError = false; + this.loading = true; + this.getData(); + }, 1500); + } } diff --git a/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.css b/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.css new file mode 100644 index 000000000..6a861d06e --- /dev/null +++ b/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.css @@ -0,0 +1,349 @@ +:host { + display: flex; + height: 100%; +} + +.schema-chat { + display: flex; + flex-direction: column; + align-items: center; + width: 100%; + height: calc(100vh - 56px); + overflow: hidden; +} + +/* Welcome */ + +.schema-chat__welcome { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + flex: 1; + gap: 16px; + padding: 24px; + max-width: 500px; + margin: 0 auto; +} + +.schema-chat__welcome-icon { + width: 48px !important; + height: 48px !important; + animation: rocket-float 3s ease-in-out infinite; +} + +@keyframes rocket-float { + 0%, 100% { transform: translateY(0) rotate(0deg); } + 50% { transform: translateY(-2px) rotate(2deg); } +} + +.schema-chat__welcome-title { + font-size: 16px; + font-weight: 500; + color: rgba(0, 0, 0, 0.7); + margin: 0; + text-align: center; +} + +.schema-chat__welcome-subtitle { + font-size: 14px; + color: rgba(0, 0, 0, 0.5); + margin: 0; + text-align: center; +} + +@media (prefers-color-scheme: dark) { + .schema-chat__welcome-title { + color: rgba(255, 255, 255, 0.7); + } + .schema-chat__welcome-subtitle { + color: rgba(255, 255, 255, 0.5); + } +} + +.schema-chat__suggestions { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 8px; + margin-top: 8px; +} + +.suggestion-chip { + display: inline-flex; + align-items: center; + background-color: var(--mat-sidenav-content-background-color); + border: 1px solid #d3d3d3; + border-radius: 16px; + padding: 6px 14px; + font-size: 13px; + cursor: pointer; + transition: background-color 0.2s ease; +} + +.suggestion-chip:hover { + background-color: var(--color-primaryPalette-50); +} + +@media (prefers-color-scheme: dark) { + .suggestion-chip { + border-color: #4a4a4a; + color: rgba(255, 255, 255, 0.9); + } + .suggestion-chip:hover { + background-color: rgba(255, 255, 255, 0.08); + } +} + +/* Messages */ + +.schema-chat__messages { + flex: 1; + overflow-y: auto; + width: 100%; + max-width: 700px; + padding: 24px 16px; + display: flex; + flex-direction: column; + gap: 12px; +} + +.schema-chat__message { + border-radius: 8px; + padding: 12px 16px; + max-width: 90%; + line-height: 1.5; + white-space: pre-wrap; +} + +.schema-chat__message--user { + align-self: flex-end; + background-color: #f0f4f8; +} + +@media (prefers-color-scheme: dark) { + .schema-chat__message--user { + background-color: #2d3748; + } +} + +.schema-chat__message--ai { + align-self: flex-start; + background-color: rgba(99, 132, 255, 0.06); + max-width: 100%; +} + +@media (prefers-color-scheme: dark) { + .schema-chat__message--ai { + background-color: rgba(99, 132, 255, 0.1); + } +} + +.schema-chat__message-text { + white-space: pre-wrap; +} + +.schema-chat__message--error { + align-self: flex-start; + display: flex; + align-items: flex-start; + gap: 8px; + max-width: 100%; +} + +@media (prefers-color-scheme: light) { + .schema-chat__message--error { + background-color: var(--color-warnPalette-100); + color: var(--color-warnPalette-100-contrast); + } +} + +@media (prefers-color-scheme: dark) { + .schema-chat__message--error { + background-color: var(--color-warnDarkPalette-200); + color: var(--color-warnDarkPalette-200-contrast); + } +} + +.schema-chat__error-icon { + font-size: 20px; + height: 20px; + width: 20px; + flex-shrink: 0; + margin-top: 2px; +} + +/* Changes */ + +.schema-chat__changes { + display: flex; + flex-direction: column; + gap: 10px; + margin-top: 12px; + max-height: 400px; + overflow-y: auto; +} + +.schema-chat__change-card { + border: 1px solid rgba(0, 0, 0, 0.12); + border-radius: 6px; + padding: 10px 12px; + background: rgba(0, 0, 0, 0.02); +} + +@media (prefers-color-scheme: dark) { + .schema-chat__change-card { + border-color: rgba(255, 255, 255, 0.12); + background: rgba(255, 255, 255, 0.04); + } +} + +.schema-chat__change-header { + display: flex; + align-items: center; + gap: 8px; + margin-bottom: 8px; +} + +.schema-chat__change-type { + font-size: 10px; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.3px; + padding: 2px 6px; + border-radius: 3px; + background: var(--color-primaryPalette-500); + color: white; +} + +.schema-chat__change-table { + font-weight: 500; + font-size: 13px; +} + +.schema-chat__change-sql { + background: rgba(0, 0, 0, 0.04); + border-radius: 4px; + padding: 10px 12px; + font-size: 12px; + font-family: monospace; + overflow-x: auto; + white-space: pre-wrap; + margin: 0; +} + +@media (prefers-color-scheme: dark) { + .schema-chat__change-sql { + background: rgba(255, 255, 255, 0.06); + } +} + +.schema-chat__rollback { + margin-top: 6px; +} + +.schema-chat__rollback summary { + cursor: pointer; + font-size: 12px; + opacity: 0.6; + margin-bottom: 4px; +} + +.schema-chat__actions { + display: flex; + justify-content: flex-end; + gap: 10px; +} + +.schema-chat__actions button mat-icon { + margin-right: 4px; + font-size: 18px; + height: 18px; + width: 18px; +} + +/* Loading */ + +.schema-chat__loading { + display: flex; + align-items: center; + gap: 8px; + padding: 8px 0; +} + +.schema-chat__loading-text { + font-size: 13px; + color: #9ca3af; +} + +.schema-chat__loading-dots { + display: flex; + gap: 6px; + align-items: center; +} + +.schema-chat__loading-dot { + width: 6px; + height: 6px; + border-radius: 50%; + background-color: #9ca3af; + animation: loading-bounce 1.4s ease-in-out infinite; +} + +.schema-chat__loading-dot:nth-child(1) { animation-delay: 0s; } +.schema-chat__loading-dot:nth-child(2) { animation-delay: 0.15s; } +.schema-chat__loading-dot:nth-child(3) { animation-delay: 0.3s; } + +@keyframes loading-bounce { + 0%, 60%, 100% { transform: translateY(0); } + 30% { transform: translateY(-8px); } +} + +/* Input form */ + +.schema-chat__form { + width: 100%; + max-width: 700px; + padding: 0 16px 16px; + flex-shrink: 0; +} + +.schema-chat__input-field { + width: 100%; +} + +.schema-chat__input-field ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__leading { + border-radius: 24px 0 0 24px; + width: 24px; +} + +.schema-chat__input-field ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__trailing { + border-radius: 0 24px 24px 0; +} + +.schema-chat__input-field ::ng-deep .mdc-text-field--focused .mdc-notched-outline__leading, +.schema-chat__input-field ::ng-deep .mdc-text-field--focused .mdc-notched-outline__trailing { + border-color: #6384ff !important; + border-width: 2px !important; +} + +.schema-chat__input-field ::ng-deep .mdc-text-field--focused .mdc-notched-outline__notch { + border-color: #6384ff !important; + border-width: 2px 0 !important; +} + +.schema-chat__input-field ::ng-deep .mat-mdc-form-field-subscript-wrapper { + display: none; +} + +.schema-chat__input-field ::ng-deep .mat-mdc-text-field-wrapper { + padding-bottom: 0 !important; +} + +.schema-chat__input-field textarea { + resize: none; +} + +.schema-chat__send-button { + color: #6384ff !important; +} diff --git a/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.html b/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.html new file mode 100644 index 000000000..c1fcc5585 --- /dev/null +++ b/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.html @@ -0,0 +1,123 @@ +
+ + @if (messages().length === 0) { +
+ +

No tables found — let AI create them

+

Describe the database you need and AI will generate the schema for you.

+ +
+ + + +
+
+ } + + + @if (messages().length) { +
+ @for (message of messages(); track $index) { + @if (message.role === 'user') { +
+ {{ message.text }} +
+ } + @if (message.role === 'ai') { +
+ {{ message.text }} + + @if (message.changes?.length) { +
+ @for (change of message.changes; track change.id) { +
+
+ {{ change.changeType }} + {{ change.targetTableName }} +
+
{{ change.forwardSql }}
+ @if (change.rollbackSql) { +
+ Rollback SQL +
{{ change.rollbackSql }}
+
+ } +
+ } +
+ } +
+ } + @if (message.role === 'error') { +
+ error_outline + {{ message.text }} +
+ } + } + + @if (submitting()) { +
+ Generating schema +
+ + + +
+
+ } +
+ } + + + @if (!applied()) { +
+ @if (pendingBatch()) { +
+ + +
+ } @else { +
+ + Describe the database you need... + + + +
+ } +
+ } +
diff --git a/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.ts b/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.ts new file mode 100644 index 000000000..7da23f966 --- /dev/null +++ b/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.ts @@ -0,0 +1,140 @@ +import { Component, EventEmitter, Input, Output, signal, inject, computed } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatInputModule } from '@angular/material/input'; +import { TableSchemaService, SchemaChangeResponse } from 'src/app/services/table-schema.service'; + +interface ChatMessage { + role: 'user' | 'ai' | 'error'; + text: string; + changes?: SchemaChangeResponse[]; + batchId?: string; +} + +@Component({ + selector: 'app-db-generate-schema', + templateUrl: './db-generate-schema.component.html', + styleUrls: ['./db-generate-schema.component.css'], + imports: [ + CommonModule, + FormsModule, + MatButtonModule, + MatIconModule, + MatFormFieldModule, + MatInputModule, + ], +}) +export class DbGenerateSchemaComponent { + @Input() connectionID: string; + @Output() schemaApplied = new EventEmitter(); + + private _tableSchema = inject(TableSchemaService); + + protected messages = signal([]); + protected userPrompt = signal(''); + protected submitting = signal(false); + protected applying = signal(false); + protected applied = signal(false); + + protected pendingBatch = computed(() => { + const msgs = this.messages(); + for (let i = msgs.length - 1; i >= 0; i--) { + if (msgs[i].batchId && msgs[i].changes?.length) return msgs[i]; + } + return null; + }); + + async onSubmit() { + const prompt = this.userPrompt().trim(); + if (!prompt || this.submitting()) return; + + this.messages.update(msgs => [...msgs, { role: 'user', text: prompt }]); + this.userPrompt.set(''); + this.submitting.set(true); + + try { + const result = await this._tableSchema.generateSchemaChange(this.connectionID, prompt); + if (result && result.changes.length > 0) { + const summary = result.changes.map(c => `**${c.changeType}** \`${c.targetTableName}\`${c.aiSummary ? ' — ' + c.aiSummary : ''}`).join('\n'); + this.messages.update(msgs => [...msgs, { + role: 'ai', + text: `I've generated ${result.changes.length} change(s) for your database:\n\n${summary}\n\nReview the SQL below and approve or reject.`, + changes: result.changes, + batchId: result.batchId, + }]); + } else { + this.messages.update(msgs => [...msgs, { + role: 'ai', + text: 'I could not generate any schema changes for that prompt. Could you describe your database in more detail?', + }]); + } + } catch (err: unknown) { + const error = err as { error?: { message?: string }; message?: string }; + this.messages.update(msgs => [...msgs, { + role: 'error', + text: error?.error?.message || error?.message || 'Failed to generate schema changes.', + }]); + } finally { + this.submitting.set(false); + } + } + + async onApprove() { + const batch = this.pendingBatch(); + if (!batch?.batchId || this.applying()) return; + + this.applying.set(true); + + try { + const result = await this._tableSchema.approveBatch(batch.batchId, true); + if (result) { + const failed = result.changes.filter(c => c.status === 'failed'); + if (failed.length > 0) { + this.messages.update(msgs => [...msgs, { + role: 'error', + text: `${failed.length} change(s) failed: ${failed.map(c => c.executionError).join('; ')}`, + }]); + } else { + this.applied.set(true); + this.messages.update(msgs => [...msgs, { + role: 'ai', + text: 'All changes applied successfully! Your tables have been created. Reloading...', + }]); + this.schemaApplied.emit(); + } + } + } catch (err: unknown) { + const error = err as { error?: { message?: string }; message?: string }; + this.messages.update(msgs => [...msgs, { + role: 'error', + text: error?.error?.message || error?.message || 'Failed to apply schema changes.', + }]); + } finally { + this.applying.set(false); + } + } + + async onReject() { + const batch = this.pendingBatch(); + if (!batch?.batchId) return; + + await this._tableSchema.rejectBatch(batch.batchId); + this.messages.update(msgs => msgs.map(m => + m === batch ? { ...m, batchId: undefined } : m + ).concat({ + role: 'ai', + text: 'Changes rejected. Feel free to describe what you need differently.', + })); + } + + onKeydown(event: KeyboardEvent) { + if (event.key === 'Enter' && !event.shiftKey) { + event.preventDefault(); + this.onSubmit(); + } + } + +} diff --git a/frontend/src/app/services/table-schema.service.ts b/frontend/src/app/services/table-schema.service.ts new file mode 100644 index 000000000..db9ef4835 --- /dev/null +++ b/frontend/src/app/services/table-schema.service.ts @@ -0,0 +1,50 @@ +import { Injectable, inject } from '@angular/core'; +import { ApiService } from './api.service'; + +export interface SchemaChangeResponse { + id: string; + connectionId: string; + batchId: string | null; + orderInBatch: number; + forwardSql: string; + rollbackSql: string | null; + userModifiedSql: string | null; + status: string; + changeType: string; + targetTableName: string; + databaseType: string; + executionError: string | null; + isReversible: boolean; + userPrompt: string; + aiSummary: string | null; + aiReasoning: string | null; + createdAt: string; + appliedAt: string | null; + rolledBackAt: string | null; +} + +export interface SchemaChangeBatchResponse { + batchId: string; + changes: SchemaChangeResponse[]; +} + +@Injectable({ + providedIn: 'root', +}) +export class TableSchemaService { + private _api = inject(ApiService); + + async generateSchemaChange(connectionId: string, userPrompt: string): Promise { + return this._api.post(`/table-schema/${connectionId}/generate`, { userPrompt }); + } + + async approveBatch(batchId: string, confirmedDestructive?: boolean): Promise { + return this._api.post(`/table-schema/batch/${batchId}/approve`, { + confirmedDestructive, + }); + } + + async rejectBatch(batchId: string): Promise { + return this._api.post(`/table-schema/batch/${batchId}/reject`); + } +} From 48a3165dd6218fe0201f442d7de47df7e117f420 Mon Sep 17 00:00:00 2001 From: Lyubov Voloshko Date: Thu, 7 May 2026 11:11:43 +0000 Subject: [PATCH 2/6] table view: add Edit structure button --- .../dashboard/dashboard.component.html | 15 ++++-- .../dashboard/dashboard.component.ts | 6 +++ .../db-tables-list.component.css | 46 ++++++++++++++++++- .../db-tables-list.component.html | 15 ++++++ .../db-tables-list.component.ts | 1 + 5 files changed, 78 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/components/dashboard/dashboard.component.html b/frontend/src/app/components/dashboard/dashboard.component.html index c5a8b7d90..20d15d24f 100644 --- a/frontend/src/app/components/dashboard/dashboard.component.html +++ b/frontend/src/app/components/dashboard/dashboard.component.html @@ -87,11 +87,18 @@ [connectionID]="connectionID" [selectedTable]="selectedTableName" [uiSettings]="uiSettings" - (expandSidebar)="toggleSideBar()"> + (expandSidebar)="toggleSideBar()" + (editStructure)="onEditStructure()"> -
+ + +
@@ -128,10 +135,10 @@ (applyFilter)="applyFilter($event)">
- - { this.noTablesError = false; + this.showSchemaEditor = false; this.loading = true; this.getData(); }, 1500); diff --git a/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.css b/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.css index c0d0821fe..d96a7a8ff 100644 --- a/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.css +++ b/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.css @@ -445,7 +445,7 @@ .expanded-container.has-custom-folders .add-folder-button-container { order: 4; /* After folders section */ position: sticky; - bottom: 0; + bottom: 40px; background-color: #ffffff; padding: 8px 16px; z-index: 10; @@ -459,6 +459,50 @@ } } +/* Edit structure button container */ +.edit-structure-button-container { + order: 5; /* Always at the very bottom */ + position: sticky; + bottom: 0; + background-color: #ffffff; + padding: 8px 16px; + z-index: 10; + margin-left: 16px; + margin-right: 16px; + margin-top: 4px; + margin-bottom: 8px; + width: calc(100% - 32px); + box-sizing: border-box; +} + +.expanded-container.has-custom-folders .edit-structure-button-container { + padding: 0 16px 8px; + margin-top: 0; + margin-left: 0; + margin-right: 0; + width: 100%; +} + +.edit-structure-button { + width: 100%; +} + +.edit-structure-button mat-icon { + font-size: 18px; + width: 18px; + height: 18px; +} + +@media (prefers-color-scheme: dark) { + .edit-structure-button-container { + background-color: #303030; + } + + .expanded-container.has-custom-folders .edit-structure-button-container { + background-color: #303030; + } +} + .search-input ::ng-deep * { background-color: transparent !important; } diff --git a/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.html b/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.html index c9270f948..b5b5a6c4d 100644 --- a/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.html +++ b/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.html @@ -61,6 +61,13 @@
+ +
+ construction +
+ +
+ +
+
diff --git a/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.ts b/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.ts index 214853121..2a34b892c 100644 --- a/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.ts +++ b/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.ts @@ -75,6 +75,7 @@ export class DbTablesListComponent implements OnInit, OnChanges { @Input() uiSettings: any; @Output() expandSidebar = new EventEmitter(); + @Output() editStructure = new EventEmitter(); private _connections = inject(ConnectionsService); protected canEditConnection = () => this._connections.canEditConnection(); From 75db5344d9f6cd6c8ae31b76d463a5fb46bba778 Mon Sep 17 00:00:00 2001 From: Lyubov Voloshko Date: Thu, 7 May 2026 11:14:18 +0000 Subject: [PATCH 3/6] edit structure: add close button --- .../dashboard/dashboard.component.html | 2 + .../db-generate-schema.component.css | 8 +++ .../db-generate-schema.component.html | 55 ++++++++++++++----- .../db-generate-schema.component.ts | 2 + 4 files changed, 52 insertions(+), 15 deletions(-) diff --git a/frontend/src/app/components/dashboard/dashboard.component.html b/frontend/src/app/components/dashboard/dashboard.component.html index 20d15d24f..caf7d45be 100644 --- a/frontend/src/app/components/dashboard/dashboard.component.html +++ b/frontend/src/app/components/dashboard/dashboard.component.html @@ -95,7 +95,9 @@
diff --git a/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.css b/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.css index 6a861d06e..462212bc1 100644 --- a/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.css +++ b/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.css @@ -10,6 +10,14 @@ width: 100%; height: calc(100vh - 56px); overflow: hidden; + position: relative; +} + +.schema-chat__close-button { + position: absolute; + top: 8px; + right: 8px; + z-index: 10; } /* Welcome */ diff --git a/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.html b/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.html index c1fcc5585..5a85af2bf 100644 --- a/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.html +++ b/frontend/src/app/components/dashboard/db-generate-schema/db-generate-schema.component.html @@ -1,24 +1,49 @@
+ @if (showClose) { + + } @if (messages().length === 0) {
-

No tables found — let AI create them

-

Describe the database you need and AI will generate the schema for you.

+ @if (showClose) { +

Edit database structure with AI

+

Describe the changes you want to make and AI will generate the SQL for you.

+ } @else { +

No tables found — let AI create them

+

Describe the database you need and AI will generate the schema for you.

+ }
- - - + @if (showClose) { + + + + } @else { + + + + }
} @@ -100,7 +125,7 @@ } @else {
- Describe the database you need... + {{showClose ? 'Describe the changes you need...' : 'Describe the database you need...'}}