diff --git a/README.md b/README.md index f9a6fbf2..8fb92015 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ # Antares SQL Client -![GitHub package.json version](https://img.shields.io/github/package-json/v/fabio286/antares) ![GitHub](https://img.shields.io/github/license/fabio286/antares) [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Ffabio286%2Fantares%2Fbadge&style=flat)](https://actions-badge.atrox.dev/fabio286/antares/goto) [![antares](https://snapcraft.io/antares/badge.svg)](https://snapcraft.io/antares) [![antares](https://snapcraft.io/antares/trending.svg?name=0)](https://snapcraft.io/antares) [![Twitter Follow](https://img.shields.io/twitter/follow/AntaresSQL?style=social)](https://twitter.com/AntaresSQL) [![Plant a Tree](https://raw.githubusercontent.com/Fabio286/treedom-badge/master/svg/plant-a-tree.svg)](https://www.treedom.net/en/user/fabio-di-stasio/event/antares-for-the-planet) +![GitHub package.json version](https://img.shields.io/github/package-json/v/fabio286/antares) ![GitHub](https://img.shields.io/github/license/fabio286/antares) [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Ffabio286%2Fantares%2Fbadge&style=flat)](https://actions-badge.atrox.dev/fabio286/antares/goto) [![antares](https://snapcraft.io/antares/badge.svg)](https://snapcraft.io/antares) [![antares](https://snapcraft.io/antares/trending.svg?name=0)](https://snapcraft.io/antares) +![Mastodon Follow](https://img.shields.io/mastodon/follow/%20110860460902482117?domain=https%3A%2F%2Ffosstodon.org&style=social) [![Twitter Follow](https://img.shields.io/twitter/follow/AntaresSQL?style=social)](https://twitter.com/AntaresSQL) [![Plant a Tree](https://raw.githubusercontent.com/Fabio286/treedom-badge/master/svg/plant-a-tree.svg)](https://www.treedom.net/en/user/fabio-di-stasio/event/antares-for-the-planet) Antares is an SQL client based on [Electron.js](https://github.com/electron/electron) and [Vue.js](https://github.com/vuejs/vue) that aims to become a useful tool, especially for developers. Our target is to support as many databases as possible, and all major operating systems, including the ARM versions. @@ -17,7 +18,7 @@ However, there are all the features necessary to have a pleasant database manage We are actively working on it, hoping to provide new cool features, improvements and fixes as soon as possible. 🔗 If you are curious to try Antares you can download and install the [latest release](https://github.com/Fabio286/antares/releases/latest). -👁 To stay tuned for new releases [follow Antares SQL](https://twitter.com/AntaresSQL) on Twitter. +👁 To stay tuned for new releases follow Antares SQL on [Mastodon](https://fosstodon.org/@AntaresSQL) or [Twitter](https://twitter.com/AntaresSQL). 🌟 Don't forget to **leave a star** if you appreciate this project. 🗳️ Polls: diff --git a/package-lock.json b/package-lock.json index 25fdd969..a76a9b18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "leaflet": "~1.7.1", "marked": "~4.0.19", "moment": "~2.29.4", - "mysql2": "~2.3.2", + "mysql2": "~3.5.2", "node-firebird": "~1.1.4", "pg": "~8.11.1", "pg-connection-string": "~2.5.0", @@ -89,6 +89,7 @@ "stylelint-scss": "~4.3.0", "tree-kill": "~1.2.2", "ts-loader": "~9.2.8", + "ts-node": "~10.9.1", "typescript": "~4.6.3", "unzip-crx-3": "~0.2.0", "vue-eslint-parser": "~8.3.0", @@ -1697,6 +1698,28 @@ "node": ">=6.9.0" } }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@csstools/selector-specificity": { "version": "2.2.0", "dev": true, @@ -2148,6 +2171,30 @@ "node": ">=10" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, "node_modules/@turf/helpers": { "version": "6.5.0", "license": "MIT", @@ -3116,6 +3163,15 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/add-stream": { "version": "1.0.0", "dev": true, @@ -3387,6 +3443,12 @@ "dev": true, "license": "ISC" }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "node_modules/argparse": { "version": "2.0.1", "license": "Python-2.0" @@ -4881,6 +4943,12 @@ "node": ">=10.0.0" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "node_modules/cross-env": { "version": "7.0.3", "dev": true, @@ -5279,6 +5347,15 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/dir-compare": { "version": "2.4.0", "dev": true, @@ -9170,6 +9247,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "node_modules/map-obj": { "version": "4.3.0", "dev": true, @@ -9664,15 +9747,16 @@ "license": "ISC" }, "node_modules/mysql2": { - "version": "2.3.3", - "license": "MIT", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.5.2.tgz", + "integrity": "sha512-cptobmhYkYeTBIFp2c0piw2+gElpioga1rUw5UidHvo8yaHijMZoo8A3zyBVoo/K71f7ZFvrShA9iMIy9dCzCA==", "dependencies": { - "denque": "^2.0.1", + "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.6.3", - "long": "^4.0.0", - "lru-cache": "^6.0.0", - "named-placeholders": "^1.1.2", + "long": "^5.2.1", + "lru-cache": "^8.0.0", + "named-placeholders": "^1.1.3", "seq-queue": "^0.0.5", "sqlstring": "^2.3.2" }, @@ -9680,19 +9764,18 @@ "node": ">= 8.0" } }, - "node_modules/mysql2/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } + "node_modules/mysql2/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, - "node_modules/mysql2/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" + "node_modules/mysql2/node_modules/lru-cache": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", + "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", + "engines": { + "node": ">=16.14" + } }, "node_modules/named-placeholders": { "version": "1.1.3", @@ -13635,6 +13718,61 @@ "dev": true, "license": "ISC" }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/tsconfig-paths": { "version": "3.14.2", "dev": true, @@ -14015,6 +14153,12 @@ "dev": true, "license": "MIT" }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "dev": true, @@ -14940,6 +15084,15 @@ "fd-slicer": "~1.1.0" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "dev": true, diff --git a/package.json b/package.json index cb6e143b..2d9eef5a 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "release:beta": "npm run release -- --prerelease beta", "devtools:install": "node scripts/devtoolsInstaller", "postinstall": "electron-builder install-app-deps", + "translation:check": "ts-node ./scripts/translationCheck.ts", "test:e2e": "npm run compile && npm run test:e2e-dry", "test:e2e-dry": "xvfb-maybe -- playwright test", "lint": "eslint . --ext .js,.ts,.vue && stylelint \"./src/**/*.{css,scss,sass,vue}\"", @@ -66,6 +67,7 @@ "target": "deb", "arch": [ "x64", + "arm64", "armv7l" ] }, @@ -73,6 +75,7 @@ "target": "AppImage", "arch": [ "x64", + "arm64", "armv7l" ] } @@ -134,7 +137,7 @@ "leaflet": "~1.7.1", "marked": "~4.0.19", "moment": "~2.29.4", - "mysql2": "~2.3.2", + "mysql2": "~3.5.2", "node-firebird": "~1.1.4", "pg": "~8.11.1", "pg-connection-string": "~2.5.0", @@ -196,6 +199,7 @@ "stylelint-scss": "~4.3.0", "tree-kill": "~1.2.2", "ts-loader": "~9.2.8", + "ts-node": "~10.9.1", "typescript": "~4.6.3", "unzip-crx-3": "~0.2.0", "vue-eslint-parser": "~8.3.0", diff --git a/scripts/translationCheck.ts b/scripts/translationCheck.ts new file mode 100644 index 00000000..09a74ed4 --- /dev/null +++ b/scripts/translationCheck.ts @@ -0,0 +1,45 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import { localesNames } from '../src/renderer/i18n/supported-locales'; +import { enUS } from '../src/renderer/i18n/en-US'; +const locale = process.argv[2]; +let fullCount = 0; +let checkCount = 0; + +if (!locale) { + console.log('Please specify locale code as first argument.'); + process.exit(); +} + +if (!Object.keys(localesNames).includes(locale)) { + console.log(`Translation ${locale} not fount in supported locales.`); + process.exit(); +} + +console.log('Checking missing translations for:', locale); + +const i18nFile = require(`../src/renderer/i18n/${locale}`)[locale.replace('-', '')]; + +for (const group in enUS) { + // @ts-ignore + fullCount += Object.keys(enUS[group]).length; + + if (!Object.keys(i18nFile).includes(group)) { + console.log(`Group "\u001b[31m${group}\u001b[0m" missing!`); + continue; + } + + // @ts-ignore + for (const term in enUS[group]) { + if (!Object.keys(i18nFile[group]).includes(term)) + console.log(`Translation "\u001b[33m${group}.${term}\u001b[0m" missing!`); + // @ts-ignore + else if (i18nFile[group][term] === enUS[group][term]) { + console.log(`Term "\u001b[36m${group}.${term}\u001b[0m" not translated!`); + checkCount++; + } + else + checkCount++; + } +} + +console.log(checkCount, 'of', fullCount, 'strings are present in', locale, `(\u001b[32m${(checkCount*100/fullCount).toFixed(1)}%\u001b[0m)`); diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 701d2131..40c6f48a 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -4,7 +4,7 @@ summary: Open source SQL client made to be simple and complete. description: | Antares is an SQL client that aims to become an useful and complete tool, especially for developers. The target is to support as many databases as possible, and all major operating systems, including the ARM versions. -base: core20 +base: core22 grade: stable confinement: strict @@ -119,10 +119,10 @@ parts: cleanup: after: [antares] plugin: nil - build-snaps: [gnome-3-38-2004] + build-snaps: [gnome-42-2204] override-prime: | set -eux - cd /snap/gnome-3-38-2004/current + cd /snap/gnome-42-2204/current find . -type f,l -exec rm -f $SNAPCRAFT_PRIME/{} \; mdns-lookup: @@ -136,7 +136,7 @@ parts: - libnss-mdns override-prime: | set -eux - sed -Ee 's/^\s*hosts:(\s+)files/hosts:\1files mdns4_minimal \[NOTFOUND=return\]/' /snap/core20/current/etc/nsswitch.conf > $SNAPCRAFT_STAGE/etc/nsswitch.conf + sed -Ee 's/^\s*hosts:(\s+)files/hosts:\1files mdns4_minimal \[NOTFOUND=return\]/' /snap/core22/current/etc/nsswitch.conf > $SNAPCRAFT_STAGE/etc/nsswitch.conf snapcraftctl prime prime: - lib/$SNAPCRAFT_ARCH_TRIPLET/libnss_mdns4_minimal* @@ -146,10 +146,7 @@ apps: antares: command: opt/Antares/antares --no-sandbox desktop: usr/share/applications/antares.desktop - extensions: [gnome-3-38] - environment: - # Fallback to XWayland if running in a Wayland session. - DISABLE_WAYLAND: 1 + extensions: [gnome] plugs: - browser-support - cups-control diff --git a/src/common/shortcuts.ts b/src/common/shortcuts.ts index 46822cfe..0f63517c 100644 --- a/src/common/shortcuts.ts +++ b/src/common/shortcuts.ts @@ -1,22 +1,22 @@ export const shortcutEvents: { [key: string]: { l18n: string; l18nParam?: string | number; context?: 'tab' }} = { - 'run-or-reload': { l18n: 'message.runOrReload', context: 'tab' }, - 'open-new-tab': { l18n: 'message.openNewTab', context: 'tab' }, - 'close-tab': { l18n: 'message.closeTab', context: 'tab' }, - 'format-query': { l18n: 'message.formatQuery', context: 'tab' }, - 'kill-query': { l18n: 'message.killQuery', context: 'tab' }, - 'query-history': { l18n: 'message.queryHistory', context: 'tab' }, - 'clear-query': { l18n: 'message.clearQuery', context: 'tab' }, - 'next-tab': { l18n: 'message.nextTab' }, - 'prev-tab': { l18n: 'message.previousTab' }, - 'open-all-connections': { l18n: 'message.openAllConnections' }, - 'open-filter': { l18n: 'message.openFilter' }, - 'next-page': { l18n: 'message.nextResultsPage' }, - 'prev-page': { l18n: 'message.previousResultsPage' }, - 'toggle-console': { l18n: 'message.toggleConsole' }, - 'save-content': { l18n: 'message.saveContent' }, - 'create-connection': { l18n: 'message.createNewConnection' }, - 'open-settings': { l18n: 'message.openSettings' }, - 'open-scratchpad': { l18n: 'message.openScratchpad' } + 'run-or-reload': { l18n: 'application.runOrReload', context: 'tab' }, + 'open-new-tab': { l18n: 'application.openNewTab', context: 'tab' }, + 'close-tab': { l18n: 'application.closeTab', context: 'tab' }, + 'format-query': { l18n: 'database.formatQuery', context: 'tab' }, + 'kill-query': { l18n: 'database.killQuery', context: 'tab' }, + 'query-history': { l18n: 'database.queryHistory', context: 'tab' }, + 'clear-query': { l18n: 'database.clearQuery', context: 'tab' }, + 'next-tab': { l18n: 'application.nextTab' }, + 'prev-tab': { l18n: 'application.previousTab' }, + 'open-all-connections': { l18n: 'application.openAllConnections' }, + 'open-filter': { l18n: 'application.openFilter' }, + 'next-page': { l18n: 'application.nextResultsPage' }, + 'prev-page': { l18n: 'application.previousResultsPage' }, + 'toggle-console': { l18n: 'application.toggleConsole' }, + 'save-content': { l18n: 'application.saveContent' }, + 'create-connection': { l18n: 'connection.createNewConnection' }, + 'open-settings': { l18n: 'application.openSettings' }, + 'open-scratchpad': { l18n: 'application.openScratchpad' } }; interface ShortcutRecord { @@ -124,7 +124,7 @@ const shortcuts: ShortcutRecord[] = [ for (let i = 1; i <= 9; i++) { shortcutEvents[`select-tab-${i}`] = { - l18n: 'message.selectTabNumber', + l18n: 'application.selectTabNumber', l18nParam: i }; diff --git a/src/main/libs/importers/sql/MySQLlImporter.ts b/src/main/libs/importers/sql/MySQLlImporter.ts index 51c8e418..9888e0d0 100644 --- a/src/main/libs/importers/sql/MySQLlImporter.ts +++ b/src/main/libs/importers/sql/MySQLlImporter.ts @@ -47,7 +47,7 @@ export default class MySQLImporter extends BaseImporter { catch (error) { this.emit('query-error', { sql: query, - message: error.sqlMessage, + message: error.sqlMessage || error.message, sqlSnippet: error.sql, time: new Date().getTime() }); diff --git a/src/renderer/App.vue b/src/renderer/App.vue index 3d3b720f..5686c4dd 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -21,7 +21,15 @@ - + + + @@ -33,9 +41,11 @@ import { useI18n } from 'vue-i18n'; import { Menu, getCurrentWindow } from '@electron/remote'; import { useApplicationStore } from '@/stores/application'; import { useConnectionsStore } from '@/stores/connections'; +import { useSchemaExportStore } from '@/stores/schemaExport'; import { useSettingsStore } from '@/stores/settings'; import { useWorkspacesStore } from '@/stores/workspaces'; import TheSettingBar from '@/components/TheSettingBar.vue'; +import ModalExportSchema from '@/components/ModalExportSchema.vue'; const { t } = useI18n(); @@ -65,6 +75,10 @@ const { getSelected: selectedWorkspace } = storeToRefs(workspacesStore); const { checkVersionUpdate } = applicationStore; const { changeApplicationTheme } = settingsStore; +const schemaExportStore = useSchemaExportStore(); +const { hideExportModal } = schemaExportStore; +const { isExportModal: isExportSchemaModal } = storeToRefs(schemaExportStore); + const isAllConnectionsModal: Ref = ref(false); document.addEventListener('DOMContentLoaded', () => { @@ -95,22 +109,22 @@ onMounted(() => { const InputMenu = Menu.buildFromTemplate([ { - label: t('word.cut'), + label: t('general.cut'), role: 'cut' }, { - label: t('word.copy'), + label: t('general.copy'), role: 'copy' }, { - label: t('word.paste'), + label: t('general.paste'), role: 'paste' }, { type: 'separator' }, { - label: t('message.selectAll'), + label: t('general.selectAll'), role: 'selectAll' } ]); diff --git a/src/renderer/components/BaseConfirmModal.vue b/src/renderer/components/BaseConfirmModal.vue index 76481f79..61a98278 100644 --- a/src/renderer/components/BaseConfirmModal.vue +++ b/src/renderer/components/BaseConfirmModal.vue @@ -31,13 +31,13 @@ class="btn btn-primary mr-2" @click.stop="confirmModal" > - {{ confirmText || t('word.confirm') }} + {{ confirmText || t('general.confirm') }} diff --git a/src/renderer/components/FakerSelect.vue b/src/renderer/components/FakerSelect.vue index 49385bd3..8aea2fb3 100644 --- a/src/renderer/components/FakerSelect.vue +++ b/src/renderer/components/FakerSelect.vue @@ -4,7 +4,7 @@ v-model="selectedGroup" class="form-select" :options="[{name: 'manual'}, ...fakerGroups]" - :option-label="(opt: any) => opt.name === 'manual' ? t('message.manualValue') : t(`faker.${opt.name}`)" + :option-label="(opt: any) => opt.name === 'manual' ? t('general.manualValue') : t(`faker.${opt.name}`)" option-track-by="name" :disabled="!isChecked" :style="'flex-grow: 0;'" @@ -41,7 +41,7 @@ diff --git a/src/renderer/components/KeyPressDetector.vue b/src/renderer/components/KeyPressDetector.vue index 283f6c96..df89eac5 100644 --- a/src/renderer/components/KeyPressDetector.vue +++ b/src/renderer/components/KeyPressDetector.vue @@ -4,7 +4,7 @@ class="form-input" type="text" :value="pressedKeys" - :placeholder="t('message.registerAShortcut')" + :placeholder="t('application.registerAShortcut')" @focus="isFocus = true" @blur="isFocus = false" @keydown.prevent.stop="onKey" @@ -49,7 +49,7 @@ const pressedKeys = computed(() => { keys.push('Shift'); if (keyboardEvent.value.code) { if (keys.length === 0 && (keyboardEvent.value.key.length === 1 || singleKeysToIgnore.includes(keyboardEvent.value.key))) - return t('message.invalidShortcutMessage'); + return t('application.invalidShortcutMessage'); else if (!specialKeys.includes(keyboardEvent.value.key)) { if (keyboardEvent.value.key === 'Dead') { keys.push(keyboardEvent.value.code @@ -82,7 +82,7 @@ const pressedKeys = computed(() => { } } else - return t('message.invalidShortcutMessage'); + return t('application.invalidShortcutMessage'); } } @@ -96,7 +96,7 @@ const onKey = (e: KeyboardEvent) => { }; watch(pressedKeys, (value) => { - if (value !== t('message.invalidShortcutMessage')) + if (value !== t('application.invalidShortcutMessage')) emit('update:modelValue', pressedKeys.value); }); diff --git a/src/renderer/components/ModalAllConnections.vue b/src/renderer/components/ModalAllConnections.vue index 16bd4131..3cadbaed 100644 --- a/src/renderer/components/ModalAllConnections.vue +++ b/src/renderer/components/ModalAllConnections.vue @@ -7,7 +7,7 @@ @@ -21,7 +21,7 @@ v-model="searchTerm" class="form-input" type="text" - :placeholder="t('message.searchForConnections')" + :placeholder="t('connection.searchForConnections')" @keypress.esc="searchTerm = ''" > @@ -58,7 +58,7 @@
@@ -130,12 +130,12 @@ > diff --git a/src/renderer/components/ModalAskCredentials.vue b/src/renderer/components/ModalAskCredentials.vue index d3f6f850..d506f086 100644 --- a/src/renderer/components/ModalAskCredentials.vue +++ b/src/renderer/components/ModalAskCredentials.vue @@ -6,7 +6,7 @@