mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
Compare commits
4 Commits
v0.7.21
...
v0.7.22-be
Author | SHA1 | Date | |
---|---|---|---|
14eeaccb07 | |||
1a0c5da2f1 | |||
bb36e98beb | |||
8928510fb5 |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
### [0.7.22-beta.0](https://github.com/antares-sql/antares/compare/v0.7.21...v0.7.22-beta.0) (2024-02-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **UI:** resizable textarea in new/edito note, closes [#747](https://github.com/antares-sql/antares/issues/747) ([1a0c5da](https://github.com/antares-sql/antares/commit/1a0c5da2f14b99d6f5581b2bf6e916d67d097245))
|
||||||
|
|
||||||
|
|
||||||
|
### Improvements
|
||||||
|
|
||||||
|
* **UI:** improved notes, fixes [#746](https://github.com/antares-sql/antares/issues/746) ([bb36e98](https://github.com/antares-sql/antares/commit/bb36e98bebc5e1e55735e98d272428df2ab682e8))
|
||||||
|
|
||||||
### [0.7.21](https://github.com/antares-sql/antares/compare/v0.7.21-beta.1...v0.7.21) (2024-01-13)
|
### [0.7.21](https://github.com/antares-sql/antares/compare/v0.7.21-beta.1...v0.7.21) (2024-01-13)
|
||||||
|
|
||||||
|
|
||||||
|
12
README.md
12
README.md
@@ -71,17 +71,6 @@ On macOS you can run `.dmg` distribution following [this guide](https://support.
|
|||||||
[<img height='56' alt='Download on Flathub' src='https://dl.flathub.org/assets/badges/flathub-badge-en.svg'/>](https://flathub.org/apps/it.fabiodistasio.AntaresSQL) [](https://snapcraft.io/antares) [](https://aur.archlinux.org/packages/antares-sql-bin) [<img src="https://developer.microsoft.com/store/badges/images/English_get-it-from-MS.png" style="height: 56px">](https://www.microsoft.com/p/antares-sql-client/9nhtb9sq51r1?cid=storebadge&ocid=badge&rtc=1&activetab=pivot:overviewtab)
|
[<img height='56' alt='Download on Flathub' src='https://dl.flathub.org/assets/badges/flathub-badge-en.svg'/>](https://flathub.org/apps/it.fabiodistasio.AntaresSQL) [](https://snapcraft.io/antares) [](https://aur.archlinux.org/packages/antares-sql-bin) [<img src="https://developer.microsoft.com/store/badges/images/English_get-it-from-MS.png" style="height: 56px">](https://www.microsoft.com/p/antares-sql-client/9nhtb9sq51r1?cid=storebadge&ocid=badge&rtc=1&activetab=pivot:overviewtab)
|
||||||
🚀 **[Other Downloads](https://github.com/antares-sql/antares/releases/latest)**
|
🚀 **[Other Downloads](https://github.com/antares-sql/antares/releases/latest)**
|
||||||
|
|
||||||
## Coming soon
|
|
||||||
|
|
||||||
This is a roadmap with major features will come in near future.
|
|
||||||
|
|
||||||
- Database tools.
|
|
||||||
- Users management (add/edit/delete).
|
|
||||||
- More context menu shortcuts.
|
|
||||||
- More keyboard shortcuts.
|
|
||||||
- Support for other databases.
|
|
||||||
- Apple Silicon distribution
|
|
||||||
|
|
||||||
## Currently supported
|
## Currently supported
|
||||||
|
|
||||||
### Databases
|
### Databases
|
||||||
@@ -90,6 +79,7 @@ This is a roadmap with major features will come in near future.
|
|||||||
- [x] PostgreSQL
|
- [x] PostgreSQL
|
||||||
- [x] SQLite
|
- [x] SQLite
|
||||||
- [x] Firebird SQL
|
- [x] Firebird SQL
|
||||||
|
- [ ] DuckDB
|
||||||
- [ ] SQL Server
|
- [ ] SQL Server
|
||||||
- [ ] More...
|
- [ ] More...
|
||||||
|
|
||||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "antares",
|
"name": "antares",
|
||||||
"version": "0.7.21",
|
"version": "0.7.22-beta.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "antares",
|
"name": "antares",
|
||||||
"version": "0.7.21",
|
"version": "0.7.22-beta.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "antares",
|
"name": "antares",
|
||||||
"productName": "Antares",
|
"productName": "Antares",
|
||||||
"version": "0.7.21",
|
"version": "0.7.22-beta.0",
|
||||||
"description": "A modern, fast and productivity driven SQL client with a focus in UX.",
|
"description": "A modern, fast and productivity driven SQL client with a focus in UX.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "https://github.com/antares-sql/antares.git",
|
"repository": "https://github.com/antares-sql/antares.git",
|
||||||
|
@@ -363,7 +363,7 @@ export interface QueryBuilderObject {
|
|||||||
offset: number;
|
offset: number;
|
||||||
join: string[];
|
join: string[];
|
||||||
update: string[];
|
update: string[];
|
||||||
insert: {[key: string]: string | boolean | number }[];
|
insert: Record<string, string | boolean | number>[];
|
||||||
delete: boolean;
|
delete: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ export interface ExportOptions {
|
|||||||
includeContent: boolean;
|
includeContent: boolean;
|
||||||
includeDropStatement: boolean;
|
includeDropStatement: boolean;
|
||||||
}[];
|
}[];
|
||||||
includes: {[key: string]: boolean};
|
includes: Record<string, boolean>;
|
||||||
outputFormat: 'sql' | 'sql.zip';
|
outputFormat: 'sql' | 'sql.zip';
|
||||||
outputFile: string;
|
outputFile: string;
|
||||||
sqlInsertAfter: number;
|
sqlInsertAfter: number;
|
||||||
|
@@ -18,7 +18,7 @@ export interface TableDeleteParams {
|
|||||||
primary?: string;
|
primary?: string;
|
||||||
field: string;
|
field: string;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
rows: {[key: string]: any};
|
rows: Record<string, any>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TableFilterOperator = '=' | '!=' | '>' | '<' | '>=' | '<=' | 'IN' | 'NOT IN' | 'LIKE' | 'NOT LIKE' | 'RLIKE' | 'NOT RLIKE' | 'BETWEEN' | 'IS NULL' | 'IS NOT NULL'
|
export type TableFilterOperator = '=' | '!=' | '>' | '<' | '>=' | '<=' | 'IN' | 'NOT IN' | 'LIKE' | 'NOT LIKE' | 'RLIKE' | 'NOT RLIKE' | 'BETWEEN' | 'IS NULL' | 'IS NOT NULL'
|
||||||
@@ -35,17 +35,16 @@ export interface InsertRowsParams {
|
|||||||
uid: string;
|
uid: string;
|
||||||
schema: string;
|
schema: string;
|
||||||
table: string;
|
table: string;
|
||||||
row: {[key: string]: {
|
row: Record<string, {
|
||||||
group: string;
|
group: string;
|
||||||
method: string;
|
method: string;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
params: any;
|
params: any;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
value: any;
|
value: any;
|
||||||
length: number;
|
length: number;
|
||||||
};
|
}>;
|
||||||
};
|
|
||||||
repeat: number;
|
repeat: number;
|
||||||
fields: {[key: string]: string};
|
fields: Record<string, string>;
|
||||||
locale: UsableLocale;
|
locale: UsableLocale;
|
||||||
}
|
}
|
||||||
|
@@ -41,7 +41,7 @@ export const escapeAndQuote = (val: string, client: ClientCode) => {
|
|||||||
const { stringsWrapper: sw } = customizations[client];
|
const { stringsWrapper: sw } = customizations[client];
|
||||||
// eslint-disable-next-line no-control-regex
|
// eslint-disable-next-line no-control-regex
|
||||||
const CHARS_TO_ESCAPE = /[\0\b\t\n\r\x1a"'\\]/g;
|
const CHARS_TO_ESCAPE = /[\0\b\t\n\r\x1a"'\\]/g;
|
||||||
const CHARS_ESCAPE_MAP: {[key: string]: string} = {
|
const CHARS_ESCAPE_MAP: Record<string, string> = {
|
||||||
'\0': '\\0',
|
'\0': '\\0',
|
||||||
'\b': '\\b',
|
'\b': '\\b',
|
||||||
'\t': '\\t',
|
'\t': '\\t',
|
||||||
@@ -153,9 +153,9 @@ export const valueToSqlString = (args: {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const jsonToSqlInsert = (args: {
|
export const jsonToSqlInsert = (args: {
|
||||||
json: { [key: string]: any}[];
|
json: Record<string, any>[];
|
||||||
client: ClientCode;
|
client: ClientCode;
|
||||||
fields: { [key: string]: {type: string; datePrecision: number}};
|
fields: Record<string, {type: string; datePrecision: number}>;
|
||||||
table: string;
|
table: string;
|
||||||
options?: {sqlInsertAfter: number; sqlInsertDivider: 'bytes' | 'rows'};
|
options?: {sqlInsertAfter: number; sqlInsertDivider: 'bytes' | 'rows'};
|
||||||
}) => {
|
}) => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
export const shortcutEvents: { [key: string]: { l18n: string; l18nParam?: string | number; context?: 'tab' }} = {
|
export const shortcutEvents: Record<string, { l18n: string; l18nParam?: string | number; context?: 'tab' }> = {
|
||||||
'run-or-reload': { l18n: 'application.runOrReload', context: 'tab' },
|
'run-or-reload': { l18n: 'application.runOrReload', context: 'tab' },
|
||||||
'open-new-tab': { l18n: 'application.openNewTab', context: 'tab' },
|
'open-new-tab': { l18n: 'application.openNewTab', context: 'tab' },
|
||||||
'close-tab': { l18n: 'application.closeTab', context: 'tab' },
|
'close-tab': { l18n: 'application.closeTab', context: 'tab' },
|
||||||
|
@@ -6,7 +6,7 @@ import { SslOptions } from 'mysql2';
|
|||||||
import { ClientsFactory } from '../libs/ClientsFactory';
|
import { ClientsFactory } from '../libs/ClientsFactory';
|
||||||
import { validateSender } from '../libs/misc/validateSender';
|
import { validateSender } from '../libs/misc/validateSender';
|
||||||
|
|
||||||
export default (connections: {[key: string]: antares.Client}) => {
|
export default (connections: Record<string, antares.Client>) => {
|
||||||
ipcMain.handle('test-connection', async (event, conn: antares.ConnectionParams) => {
|
ipcMain.handle('test-connection', async (event, conn: antares.ConnectionParams) => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ import { ipcMain } from 'electron';
|
|||||||
|
|
||||||
import { validateSender } from '../libs/misc/validateSender';
|
import { validateSender } from '../libs/misc/validateSender';
|
||||||
|
|
||||||
export default (connections: {[key: string]: antares.Client}) => {
|
export default (connections: Record<string, antares.Client>) => {
|
||||||
ipcMain.handle('get-databases', async (event, uid) => {
|
ipcMain.handle('get-databases', async (event, uid) => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ import { ipcMain } from 'electron';
|
|||||||
|
|
||||||
import { validateSender } from '../libs/misc/validateSender';
|
import { validateSender } from '../libs/misc/validateSender';
|
||||||
|
|
||||||
export default (connections: {[key: string]: antares.Client}) => {
|
export default (connections: Record<string, antares.Client>) => {
|
||||||
ipcMain.handle('get-function-informations', async (event, params) => {
|
ipcMain.handle('get-function-informations', async (event, params) => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ import updates from './updates';
|
|||||||
import users from './users';
|
import users from './users';
|
||||||
import views from './views';
|
import views from './views';
|
||||||
|
|
||||||
const connections: {[key: string]: antares.Client} = {};
|
const connections: Record<string, antares.Client> = {};
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
connection(connections);
|
connection(connections);
|
||||||
|
@@ -3,7 +3,7 @@ import { ipcMain } from 'electron';
|
|||||||
|
|
||||||
import { validateSender } from '../libs/misc/validateSender';
|
import { validateSender } from '../libs/misc/validateSender';
|
||||||
|
|
||||||
export default (connections: {[key: string]: antares.Client}) => {
|
export default (connections: Record<string, antares.Client>) => {
|
||||||
ipcMain.handle('get-routine-informations', async (event, params) => {
|
ipcMain.handle('get-routine-informations', async (event, params) => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ import { ipcMain } from 'electron';
|
|||||||
|
|
||||||
import { validateSender } from '../libs/misc/validateSender';
|
import { validateSender } from '../libs/misc/validateSender';
|
||||||
|
|
||||||
export default (connections: {[key: string]: antares.Client}) => {
|
export default (connections: Record<string, antares.Client>) => {
|
||||||
ipcMain.handle('get-scheduler-informations', async (event, params) => {
|
ipcMain.handle('get-scheduler-informations', async (event, params) => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ import { Worker } from 'worker_threads';
|
|||||||
|
|
||||||
import { validateSender } from '../libs/misc/validateSender';
|
import { validateSender } from '../libs/misc/validateSender';
|
||||||
|
|
||||||
export default (connections: {[key: string]: antares.Client}) => {
|
export default (connections: Record<string, antares.Client>) => {
|
||||||
let exporter: Worker = null;
|
let exporter: Worker = null;
|
||||||
let importer: Worker = null;
|
let importer: Worker = null;
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ import * as moment from 'moment';
|
|||||||
|
|
||||||
import { validateSender } from '../libs/misc/validateSender';
|
import { validateSender } from '../libs/misc/validateSender';
|
||||||
|
|
||||||
export default (connections: {[key: string]: antares.Client}) => {
|
export default (connections: Record<string, antares.Client>) => {
|
||||||
ipcMain.handle('get-table-columns', async (event, params) => {
|
ipcMain.handle('get-table-columns', async (event, params) => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
|
|
||||||
if (params.primary) {
|
if (params.primary) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const idString = params.rows.map((row: {[key: string]: any}) => {
|
const idString = params.rows.map((row: Record<string, any>) => {
|
||||||
const fieldName = Object.keys(row)[0].includes('.') ? `${params.table}.${params.primary}` : params.primary;
|
const fieldName = Object.keys(row)[0].includes('.') ? `${params.table}.${params.primary}` : params.primary;
|
||||||
|
|
||||||
return typeof row[fieldName] === 'string'
|
return typeof row[fieldName] === 'string'
|
||||||
@@ -304,10 +304,10 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
||||||
|
|
||||||
try { // TODO: move to client classes
|
try { // TODO: move to client classes
|
||||||
const rows: {[key: string]: string | number | boolean | Date | Buffer}[] = [];
|
const rows: Record<string, string | number | boolean | Date | Buffer>[] = [];
|
||||||
|
|
||||||
for (let i = 0; i < +params.repeat; i++) {
|
for (let i = 0; i < +params.repeat; i++) {
|
||||||
const insertObj: {[key: string]: string | number | boolean | Date | Buffer} = {};
|
const insertObj: Record<string, string | number | boolean | Date | Buffer> = {};
|
||||||
|
|
||||||
for (const key in params.row) {
|
for (const key in params.row) {
|
||||||
const type = params.fields[key];
|
const type = params.fields[key];
|
||||||
@@ -367,7 +367,7 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
insertObj[key] = escapedParam;
|
insertObj[key] = escapedParam;
|
||||||
}
|
}
|
||||||
else { // Faker value
|
else { // Faker value
|
||||||
const parsedParams: {[key: string]: string | number | boolean | Date | Buffer} = {};
|
const parsedParams: Record<string, string | number | boolean | Date | Buffer> = {};
|
||||||
let fakeValue;
|
let fakeValue;
|
||||||
|
|
||||||
if (params.locale)
|
if (params.locale)
|
||||||
@@ -437,12 +437,12 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
if (description)
|
if (description)
|
||||||
query.select(`LEFT(${description}, 20) AS foreign_description`);
|
query.select(`LEFT(${description}, 20) AS foreign_description`);
|
||||||
|
|
||||||
const results = await query.run<{[key: string]: string}>();
|
const results = await query.run<Record<string, string>>();
|
||||||
|
|
||||||
const parsedResults: {[key: string]: string}[] = [];
|
const parsedResults: Record<string, string>[] = [];
|
||||||
|
|
||||||
for (const row of results.rows) {
|
for (const row of results.rows) {
|
||||||
const remappedRow: {[key: string]: string} = {};
|
const remappedRow: Record<string, string> = {};
|
||||||
|
|
||||||
for (const key in row)
|
for (const key in row)
|
||||||
remappedRow[key.toLowerCase()] = row[key];// Thanks Firebird -.-
|
remappedRow[key.toLowerCase()] = row[key];// Thanks Firebird -.-
|
||||||
|
@@ -3,7 +3,7 @@ import { ipcMain } from 'electron';
|
|||||||
|
|
||||||
import { validateSender } from '../libs/misc/validateSender';
|
import { validateSender } from '../libs/misc/validateSender';
|
||||||
|
|
||||||
export default (connections: {[key: string]: antares.Client}) => {
|
export default (connections: Record<string, antares.Client>) => {
|
||||||
ipcMain.handle('get-trigger-informations', async (event, params) => {
|
ipcMain.handle('get-trigger-informations', async (event, params) => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ import { ipcMain } from 'electron';
|
|||||||
|
|
||||||
import { validateSender } from '../libs/misc/validateSender';
|
import { validateSender } from '../libs/misc/validateSender';
|
||||||
|
|
||||||
export default (connections: {[key: string]: antares.Client}) => {
|
export default (connections: Record<string, antares.Client>) => {
|
||||||
ipcMain.handle('get-users', async (event, uid) => {
|
ipcMain.handle('get-users', async (event, uid) => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ import { ipcMain } from 'electron';
|
|||||||
|
|
||||||
import { validateSender } from '../libs/misc/validateSender';
|
import { validateSender } from '../libs/misc/validateSender';
|
||||||
|
|
||||||
export default (connections: {[key: string]: antares.Client}) => {
|
export default (connections: Record<string, antares.Client>) => {
|
||||||
ipcMain.handle('get-view-informations', async (event, params) => {
|
ipcMain.handle('get-view-informations', async (event, params) => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
||||||
|
|
||||||
|
@@ -136,7 +136,7 @@ export abstract class BaseClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
insert (arr: {[key: string]: any}[]) {
|
insert (arr: Record<string, any>[]) {
|
||||||
this._query.insert = [...this._query.insert, ...arr];
|
this._query.insert = [...this._query.insert, ...arr];
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@@ -13,7 +13,7 @@ export class FirebirdSQLClient extends BaseClient {
|
|||||||
protected _connection?: firebird.Database | firebird.ConnectionPool;
|
protected _connection?: firebird.Database | firebird.ConnectionPool;
|
||||||
_params: firebird.Options;
|
_params: firebird.Options;
|
||||||
|
|
||||||
private _types: {[key: number]: string} ={
|
private _types: Record<number, string> ={
|
||||||
452: 'CHAR', // Array of char
|
452: 'CHAR', // Array of char
|
||||||
448: 'VARCHAR',
|
448: 'VARCHAR',
|
||||||
500: 'SMALLINT',
|
500: 'SMALLINT',
|
||||||
|
@@ -15,7 +15,7 @@ export class MySQLClient extends BaseClient {
|
|||||||
_connection?: mysql.Connection | mysql.Pool;
|
_connection?: mysql.Connection | mysql.Pool;
|
||||||
_params: mysql.ConnectionOptions & {schema: string; ssl?: mysql.SslOptions; ssh?: SSHConfig; readonly: boolean};
|
_params: mysql.ConnectionOptions & {schema: string; ssl?: mysql.SslOptions; ssh?: SSHConfig; readonly: boolean};
|
||||||
|
|
||||||
private types: {[key: number]: string} = {
|
private types: Record<number, string> = {
|
||||||
0: 'DECIMAL',
|
0: 'DECIMAL',
|
||||||
1: 'TINYINT',
|
1: 'TINYINT',
|
||||||
2: 'SMALLINT',
|
2: 'SMALLINT',
|
||||||
@@ -582,7 +582,7 @@ export class MySQLClient extends BaseClient {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.reduce((acc: {[key: string]: { name: string; type: string; length: string; default: string}}, curr) => {
|
.reduce((acc: Record<string, { name: string; type: string; length: string; default: string}>, curr) => {
|
||||||
acc[curr.name] = curr;
|
acc[curr.name] = curr;
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
|
@@ -88,8 +88,8 @@ export class PostgreSQLClient extends BaseClient {
|
|||||||
private _keepaliveTimer: NodeJS.Timer;
|
private _keepaliveTimer: NodeJS.Timer;
|
||||||
private _keepaliveMs: number;
|
private _keepaliveMs: number;
|
||||||
protected _connection?: pg.Client | pg.Pool;
|
protected _connection?: pg.Client | pg.Pool;
|
||||||
private types: {[key: string]: string} = {};
|
private types: Record<string, string> = {};
|
||||||
private _arrayTypes: {[key: string]: string} = {
|
private _arrayTypes: Record<string, string> = {
|
||||||
_int2: 'SMALLINT',
|
_int2: 'SMALLINT',
|
||||||
_int4: 'INTEGER',
|
_int4: 'INTEGER',
|
||||||
_int8: 'BIGINT',
|
_int8: 'BIGINT',
|
||||||
@@ -656,7 +656,7 @@ export class PostgreSQLClient extends BaseClient {
|
|||||||
let createSql = '';
|
let createSql = '';
|
||||||
const sequences = [];
|
const sequences = [];
|
||||||
const columnsSql = [];
|
const columnsSql = [];
|
||||||
const arrayTypes: {[key: string]: string} = {
|
const arrayTypes: Record<string, string> = {
|
||||||
_int2: 'smallint',
|
_int2: 'smallint',
|
||||||
_int4: 'integer',
|
_int4: 'integer',
|
||||||
_int8: 'bigint',
|
_int8: 'bigint',
|
||||||
|
@@ -658,7 +658,7 @@ export class SQLiteClient extends BaseClient {
|
|||||||
let queryAllResult: any[];
|
let queryAllResult: any[];
|
||||||
let affectedRows;
|
let affectedRows;
|
||||||
let fields;
|
let fields;
|
||||||
const detectedTypes: {[key: string]: string} = {};
|
const detectedTypes: Record<string, string> = {};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const stmt = connection.prepare(query);
|
const stmt = connection.prepare(query);
|
||||||
|
@@ -354,7 +354,7 @@ CREATE TABLE \`${view.Name}\`(
|
|||||||
escapeAndQuote (val: string) {
|
escapeAndQuote (val: string) {
|
||||||
// eslint-disable-next-line no-control-regex
|
// eslint-disable-next-line no-control-regex
|
||||||
const CHARS_TO_ESCAPE = /[\0\b\t\n\r\x1a"'\\]/g;
|
const CHARS_TO_ESCAPE = /[\0\b\t\n\r\x1a"'\\]/g;
|
||||||
const CHARS_ESCAPE_MAP: {[key: string]: string} = {
|
const CHARS_ESCAPE_MAP: Record<string, string> = {
|
||||||
'\0': '\\0',
|
'\0': '\\0',
|
||||||
'\b': '\\b',
|
'\b': '\\b',
|
||||||
'\t': '\\t',
|
'\t': '\\t',
|
||||||
|
@@ -59,7 +59,7 @@ SET row_security = off;\n\n\n`;
|
|||||||
let createSql = '';
|
let createSql = '';
|
||||||
const sequences = [];
|
const sequences = [];
|
||||||
const columnsSql = [];
|
const columnsSql = [];
|
||||||
const arrayTypes: {[key: string]: string} = {
|
const arrayTypes: Record<string, string> = {
|
||||||
_int2: 'smallint',
|
_int2: 'smallint',
|
||||||
_int4: 'integer',
|
_int4: 'integer',
|
||||||
_int8: 'bigint',
|
_int8: 'bigint',
|
||||||
@@ -440,7 +440,7 @@ SET row_security = off;\n\n\n`;
|
|||||||
escapeAndQuote (val: string) {
|
escapeAndQuote (val: string) {
|
||||||
// eslint-disable-next-line no-control-regex
|
// eslint-disable-next-line no-control-regex
|
||||||
const CHARS_TO_ESCAPE = /[\0\b\t\n\r\x1a"'\\]/g;
|
const CHARS_TO_ESCAPE = /[\0\b\t\n\r\x1a"'\\]/g;
|
||||||
const CHARS_ESCAPE_MAP: {[key: string]: string} = {
|
const CHARS_ESCAPE_MAP: Record<string, string> = {
|
||||||
'\0': '\\0',
|
'\0': '\\0',
|
||||||
'\b': '\\b',
|
'\b': '\\b',
|
||||||
'\t': '\\t',
|
'\t': '\\t',
|
||||||
|
@@ -56,8 +56,8 @@ const { t } = useI18n();
|
|||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
size: {
|
size: {
|
||||||
type: String as PropType<'small' | 'medium' | '400' | 'large'>,
|
type: String as PropType<'small' | 'medium' | '400' | 'large' | 'resize'>,
|
||||||
validator: (prop: string) => ['small', 'medium', '400', 'large'].includes(prop),
|
validator: (prop: string) => ['small', 'medium', '400', 'large', 'resize'].includes(prop),
|
||||||
default: 'small'
|
default: 'small'
|
||||||
},
|
},
|
||||||
hideFooter: {
|
hideFooter: {
|
||||||
@@ -88,6 +88,8 @@ const modalSizeClass = computed(() => {
|
|||||||
return 'modal-sm';
|
return 'modal-sm';
|
||||||
if (props.size === '400')
|
if (props.size === '400')
|
||||||
return 'modal-400';
|
return 'modal-400';
|
||||||
|
if (props.size === 'resize')
|
||||||
|
return 'modal-resize';
|
||||||
else if (props.size === 'large')
|
else if (props.size === 'large')
|
||||||
return 'modal-lg';
|
return 'modal-lg';
|
||||||
else return '';
|
else return '';
|
||||||
@@ -120,6 +122,12 @@ onBeforeUnmount(() => {
|
|||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal-resize .modal-container {
|
||||||
|
max-width: 95vw;
|
||||||
|
max-height: 95vh;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.modal.modal-sm .modal-container {
|
.modal.modal-sm .modal-container {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,11 @@
|
|||||||
:id="`editor-${id}`"
|
:id="`editor-${id}`"
|
||||||
class="editor"
|
class="editor"
|
||||||
:class="editorClass"
|
:class="editorClass"
|
||||||
:style="{height: `${height}px`}"
|
:style="{
|
||||||
|
height: `${height}px`,
|
||||||
|
width: width ? `${width}px` : null,
|
||||||
|
resize: resizable ? 'both' : 'none'
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -17,7 +21,7 @@ import 'ace-builds/webpack-resolver';
|
|||||||
|
|
||||||
import { uidGen } from 'common/libs/uidGen';
|
import { uidGen } from 'common/libs/uidGen';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { onMounted, watch } from 'vue';
|
import { PropType, onMounted, watch } from 'vue';
|
||||||
|
|
||||||
import { useSettingsStore } from '@/stores/settings';
|
import { useSettingsStore } from '@/stores/settings';
|
||||||
|
|
||||||
@@ -25,10 +29,12 @@ const props = defineProps({
|
|||||||
modelValue: String,
|
modelValue: String,
|
||||||
mode: { type: String, default: 'text' },
|
mode: { type: String, default: 'text' },
|
||||||
editorClass: { type: String, default: '' },
|
editorClass: { type: String, default: '' },
|
||||||
|
resizable: { type: Boolean, default: false },
|
||||||
autoFocus: { type: Boolean, default: false },
|
autoFocus: { type: Boolean, default: false },
|
||||||
readOnly: { type: Boolean, default: false },
|
readOnly: { type: Boolean, default: false },
|
||||||
showLineNumbers: { type: Boolean, default: true },
|
showLineNumbers: { type: Boolean, default: true },
|
||||||
height: { type: Number, default: 200 }
|
height: { type: Number, default: 200 },
|
||||||
|
width: { type: [Number, Boolean] as PropType<number|false>, default: false }
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['update:modelValue']);
|
const emit = defineEmits(['update:modelValue']);
|
||||||
const settingsStore = useSettingsStore();
|
const settingsStore = useSettingsStore();
|
||||||
@@ -132,8 +138,10 @@ onMounted(() => {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.editor-wrapper {
|
.editor-wrapper {
|
||||||
.editor {
|
.editor {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
height: 100%;
|
||||||
|
max-width: 90vw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -113,7 +113,7 @@ const selectedGroup: Ref<string> = ref('manual');
|
|||||||
const selectedMethod: Ref<string> = ref('');
|
const selectedMethod: Ref<string> = ref('');
|
||||||
const selectedValue: Ref<string> = ref('');
|
const selectedValue: Ref<string> = ref('');
|
||||||
const debounceTimeout: Ref<NodeJS.Timeout> = ref(null);
|
const debounceTimeout: Ref<NodeJS.Timeout> = ref(null);
|
||||||
const methodParams: Ref<{[key: string]: string}> = ref({});
|
const methodParams: Ref<Record<string, string>> = ref({});
|
||||||
const enumArray: Ref<string[]> = ref(null);
|
const enumArray: Ref<string[]> = ref(null);
|
||||||
|
|
||||||
const fakerGroups = computed(() => {
|
const fakerGroups = computed(() => {
|
||||||
|
@@ -73,7 +73,7 @@ const props = defineProps({
|
|||||||
const emit = defineEmits(['confirm', 'close']);
|
const emit = defineEmits(['confirm', 'close']);
|
||||||
|
|
||||||
const firstInput: Ref<HTMLInputElement[]> = ref(null);
|
const firstInput: Ref<HTMLInputElement[]> = ref(null);
|
||||||
const values: Ref<{[key: string]: string}> = ref({});
|
const values: Ref<Record<string, string>> = ref({});
|
||||||
|
|
||||||
const inParameters = computed(() => {
|
const inParameters = computed(() => {
|
||||||
return props.localRoutine.parameters.filter(param => param.context === 'IN');
|
return props.localRoutine.parameters.filter(param => param.context === 'IN');
|
||||||
|
@@ -327,7 +327,7 @@ const tables: Ref<{
|
|||||||
}[]> = ref([]);
|
}[]> = ref([]);
|
||||||
const options: Ref<Partial<ExportOptions>> = ref({
|
const options: Ref<Partial<ExportOptions>> = ref({
|
||||||
schema: selectedSchema.value,
|
schema: selectedSchema.value,
|
||||||
includes: {} as {[key: string]: boolean},
|
includes: {} as Record<string, boolean>,
|
||||||
outputFormat: 'sql' as 'sql' | 'sql.zip',
|
outputFormat: 'sql' as 'sql' | 'sql.zip',
|
||||||
sqlInsertAfter: 250,
|
sqlInsertAfter: 250,
|
||||||
sqlInsertDivider: 'bytes' as 'bytes' | 'rows'
|
sqlInsertDivider: 'bytes' as 'bytes' | 'rows'
|
||||||
|
@@ -142,7 +142,7 @@ const { getSelected: selectedWorkspace } = storeToRefs(workspacesStore);
|
|||||||
const { trapRef } = useFocusTrap({ disableAutofocus: true });
|
const { trapRef } = useFocusTrap({ disableAutofocus: true });
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const localRow: Ref<{[key: string]: any}> = ref({});
|
const localRow: Ref<Record<string, any>> = ref({});
|
||||||
const fieldsToExclude = ref([]);
|
const fieldsToExclude = ref([]);
|
||||||
const nInserts = ref(1);
|
const nInserts = ref(1);
|
||||||
const isInserting = ref(false);
|
const isInserting = ref(false);
|
||||||
@@ -225,7 +225,7 @@ const insertRows = async () => {
|
|||||||
delete rowToInsert[key];
|
delete rowToInsert[key];
|
||||||
});
|
});
|
||||||
|
|
||||||
const fieldTypes: {[key: string]: string} = {};
|
const fieldTypes: Record<string, string> = {};
|
||||||
props.fields.forEach(field => {
|
props.fields.forEach(field => {
|
||||||
fieldTypes[field.name] = field.type;
|
fieldTypes[field.name] = field.type;
|
||||||
});
|
});
|
||||||
@@ -290,7 +290,7 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
}, 50);
|
}, 50);
|
||||||
|
|
||||||
const rowObj: {[key: string]: unknown} = {};
|
const rowObj: Record<string, unknown> = {};
|
||||||
|
|
||||||
if (!props.rowToDuplicate) {
|
if (!props.rowToDuplicate) {
|
||||||
// Set default values
|
// Set default values
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<ConfirmModal
|
<ConfirmModal
|
||||||
size="medium"
|
size="resize"
|
||||||
:disable-autofocus="true"
|
:disable-autofocus="true"
|
||||||
:close-on-confirm="!!localNote.note.length"
|
:close-on-confirm="!!localNote.note.length"
|
||||||
:confirm-text="t('general.save')"
|
:confirm-text="t('general.save')"
|
||||||
@@ -52,6 +52,10 @@
|
|||||||
v-model="localNote.note"
|
v-model="localNote.note"
|
||||||
:mode="editorMode"
|
:mode="editorMode"
|
||||||
:show-line-numbers="false"
|
:show-line-numbers="false"
|
||||||
|
:auto-focus="true"
|
||||||
|
:height="400"
|
||||||
|
:width="640"
|
||||||
|
:resizable="true"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<ConfirmModal
|
<ConfirmModal
|
||||||
size="medium"
|
size="resize"
|
||||||
:disable-autofocus="true"
|
:disable-autofocus="true"
|
||||||
:close-on-confirm="!!newNote.note.length"
|
:close-on-confirm="!!newNote.note.length"
|
||||||
:confirm-text="t('general.save')"
|
:confirm-text="t('general.save')"
|
||||||
@@ -52,6 +52,10 @@
|
|||||||
v-model="newNote.note"
|
v-model="newNote.note"
|
||||||
:mode="editorMode"
|
:mode="editorMode"
|
||||||
:show-line-numbers="false"
|
:show-line-numbers="false"
|
||||||
|
:auto-focus="true"
|
||||||
|
:height="400"
|
||||||
|
:width="640"
|
||||||
|
:resizable="true"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -67,7 +67,7 @@ const props = defineProps({
|
|||||||
|
|
||||||
const emit = defineEmits(['select-row', 'contextmenu', 'stop-refresh']);
|
const emit = defineEmits(['select-row', 'contextmenu', 'stop-refresh']);
|
||||||
|
|
||||||
const isInlineEditor: Ref<{[key: string]: boolean}> = ref({});
|
const isInlineEditor: Ref<Record<string, boolean>> = ref({});
|
||||||
const isInfoModal = ref(false);
|
const isInfoModal = ref(false);
|
||||||
const editorMode = ref('sql');
|
const editorMode = ref('sql');
|
||||||
|
|
||||||
|
@@ -256,9 +256,9 @@ const highlightWord = (string: string) => {
|
|||||||
|
|
||||||
code, pre {
|
code, pre {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
width: 100%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
// color: $primary-color;
|
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
white-space: break-spaces;
|
white-space: break-spaces;
|
||||||
@@ -342,6 +342,8 @@ const highlightWord = (string: string) => {
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.tile-paragraph {
|
.tile-paragraph {
|
||||||
white-space: initial;
|
white-space: initial;
|
||||||
|
word-break: break-word;
|
||||||
|
user-select: text;
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6, p, li {
|
h1, h2, h3, h4, h5, h6, p, li {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@@ -32,7 +32,7 @@ const { removeNotification } = notificationsStore;
|
|||||||
const { notifications } = storeToRefs(notificationsStore);
|
const { notifications } = storeToRefs(notificationsStore);
|
||||||
const { notificationsTimeout } = storeToRefs(settingsStore);
|
const { notificationsTimeout } = storeToRefs(settingsStore);
|
||||||
|
|
||||||
const timeouts: Ref<{[key: string]: NodeJS.Timeout}> = ref({});
|
const timeouts: Ref<Record<string, NodeJS.Timeout>> = ref({});
|
||||||
|
|
||||||
const latestNotifications = computed(() => notifications.value.slice(0, 10));
|
const latestNotifications = computed(() => notifications.value.slice(0, 10));
|
||||||
|
|
||||||
|
@@ -695,7 +695,7 @@ const openAsPermanentTab = (tab: WorkspaceTab) => {
|
|||||||
routine: 'routine-props',
|
routine: 'routine-props',
|
||||||
procedure: 'routine-props',
|
procedure: 'routine-props',
|
||||||
scheduler: 'scheduler-props'
|
scheduler: 'scheduler-props'
|
||||||
} as {[key: string]: string};
|
} as Record<string, string>;
|
||||||
|
|
||||||
newTab({
|
newTab({
|
||||||
uid: props.connection.uid,
|
uid: props.connection.uid,
|
||||||
|
@@ -572,11 +572,11 @@ const pathSelection = (event: Event & {target: {files: {path: string}[]}}, name:
|
|||||||
const { files } = event.target;
|
const { files } = event.target;
|
||||||
if (!files.length) return;
|
if (!files.length) return;
|
||||||
|
|
||||||
(connection.value as unknown as {[key: string]: string})[name] = files[0].path as string;
|
(connection.value as unknown as Record<string, string>)[name] = files[0].path as string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const pathClear = (name: keyof ConnectionParams) => {
|
const pathClear = (name: keyof ConnectionParams) => {
|
||||||
(connection.value as unknown as {[key: string]: string})[name] = '';
|
(connection.value as unknown as Record<string, string>)[name] = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
setDefaults();
|
setDefaults();
|
||||||
|
@@ -569,11 +569,11 @@ const pathSelection = (event: Event & {target: {files: {path: string}[]}}, name:
|
|||||||
const { files } = event.target;
|
const { files } = event.target;
|
||||||
if (!files.length) return;
|
if (!files.length) return;
|
||||||
|
|
||||||
(localConnection.value as unknown as {[key: string]: string})[name] = files[0].path;
|
(localConnection.value as unknown as Record<string, string>)[name] = files[0].path;
|
||||||
};
|
};
|
||||||
|
|
||||||
const pathClear = (name: keyof ConnectionParams) => {
|
const pathClear = (name: keyof ConnectionParams) => {
|
||||||
(localConnection.value as unknown as {[key: string]: string})[name] = '';
|
(localConnection.value as unknown as Record<string, string>)[name] = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
localConnection.value = JSON.parse(JSON.stringify(props.connection));
|
localConnection.value = JSON.parse(JSON.stringify(props.connection));
|
||||||
|
@@ -382,7 +382,7 @@ const getFieldsData = async () => {
|
|||||||
if (status === 'success') {
|
if (status === 'success') {
|
||||||
const indexesObj = response
|
const indexesObj = response
|
||||||
.filter((index: TableIndex) => index.type !== 'FOREIGN KEY')
|
.filter((index: TableIndex) => index.type !== 'FOREIGN KEY')
|
||||||
.reduce((acc: {[key: string]: TableIndex[]}, curr: TableIndex) => {
|
.reduce((acc: Record<string, TableIndex[]>, curr: TableIndex) => {
|
||||||
acc[curr.name] = acc[curr.name] || [];
|
acc[curr.name] = acc[curr.name] || [];
|
||||||
acc[curr.name].push(curr);
|
acc[curr.name].push(curr);
|
||||||
return acc;
|
return acc;
|
||||||
|
@@ -258,7 +258,7 @@ const indexesPanel: Ref<HTMLDivElement> = ref(null);
|
|||||||
const foreignProxy = ref([]);
|
const foreignProxy = ref([]);
|
||||||
const selectedForeignID = ref('');
|
const selectedForeignID = ref('');
|
||||||
const modalInnerHeight = ref(400);
|
const modalInnerHeight = ref(400);
|
||||||
const refFields = ref({} as {[key: string]: TableField[]});
|
const refFields = ref({} as Record<string, TableField[]>);
|
||||||
|
|
||||||
const foreignActions = computed(() => props.workspace.customizations.foreignActions);
|
const foreignActions = computed(() => props.workspace.customizations.foreignActions);
|
||||||
const selectedForeignObj = computed(() => foreignProxy.value.find(foreign => foreign._antares_id === selectedForeignID.value));
|
const selectedForeignObj = computed(() => foreignProxy.value.find(foreign => foreign._antares_id === selectedForeignID.value));
|
||||||
|
@@ -28,7 +28,7 @@ export function useFilters () {
|
|||||||
return `(${num})`;
|
return `(${num})`;
|
||||||
};
|
};
|
||||||
|
|
||||||
const parseKeys = (keys: {[key: number]: string}[]) => {
|
const parseKeys = (keys: Record<number, string>[]) => {
|
||||||
const isMacOS = process.platform === 'darwin';
|
const isMacOS = process.platform === 'darwin';
|
||||||
return (keys as string[]).map(k => (
|
return (keys as string[]).map(k => (
|
||||||
k.split('+')
|
k.split('+')
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
export const localesNames: {[key: string]: string} = {
|
export const localesNames: Record<string, string> = {
|
||||||
'en-US': 'English',
|
'en-US': 'English',
|
||||||
'it-IT': 'Italiano',
|
'it-IT': 'Italiano',
|
||||||
'ar-SA': 'العربية',
|
'ar-SA': 'العربية',
|
||||||
|
@@ -64,7 +64,7 @@ export default class {
|
|||||||
primary?: string;
|
primary?: string;
|
||||||
field: string;
|
field: string;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
rows: {[key: string]: any};
|
rows: Record<string, any>;
|
||||||
}): Promise<IpcResponse> {
|
}): Promise<IpcResponse> {
|
||||||
return ipcRenderer.invoke('delete-table-rows', unproxify(params));
|
return ipcRenderer.invoke('delete-table-rows', unproxify(params));
|
||||||
}
|
}
|
||||||
@@ -73,9 +73,9 @@ export default class {
|
|||||||
uid: string;
|
uid: string;
|
||||||
schema: string;
|
schema: string;
|
||||||
table: string;
|
table: string;
|
||||||
row: {[key: string]: string | number | boolean | Date | Buffer};
|
row: Record<string, string | number | boolean | Date | Buffer>;
|
||||||
repeat: number;
|
repeat: number;
|
||||||
fields: {[key: string]: string};
|
fields: Record<string, string>;
|
||||||
locale: string;
|
locale: string;
|
||||||
}): Promise<IpcResponse> {
|
}): Promise<IpcResponse> {
|
||||||
return ipcRenderer.invoke('insert-table-fake-rows', unproxify(params));
|
return ipcRenderer.invoke('insert-table-fake-rows', unproxify(params));
|
||||||
|
@@ -13,7 +13,7 @@ export interface HistoryRecord {
|
|||||||
|
|
||||||
export const useHistoryStore = defineStore('history', {
|
export const useHistoryStore = defineStore('history', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
history: persistentStore.get('history', {}) as {[key: string]: HistoryRecord[]},
|
history: persistentStore.get('history', {}) as Record<string, HistoryRecord[]>,
|
||||||
favorites: persistentStore.get('favorites', {})
|
favorites: persistentStore.get('favorites', {})
|
||||||
}),
|
}),
|
||||||
getters: {
|
getters: {
|
||||||
|
@@ -86,11 +86,11 @@ export interface Workspace {
|
|||||||
arch: string;
|
arch: string;
|
||||||
os: string;
|
os: string;
|
||||||
};
|
};
|
||||||
engines?: {[key: string]: string | boolean | number}[];
|
engines?: Record<string, string | boolean | number>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const persistentStore = new Store({ name: 'tabs' });
|
const persistentStore = new Store({ name: 'tabs' });
|
||||||
const tabIndex: {[key: string]: number} = {};
|
const tabIndex: Record<string, number> = {};
|
||||||
|
|
||||||
export const useWorkspacesStore = defineStore('workspaces', {
|
export const useWorkspacesStore = defineStore('workspaces', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
|
Reference in New Issue
Block a user