mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
7537dff401 | |||
853ee1f572 | |||
cf9c7c600a | |||
73b88cad9e | |||
d2eb31a63d | |||
d6b36b1f80 | |||
|
d66b932683 | ||
20f5497034 | |||
d4ed886489 | |||
|
aaa14f112a | ||
|
e0f3ff6939 | ||
72a328785c | |||
4c2a1998a9 | |||
8e705706ae | |||
56b0a4815c | |||
a9a4344a71 | |||
ec5ab73b19 | |||
71a5b5c828 | |||
a703dcc53e | |||
36e98e0742 | |||
f632a0f189 |
23
CHANGELOG.md
23
CHANGELOG.md
@@ -2,6 +2,29 @@
|
||||
|
||||
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.5.9](https://github.com/antares-sql/antares/compare/v0.5.8...v0.5.9) (2022-07-06)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* ability to pin/unpin and delete connections from the "all connections" modal ([8e70570](https://github.com/antares-sql/antares/commit/8e705706aecc5c9790329e63e61a1c02fa5d0342))
|
||||
* connections sorted by last usage by default and option to pin them ([36e98e0](https://github.com/antares-sql/antares/commit/36e98e0742657e25df7768aa5b3b7cb350df5509))
|
||||
* ctrl/cmd+space to open all connections modal ([a9a4344](https://github.com/antares-sql/antares/commit/a9a4344a71cc0f8f156b839733f6ddc200a26268))
|
||||
* modal with all connections ([a703dcc](https://github.com/antares-sql/antares/commit/a703dcc53eb920117bc346a3c21f0c729c0ad96d))
|
||||
* option to disable scratchpad ([56b0a48](https://github.com/antares-sql/antares/commit/56b0a4815c6f54eef164d849f6ca25af1e142b16))
|
||||
* search form in all connections modal ([ec5ab73](https://github.com/antares-sql/antares/commit/ec5ab73b19d99e9971ae87e5f0a8d1bd1c34ef00))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* error on export schema ([cf9c7c6](https://github.com/antares-sql/antares/commit/cf9c7c600aa915cef1ec3777866badb7ab1312ee))
|
||||
* missing option for untrusted ssl connection on connections edit panel ([71a5b5c](https://github.com/antares-sql/antares/commit/71a5b5c8285fb777c43e7f6516006bfe9f52591c))
|
||||
|
||||
|
||||
### Improvements
|
||||
|
||||
* **UI:** improved focus visibility for buttons ([d2eb31a](https://github.com/antares-sql/antares/commit/d2eb31a63d612323f8738eded1e1ce7b23554001))
|
||||
|
||||
### [0.5.8](https://github.com/antares-sql/antares/compare/v0.5.7...v0.5.8) (2022-07-02)
|
||||
|
||||
|
||||
|
362
package-lock.json
generated
362
package-lock.json
generated
@@ -1,22 +1,23 @@
|
||||
{
|
||||
"name": "antares",
|
||||
"version": "0.5.8",
|
||||
"version": "0.5.9",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "antares",
|
||||
"version": "0.5.8",
|
||||
"version": "0.5.9",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@electron/remote": "~2.0.1",
|
||||
"@faker-js/faker": "~6.1.2",
|
||||
"@mdi/font": "~6.1.95",
|
||||
"@mdi/font": "~6.9.96",
|
||||
"@turf/helpers": "~6.5.0",
|
||||
"@vscode/vscode-languagedetection": "~1.0.21",
|
||||
"@vueuse/core": "~8.7.5",
|
||||
"ace-builds": "~1.4.13",
|
||||
"better-sqlite3": "~7.5.0",
|
||||
"better-sqlite3": "~7.5.1",
|
||||
"electron-log": "~4.4.1",
|
||||
"electron-store": "~8.0.1",
|
||||
"electron-updater": "~4.6.5",
|
||||
@@ -35,7 +36,7 @@
|
||||
"sql-formatter": "~4.0.2",
|
||||
"ssh2-promise": "~1.0.2",
|
||||
"v-mask": "~2.3.0",
|
||||
"vue": "~3.2.33",
|
||||
"vue": "~3.2.37",
|
||||
"vue-i18n": "~9.1.9",
|
||||
"vuedraggable": "~4.1.0"
|
||||
},
|
||||
@@ -2278,9 +2279,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@mdi/font": {
|
||||
"version": "6.1.95",
|
||||
"resolved": "https://registry.npmjs.org/@mdi/font/-/font-6.1.95.tgz",
|
||||
"integrity": "sha512-L3cg9qoUEp5MZHvu6rtuobTtPBmq0ATau5ZrHmsaE6gCRs90T4JBWyzV8WCMEjZoy5+zA+/cvtCUtD/+WVaQ9Q=="
|
||||
"version": "6.9.96",
|
||||
"resolved": "https://registry.npmjs.org/@mdi/font/-/font-6.9.96.tgz",
|
||||
"integrity": "sha512-z3QVZStyHVwkDsFR7A7F2PIvZJPWgdSFw4BEEy2Gc9HUN5NfK9mGbjgaYClRcbMWiYEV45srmiYtczmBtCqR8w=="
|
||||
},
|
||||
"node_modules/@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
@@ -2872,6 +2873,11 @@
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/@types/web-bluetooth": {
|
||||
"version": "0.0.14",
|
||||
"resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.14.tgz",
|
||||
"integrity": "sha512-5d2RhCard1nQUC3aHcq/gHzWYO6K0WJmAbjO7mQJgCQKtZpgXxv1rOM6O/dBDhDYYVutk1sciOgNSe+5YyfM8A=="
|
||||
},
|
||||
"node_modules/@types/yargs": {
|
||||
"version": "16.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz",
|
||||
@@ -3099,36 +3105,36 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-core": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.33.tgz",
|
||||
"integrity": "sha512-AAmr52ji3Zhk7IKIuigX2osWWsb2nQE5xsdFYjdnmtQ4gymmqXbjLvkSE174+fF3A3kstYrTgGkqgOEbsdLDpw==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.37.tgz",
|
||||
"integrity": "sha512-81KhEjo7YAOh0vQJoSmAD68wLfYqJvoiD4ulyedzF+OEk/bk6/hx3fTNVfuzugIIaTrOx4PGx6pAiBRe5e9Zmg==",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.16.4",
|
||||
"@vue/shared": "3.2.33",
|
||||
"@vue/shared": "3.2.37",
|
||||
"estree-walker": "^2.0.2",
|
||||
"source-map": "^0.6.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-dom": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.33.tgz",
|
||||
"integrity": "sha512-GhiG1C8X98Xz9QUX/RlA6/kgPBWJkjq0Rq6//5XTAGSYrTMBgcLpP9+CnlUg1TFxnnCVughAG+KZl28XJqw8uQ==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.37.tgz",
|
||||
"integrity": "sha512-yxJLH167fucHKxaqXpYk7x8z7mMEnXOw3G2q62FTkmsvNxu4FQSu5+3UMb+L7fjKa26DEzhrmCxAgFLLIzVfqQ==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-core": "3.2.33",
|
||||
"@vue/shared": "3.2.33"
|
||||
"@vue/compiler-core": "3.2.37",
|
||||
"@vue/shared": "3.2.37"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-sfc": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.33.tgz",
|
||||
"integrity": "sha512-H8D0WqagCr295pQjUYyO8P3IejM3vEzeCO1apzByAEaAR/WimhMYczHfZVvlCE/9yBaEu/eu9RdiWr0kF8b71Q==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.37.tgz",
|
||||
"integrity": "sha512-+7i/2+9LYlpqDv+KTtWhOZH+pa8/HnX/905MdVmAcI/mPQOBwkHHIzrsEsucyOIZQYMkXUiTkmZq5am/NyXKkg==",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.16.4",
|
||||
"@vue/compiler-core": "3.2.33",
|
||||
"@vue/compiler-dom": "3.2.33",
|
||||
"@vue/compiler-ssr": "3.2.33",
|
||||
"@vue/reactivity-transform": "3.2.33",
|
||||
"@vue/shared": "3.2.33",
|
||||
"@vue/compiler-core": "3.2.37",
|
||||
"@vue/compiler-dom": "3.2.37",
|
||||
"@vue/compiler-ssr": "3.2.37",
|
||||
"@vue/reactivity-transform": "3.2.37",
|
||||
"@vue/shared": "3.2.37",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.25.7",
|
||||
"postcss": "^8.1.10",
|
||||
@@ -3136,12 +3142,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-ssr": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.33.tgz",
|
||||
"integrity": "sha512-XQh1Xdk3VquDpXsnoCd7JnMoWec9CfAzQDQsaMcSU79OrrO2PNR0ErlIjm/mGq3GmBfkQjzZACV+7GhfRB8xMQ==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.37.tgz",
|
||||
"integrity": "sha512-7mQJD7HdXxQjktmsWp/J67lThEIcxLemz1Vb5I6rYJHR5vI+lON3nPGOH3ubmbvYGt8xEUaAr1j7/tIFWiEOqw==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.2.33",
|
||||
"@vue/shared": "3.2.33"
|
||||
"@vue/compiler-dom": "3.2.37",
|
||||
"@vue/shared": "3.2.37"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/devtools-api": {
|
||||
@@ -3150,60 +3156,117 @@
|
||||
"integrity": "sha512-IiA0SvDrJEgXvVxjNkHPFfDx6SXw0b/TUkqMcDZWNg9fnCAHbTpoo59YfJ9QLFkwa3raau5vSlRVzMSLDnfdtQ=="
|
||||
},
|
||||
"node_modules/@vue/reactivity": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.33.tgz",
|
||||
"integrity": "sha512-62Sq0mp9/0bLmDuxuLD5CIaMG2susFAGARLuZ/5jkU1FCf9EDbwUuF+BO8Ub3Rbodx0ziIecM/NsmyjardBxfQ==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.37.tgz",
|
||||
"integrity": "sha512-/7WRafBOshOc6m3F7plwzPeCu/RCVv9uMpOwa/5PiY1Zz+WLVRWiy0MYKwmg19KBdGtFWsmZ4cD+LOdVPcs52A==",
|
||||
"dependencies": {
|
||||
"@vue/shared": "3.2.33"
|
||||
"@vue/shared": "3.2.37"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/reactivity-transform": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.33.tgz",
|
||||
"integrity": "sha512-4UL5KOIvSQb254aqenW4q34qMXbfZcmEsV/yVidLUgvwYQQ/D21bGX3DlgPUGI3c4C+iOnNmDCkIxkILoX/Pyw==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.37.tgz",
|
||||
"integrity": "sha512-IWopkKEb+8qpu/1eMKVeXrK0NLw9HicGviJzhJDEyfxTR9e1WtpnnbYkJWurX6WwoFP0sz10xQg8yL8lgskAZg==",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.16.4",
|
||||
"@vue/compiler-core": "3.2.33",
|
||||
"@vue/shared": "3.2.33",
|
||||
"@vue/compiler-core": "3.2.37",
|
||||
"@vue/shared": "3.2.37",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.25.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/runtime-core": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.33.tgz",
|
||||
"integrity": "sha512-N2D2vfaXsBPhzCV3JsXQa2NECjxP3eXgZlFqKh4tgakp3iX6LCGv76DLlc+IfFZq+TW10Y8QUfeihXOupJ1dGw==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.37.tgz",
|
||||
"integrity": "sha512-JPcd9kFyEdXLl/i0ClS7lwgcs0QpUAWj+SKX2ZC3ANKi1U4DOtiEr6cRqFXsPwY5u1L9fAjkinIdB8Rz3FoYNQ==",
|
||||
"dependencies": {
|
||||
"@vue/reactivity": "3.2.33",
|
||||
"@vue/shared": "3.2.33"
|
||||
"@vue/reactivity": "3.2.37",
|
||||
"@vue/shared": "3.2.37"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/runtime-dom": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.33.tgz",
|
||||
"integrity": "sha512-LSrJ6W7CZTSUygX5s8aFkraDWlO6K4geOwA3quFF2O+hC3QuAMZt/0Xb7JKE3C4JD4pFwCSO7oCrZmZ0BIJUnw==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.37.tgz",
|
||||
"integrity": "sha512-HimKdh9BepShW6YozwRKAYjYQWg9mQn63RGEiSswMbW+ssIht1MILYlVGkAGGQbkhSh31PCdoUcfiu4apXJoPw==",
|
||||
"dependencies": {
|
||||
"@vue/runtime-core": "3.2.33",
|
||||
"@vue/shared": "3.2.33",
|
||||
"@vue/runtime-core": "3.2.37",
|
||||
"@vue/shared": "3.2.37",
|
||||
"csstype": "^2.6.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/server-renderer": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.33.tgz",
|
||||
"integrity": "sha512-4jpJHRD4ORv8PlbYi+/MfP8ec1okz6rybe36MdpkDrGIdEItHEUyaHSKvz+ptNEyQpALmmVfRteHkU9F8vxOew==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.37.tgz",
|
||||
"integrity": "sha512-kLITEJvaYgZQ2h47hIzPh2K3jG8c1zCVbp/o/bzQOyvzaKiCquKS7AaioPI28GNxIsE/zSx+EwWYsNxDCX95MA==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-ssr": "3.2.33",
|
||||
"@vue/shared": "3.2.33"
|
||||
"@vue/compiler-ssr": "3.2.37",
|
||||
"@vue/shared": "3.2.37"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "3.2.33"
|
||||
"vue": "3.2.37"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/shared": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.33.tgz",
|
||||
"integrity": "sha512-UBc1Pg1T3yZ97vsA2ueER0F6GbJebLHYlEi4ou1H5YL4KWvMOOWwpYo9/QpWq93wxKG6Wo13IY74Hcn/f7c7Bg=="
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.37.tgz",
|
||||
"integrity": "sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw=="
|
||||
},
|
||||
"node_modules/@vueuse/core": {
|
||||
"version": "8.7.5",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.7.5.tgz",
|
||||
"integrity": "sha512-tqgzeZGoZcXzoit4kOGLWJibDMLp0vdm6ZO41SSUQhkhtrPhAg6dbIEPiahhUu6sZAmSYvVrZgEr5aKD51nrLA==",
|
||||
"dependencies": {
|
||||
"@types/web-bluetooth": "^0.0.14",
|
||||
"@vueuse/metadata": "8.7.5",
|
||||
"@vueuse/shared": "8.7.5",
|
||||
"vue-demi": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@vue/composition-api": "^1.1.0",
|
||||
"vue": "^2.6.0 || ^3.2.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@vue/composition-api": {
|
||||
"optional": true
|
||||
},
|
||||
"vue": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@vueuse/core/node_modules/@vueuse/shared": {
|
||||
"version": "8.7.5",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.7.5.tgz",
|
||||
"integrity": "sha512-THXPvMBFmg6Gf6AwRn/EdTh2mhqwjGsB2Yfp374LNQSQVKRHtnJ0I42bsZTn7nuEliBxqUrGQm/lN6qUHmhJLw==",
|
||||
"dependencies": {
|
||||
"vue-demi": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@vue/composition-api": "^1.1.0",
|
||||
"vue": "^2.6.0 || ^3.2.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@vue/composition-api": {
|
||||
"optional": true
|
||||
},
|
||||
"vue": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@vueuse/metadata": {
|
||||
"version": "8.7.5",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.7.5.tgz",
|
||||
"integrity": "sha512-emJZKRQSaEnVqmlu39NpNp8iaW+bPC2kWykWoWOZMSlO/0QVEmO/rt8A5VhOEJTKLX3vwTevqbiRy9WJRwVOQg==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
}
|
||||
},
|
||||
"node_modules/@webassemblyjs/ast": {
|
||||
"version": "1.11.1",
|
||||
@@ -4076,13 +4139,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/better-sqlite3": {
|
||||
"version": "7.5.1",
|
||||
"resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.5.1.tgz",
|
||||
"integrity": "sha512-+i6tH1y9KEIol1iYpZJrqDwBDQZGHioDENU49Rnidorp3bSXvw/QTYDjQGq9+TFF7RX4q0YV1sEOIRq4vDZdRg==",
|
||||
"version": "7.5.3",
|
||||
"resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.5.3.tgz",
|
||||
"integrity": "sha512-tNIrDsThpWT8j1mg+svI1pqCYROqNOWMbB2qXVg+TJqH9UR5XnbAHyRsLZoJagldGTTqJPj/sUPVOkW0GRpYqw==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"prebuild-install": "^7.0.0"
|
||||
"prebuild-install": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/big.js": {
|
||||
@@ -16625,15 +16688,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vue": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.2.33.tgz",
|
||||
"integrity": "sha512-si1ExAlDUrLSIg/V7D/GgA4twJwfsfgG+t9w10z38HhL/HA07132pUQ2KuwAo8qbCyMJ9e6OqrmWrOCr+jW7ZQ==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.2.37.tgz",
|
||||
"integrity": "sha512-bOKEZxrm8Eh+fveCqS1/NkG/n6aMidsI6hahas7pa0w/l7jkbssJVsRhVDs07IdDq7h9KHswZOgItnwJAgtVtQ==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.2.33",
|
||||
"@vue/compiler-sfc": "3.2.33",
|
||||
"@vue/runtime-dom": "3.2.33",
|
||||
"@vue/server-renderer": "3.2.33",
|
||||
"@vue/shared": "3.2.33"
|
||||
"@vue/compiler-dom": "3.2.37",
|
||||
"@vue/compiler-sfc": "3.2.37",
|
||||
"@vue/runtime-dom": "3.2.37",
|
||||
"@vue/server-renderer": "3.2.37",
|
||||
"@vue/shared": "3.2.37"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-demi": {
|
||||
@@ -19257,9 +19320,9 @@
|
||||
}
|
||||
},
|
||||
"@mdi/font": {
|
||||
"version": "6.1.95",
|
||||
"resolved": "https://registry.npmjs.org/@mdi/font/-/font-6.1.95.tgz",
|
||||
"integrity": "sha512-L3cg9qoUEp5MZHvu6rtuobTtPBmq0ATau5ZrHmsaE6gCRs90T4JBWyzV8WCMEjZoy5+zA+/cvtCUtD/+WVaQ9Q=="
|
||||
"version": "6.9.96",
|
||||
"resolved": "https://registry.npmjs.org/@mdi/font/-/font-6.9.96.tgz",
|
||||
"integrity": "sha512-z3QVZStyHVwkDsFR7A7F2PIvZJPWgdSFw4BEEy2Gc9HUN5NfK9mGbjgaYClRcbMWiYEV45srmiYtczmBtCqR8w=="
|
||||
},
|
||||
"@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
@@ -19790,6 +19853,11 @@
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"@types/web-bluetooth": {
|
||||
"version": "0.0.14",
|
||||
"resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.14.tgz",
|
||||
"integrity": "sha512-5d2RhCard1nQUC3aHcq/gHzWYO6K0WJmAbjO7mQJgCQKtZpgXxv1rOM6O/dBDhDYYVutk1sciOgNSe+5YyfM8A=="
|
||||
},
|
||||
"@types/yargs": {
|
||||
"version": "16.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz",
|
||||
@@ -19926,36 +19994,36 @@
|
||||
"integrity": "sha512-zSUH9HYCw5qsCtd7b31yqkpaCU6jhtkKLkvOOA8yTrIRfBSOFb8PPhgmMicD7B/m+t4PwOJXzU1XDtrM9Fd3/g=="
|
||||
},
|
||||
"@vue/compiler-core": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.33.tgz",
|
||||
"integrity": "sha512-AAmr52ji3Zhk7IKIuigX2osWWsb2nQE5xsdFYjdnmtQ4gymmqXbjLvkSE174+fF3A3kstYrTgGkqgOEbsdLDpw==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.37.tgz",
|
||||
"integrity": "sha512-81KhEjo7YAOh0vQJoSmAD68wLfYqJvoiD4ulyedzF+OEk/bk6/hx3fTNVfuzugIIaTrOx4PGx6pAiBRe5e9Zmg==",
|
||||
"requires": {
|
||||
"@babel/parser": "^7.16.4",
|
||||
"@vue/shared": "3.2.33",
|
||||
"@vue/shared": "3.2.37",
|
||||
"estree-walker": "^2.0.2",
|
||||
"source-map": "^0.6.1"
|
||||
}
|
||||
},
|
||||
"@vue/compiler-dom": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.33.tgz",
|
||||
"integrity": "sha512-GhiG1C8X98Xz9QUX/RlA6/kgPBWJkjq0Rq6//5XTAGSYrTMBgcLpP9+CnlUg1TFxnnCVughAG+KZl28XJqw8uQ==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.37.tgz",
|
||||
"integrity": "sha512-yxJLH167fucHKxaqXpYk7x8z7mMEnXOw3G2q62FTkmsvNxu4FQSu5+3UMb+L7fjKa26DEzhrmCxAgFLLIzVfqQ==",
|
||||
"requires": {
|
||||
"@vue/compiler-core": "3.2.33",
|
||||
"@vue/shared": "3.2.33"
|
||||
"@vue/compiler-core": "3.2.37",
|
||||
"@vue/shared": "3.2.37"
|
||||
}
|
||||
},
|
||||
"@vue/compiler-sfc": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.33.tgz",
|
||||
"integrity": "sha512-H8D0WqagCr295pQjUYyO8P3IejM3vEzeCO1apzByAEaAR/WimhMYczHfZVvlCE/9yBaEu/eu9RdiWr0kF8b71Q==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.37.tgz",
|
||||
"integrity": "sha512-+7i/2+9LYlpqDv+KTtWhOZH+pa8/HnX/905MdVmAcI/mPQOBwkHHIzrsEsucyOIZQYMkXUiTkmZq5am/NyXKkg==",
|
||||
"requires": {
|
||||
"@babel/parser": "^7.16.4",
|
||||
"@vue/compiler-core": "3.2.33",
|
||||
"@vue/compiler-dom": "3.2.33",
|
||||
"@vue/compiler-ssr": "3.2.33",
|
||||
"@vue/reactivity-transform": "3.2.33",
|
||||
"@vue/shared": "3.2.33",
|
||||
"@vue/compiler-core": "3.2.37",
|
||||
"@vue/compiler-dom": "3.2.37",
|
||||
"@vue/compiler-ssr": "3.2.37",
|
||||
"@vue/reactivity-transform": "3.2.37",
|
||||
"@vue/shared": "3.2.37",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.25.7",
|
||||
"postcss": "^8.1.10",
|
||||
@@ -19963,12 +20031,12 @@
|
||||
}
|
||||
},
|
||||
"@vue/compiler-ssr": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.33.tgz",
|
||||
"integrity": "sha512-XQh1Xdk3VquDpXsnoCd7JnMoWec9CfAzQDQsaMcSU79OrrO2PNR0ErlIjm/mGq3GmBfkQjzZACV+7GhfRB8xMQ==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.37.tgz",
|
||||
"integrity": "sha512-7mQJD7HdXxQjktmsWp/J67lThEIcxLemz1Vb5I6rYJHR5vI+lON3nPGOH3ubmbvYGt8xEUaAr1j7/tIFWiEOqw==",
|
||||
"requires": {
|
||||
"@vue/compiler-dom": "3.2.33",
|
||||
"@vue/shared": "3.2.33"
|
||||
"@vue/compiler-dom": "3.2.37",
|
||||
"@vue/shared": "3.2.37"
|
||||
}
|
||||
},
|
||||
"@vue/devtools-api": {
|
||||
@@ -19977,57 +20045,83 @@
|
||||
"integrity": "sha512-IiA0SvDrJEgXvVxjNkHPFfDx6SXw0b/TUkqMcDZWNg9fnCAHbTpoo59YfJ9QLFkwa3raau5vSlRVzMSLDnfdtQ=="
|
||||
},
|
||||
"@vue/reactivity": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.33.tgz",
|
||||
"integrity": "sha512-62Sq0mp9/0bLmDuxuLD5CIaMG2susFAGARLuZ/5jkU1FCf9EDbwUuF+BO8Ub3Rbodx0ziIecM/NsmyjardBxfQ==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.37.tgz",
|
||||
"integrity": "sha512-/7WRafBOshOc6m3F7plwzPeCu/RCVv9uMpOwa/5PiY1Zz+WLVRWiy0MYKwmg19KBdGtFWsmZ4cD+LOdVPcs52A==",
|
||||
"requires": {
|
||||
"@vue/shared": "3.2.33"
|
||||
"@vue/shared": "3.2.37"
|
||||
}
|
||||
},
|
||||
"@vue/reactivity-transform": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.33.tgz",
|
||||
"integrity": "sha512-4UL5KOIvSQb254aqenW4q34qMXbfZcmEsV/yVidLUgvwYQQ/D21bGX3DlgPUGI3c4C+iOnNmDCkIxkILoX/Pyw==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.37.tgz",
|
||||
"integrity": "sha512-IWopkKEb+8qpu/1eMKVeXrK0NLw9HicGviJzhJDEyfxTR9e1WtpnnbYkJWurX6WwoFP0sz10xQg8yL8lgskAZg==",
|
||||
"requires": {
|
||||
"@babel/parser": "^7.16.4",
|
||||
"@vue/compiler-core": "3.2.33",
|
||||
"@vue/shared": "3.2.33",
|
||||
"@vue/compiler-core": "3.2.37",
|
||||
"@vue/shared": "3.2.37",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.25.7"
|
||||
}
|
||||
},
|
||||
"@vue/runtime-core": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.33.tgz",
|
||||
"integrity": "sha512-N2D2vfaXsBPhzCV3JsXQa2NECjxP3eXgZlFqKh4tgakp3iX6LCGv76DLlc+IfFZq+TW10Y8QUfeihXOupJ1dGw==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.37.tgz",
|
||||
"integrity": "sha512-JPcd9kFyEdXLl/i0ClS7lwgcs0QpUAWj+SKX2ZC3ANKi1U4DOtiEr6cRqFXsPwY5u1L9fAjkinIdB8Rz3FoYNQ==",
|
||||
"requires": {
|
||||
"@vue/reactivity": "3.2.33",
|
||||
"@vue/shared": "3.2.33"
|
||||
"@vue/reactivity": "3.2.37",
|
||||
"@vue/shared": "3.2.37"
|
||||
}
|
||||
},
|
||||
"@vue/runtime-dom": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.33.tgz",
|
||||
"integrity": "sha512-LSrJ6W7CZTSUygX5s8aFkraDWlO6K4geOwA3quFF2O+hC3QuAMZt/0Xb7JKE3C4JD4pFwCSO7oCrZmZ0BIJUnw==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.37.tgz",
|
||||
"integrity": "sha512-HimKdh9BepShW6YozwRKAYjYQWg9mQn63RGEiSswMbW+ssIht1MILYlVGkAGGQbkhSh31PCdoUcfiu4apXJoPw==",
|
||||
"requires": {
|
||||
"@vue/runtime-core": "3.2.33",
|
||||
"@vue/shared": "3.2.33",
|
||||
"@vue/runtime-core": "3.2.37",
|
||||
"@vue/shared": "3.2.37",
|
||||
"csstype": "^2.6.8"
|
||||
}
|
||||
},
|
||||
"@vue/server-renderer": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.33.tgz",
|
||||
"integrity": "sha512-4jpJHRD4ORv8PlbYi+/MfP8ec1okz6rybe36MdpkDrGIdEItHEUyaHSKvz+ptNEyQpALmmVfRteHkU9F8vxOew==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.37.tgz",
|
||||
"integrity": "sha512-kLITEJvaYgZQ2h47hIzPh2K3jG8c1zCVbp/o/bzQOyvzaKiCquKS7AaioPI28GNxIsE/zSx+EwWYsNxDCX95MA==",
|
||||
"requires": {
|
||||
"@vue/compiler-ssr": "3.2.33",
|
||||
"@vue/shared": "3.2.33"
|
||||
"@vue/compiler-ssr": "3.2.37",
|
||||
"@vue/shared": "3.2.37"
|
||||
}
|
||||
},
|
||||
"@vue/shared": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.33.tgz",
|
||||
"integrity": "sha512-UBc1Pg1T3yZ97vsA2ueER0F6GbJebLHYlEi4ou1H5YL4KWvMOOWwpYo9/QpWq93wxKG6Wo13IY74Hcn/f7c7Bg=="
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.37.tgz",
|
||||
"integrity": "sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw=="
|
||||
},
|
||||
"@vueuse/core": {
|
||||
"version": "8.7.5",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.7.5.tgz",
|
||||
"integrity": "sha512-tqgzeZGoZcXzoit4kOGLWJibDMLp0vdm6ZO41SSUQhkhtrPhAg6dbIEPiahhUu6sZAmSYvVrZgEr5aKD51nrLA==",
|
||||
"requires": {
|
||||
"@types/web-bluetooth": "^0.0.14",
|
||||
"@vueuse/metadata": "8.7.5",
|
||||
"@vueuse/shared": "8.7.5",
|
||||
"vue-demi": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vueuse/shared": {
|
||||
"version": "8.7.5",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.7.5.tgz",
|
||||
"integrity": "sha512-THXPvMBFmg6Gf6AwRn/EdTh2mhqwjGsB2Yfp374LNQSQVKRHtnJ0I42bsZTn7nuEliBxqUrGQm/lN6qUHmhJLw==",
|
||||
"requires": {
|
||||
"vue-demi": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@vueuse/metadata": {
|
||||
"version": "8.7.5",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.7.5.tgz",
|
||||
"integrity": "sha512-emJZKRQSaEnVqmlu39NpNp8iaW+bPC2kWykWoWOZMSlO/0QVEmO/rt8A5VhOEJTKLX3vwTevqbiRy9WJRwVOQg=="
|
||||
},
|
||||
"@webassemblyjs/ast": {
|
||||
"version": "1.11.1",
|
||||
@@ -20718,12 +20812,12 @@
|
||||
}
|
||||
},
|
||||
"better-sqlite3": {
|
||||
"version": "7.5.1",
|
||||
"resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.5.1.tgz",
|
||||
"integrity": "sha512-+i6tH1y9KEIol1iYpZJrqDwBDQZGHioDENU49Rnidorp3bSXvw/QTYDjQGq9+TFF7RX4q0YV1sEOIRq4vDZdRg==",
|
||||
"version": "7.5.3",
|
||||
"resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.5.3.tgz",
|
||||
"integrity": "sha512-tNIrDsThpWT8j1mg+svI1pqCYROqNOWMbB2qXVg+TJqH9UR5XnbAHyRsLZoJagldGTTqJPj/sUPVOkW0GRpYqw==",
|
||||
"requires": {
|
||||
"bindings": "^1.5.0",
|
||||
"prebuild-install": "^7.0.0"
|
||||
"prebuild-install": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"big.js": {
|
||||
@@ -30216,15 +30310,15 @@
|
||||
}
|
||||
},
|
||||
"vue": {
|
||||
"version": "3.2.33",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.2.33.tgz",
|
||||
"integrity": "sha512-si1ExAlDUrLSIg/V7D/GgA4twJwfsfgG+t9w10z38HhL/HA07132pUQ2KuwAo8qbCyMJ9e6OqrmWrOCr+jW7ZQ==",
|
||||
"version": "3.2.37",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.2.37.tgz",
|
||||
"integrity": "sha512-bOKEZxrm8Eh+fveCqS1/NkG/n6aMidsI6hahas7pa0w/l7jkbssJVsRhVDs07IdDq7h9KHswZOgItnwJAgtVtQ==",
|
||||
"requires": {
|
||||
"@vue/compiler-dom": "3.2.33",
|
||||
"@vue/compiler-sfc": "3.2.33",
|
||||
"@vue/runtime-dom": "3.2.33",
|
||||
"@vue/server-renderer": "3.2.33",
|
||||
"@vue/shared": "3.2.33"
|
||||
"@vue/compiler-dom": "3.2.37",
|
||||
"@vue/compiler-sfc": "3.2.37",
|
||||
"@vue/runtime-dom": "3.2.37",
|
||||
"@vue/server-renderer": "3.2.37",
|
||||
"@vue/shared": "3.2.37"
|
||||
}
|
||||
},
|
||||
"vue-demi": {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "antares",
|
||||
"productName": "Antares",
|
||||
"version": "0.5.8",
|
||||
"version": "0.5.9",
|
||||
"description": "A modern, fast and productivity driven SQL client with a focus in UX.",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/antares-sql/antares.git",
|
||||
@@ -117,11 +117,12 @@
|
||||
"dependencies": {
|
||||
"@electron/remote": "~2.0.1",
|
||||
"@faker-js/faker": "~6.1.2",
|
||||
"@mdi/font": "~6.1.95",
|
||||
"@mdi/font": "~6.9.96",
|
||||
"@turf/helpers": "~6.5.0",
|
||||
"@vscode/vscode-languagedetection": "~1.0.21",
|
||||
"@vueuse/core": "~8.7.5",
|
||||
"ace-builds": "~1.4.13",
|
||||
"better-sqlite3": "~7.5.0",
|
||||
"better-sqlite3": "~7.5.1",
|
||||
"electron-log": "~4.4.1",
|
||||
"electron-store": "~8.0.1",
|
||||
"electron-updater": "~4.6.5",
|
||||
@@ -140,7 +141,7 @@
|
||||
"sql-formatter": "~4.0.2",
|
||||
"ssh2-promise": "~1.0.2",
|
||||
"v-mask": "~2.3.0",
|
||||
"vue": "~3.2.33",
|
||||
"vue": "~3.2.37",
|
||||
"vue-i18n": "~9.1.9",
|
||||
"vuedraggable": "~4.1.0"
|
||||
},
|
||||
|
@@ -7,6 +7,12 @@ export interface TableParams {
|
||||
|
||||
export interface ExportOptions {
|
||||
schema: string;
|
||||
tables: {
|
||||
table: string;
|
||||
includeStructure: boolean;
|
||||
includeContent: boolean;
|
||||
includeDropStatement: boolean;
|
||||
}[];
|
||||
includes: {[key: string]: boolean};
|
||||
outputFormat: 'sql' | 'sql.zip';
|
||||
outputFile: string;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<div id="wrapper" :class="[`theme-${applicationTheme}`, !disableBlur || 'no-blur']">
|
||||
<TheTitleBar />
|
||||
<div id="window-content">
|
||||
<TheSettingBar />
|
||||
<TheSettingBar @show-connections-modal="isAllConnectionsModal = true" />
|
||||
<div id="main-content" class="container">
|
||||
<div class="columns col-gapless">
|
||||
<Workspace
|
||||
@@ -21,13 +21,15 @@
|
||||
<BaseTextEditor class="d-none" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<ModalAllConnections v-if="isAllConnectionsModal" @close="isAllConnectionsModal = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineAsyncComponent } from 'vue';
|
||||
<script setup lang="ts">
|
||||
import { defineAsyncComponent, onBeforeUnmount, onMounted, Ref, ref } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { ipcRenderer } from 'electron';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { Menu, getCurrentWindow } from '@electron/remote';
|
||||
import { useApplicationStore } from '@/stores/application';
|
||||
import { useConnectionsStore } from '@/stores/connections';
|
||||
@@ -35,98 +37,99 @@ import { useSettingsStore } from '@/stores/settings';
|
||||
import { useWorkspacesStore } from '@/stores/workspaces';
|
||||
import TheSettingBar from '@/components/TheSettingBar.vue';
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
TheTitleBar: defineAsyncComponent(() => import(/* webpackChunkName: "TheTitleBar" */'@/components/TheTitleBar.vue')),
|
||||
TheSettingBar,
|
||||
TheFooter: defineAsyncComponent(() => import(/* webpackChunkName: "TheFooter" */'@/components/TheFooter.vue')),
|
||||
TheNotificationsBoard: defineAsyncComponent(() => import(/* webpackChunkName: "TheNotificationsBoard" */'@/components/TheNotificationsBoard.vue')),
|
||||
Workspace: defineAsyncComponent(() => import(/* webpackChunkName: "Workspace" */'@/components/Workspace.vue')),
|
||||
WorkspaceAddConnectionPanel: defineAsyncComponent(() => import(/* webpackChunkName: "WorkspaceAddConnectionPanel" */'@/components/WorkspaceAddConnectionPanel.vue')),
|
||||
ModalSettings: defineAsyncComponent(() => import(/* webpackChunkName: "ModalSettings" */'@/components/ModalSettings.vue')),
|
||||
TheScratchpad: defineAsyncComponent(() => import(/* webpackChunkName: "TheScratchpad" */'@/components/TheScratchpad.vue')),
|
||||
BaseTextEditor: defineAsyncComponent(() => import(/* webpackChunkName: "BaseTextEditor" */'@/components/BaseTextEditor.vue'))
|
||||
},
|
||||
setup () {
|
||||
const applicationStore = useApplicationStore();
|
||||
const connectionsStore = useConnectionsStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
const workspacesStore = useWorkspacesStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
const {
|
||||
isLoading,
|
||||
isSettingModal,
|
||||
isScratchpad
|
||||
} = storeToRefs(applicationStore);
|
||||
const { connections } = storeToRefs(connectionsStore);
|
||||
const { applicationTheme, disableBlur } = storeToRefs(settingsStore);
|
||||
const { getSelected: selectedWorkspace } = storeToRefs(workspacesStore);
|
||||
const TheTitleBar = defineAsyncComponent(() => import(/* webpackChunkName: "TheTitleBar" */'@/components/TheTitleBar.vue'));
|
||||
const TheFooter = defineAsyncComponent(() => import(/* webpackChunkName: "TheFooter" */'@/components/TheFooter.vue'));
|
||||
const TheNotificationsBoard = defineAsyncComponent(() => import(/* webpackChunkName: "TheNotificationsBoard" */'@/components/TheNotificationsBoard.vue'));
|
||||
const Workspace = defineAsyncComponent(() => import(/* webpackChunkName: "Workspace" */'@/components/Workspace.vue'));
|
||||
const WorkspaceAddConnectionPanel = defineAsyncComponent(() => import(/* webpackChunkName: "WorkspaceAddConnectionPanel" */'@/components/WorkspaceAddConnectionPanel.vue'));
|
||||
const ModalSettings = defineAsyncComponent(() => import(/* webpackChunkName: "ModalSettings" */'@/components/ModalSettings.vue'));
|
||||
const ModalAllConnections = defineAsyncComponent(() => import(/* webpackChunkName: "ModalAllConnections" */'@/components/ModalAllConnections.vue'));
|
||||
const TheScratchpad = defineAsyncComponent(() => import(/* webpackChunkName: "TheScratchpad" */'@/components/TheScratchpad.vue'));
|
||||
const BaseTextEditor = defineAsyncComponent(() => import(/* webpackChunkName: "BaseTextEditor" */'@/components/BaseTextEditor.vue'));
|
||||
|
||||
const { checkVersionUpdate } = applicationStore;
|
||||
const { changeApplicationTheme } = settingsStore;
|
||||
const applicationStore = useApplicationStore();
|
||||
const connectionsStore = useConnectionsStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
const workspacesStore = useWorkspacesStore();
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
setTimeout(() => {
|
||||
changeApplicationTheme(applicationTheme.value);// Forces persistentStore to save on file and mail process
|
||||
}, 1000);
|
||||
});
|
||||
const {
|
||||
isSettingModal,
|
||||
isScratchpad
|
||||
} = storeToRefs(applicationStore);
|
||||
const { connections } = storeToRefs(connectionsStore);
|
||||
const { applicationTheme, disableBlur } = storeToRefs(settingsStore);
|
||||
const { getSelected: selectedWorkspace } = storeToRefs(workspacesStore);
|
||||
|
||||
return {
|
||||
isLoading,
|
||||
isSettingModal,
|
||||
isScratchpad,
|
||||
checkVersionUpdate,
|
||||
changeApplicationTheme,
|
||||
connections,
|
||||
applicationTheme,
|
||||
disableBlur,
|
||||
selectedWorkspace
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
ipcRenderer.send('check-for-updates');
|
||||
this.checkVersionUpdate();
|
||||
const { checkVersionUpdate } = applicationStore;
|
||||
const { changeApplicationTheme } = settingsStore;
|
||||
|
||||
const InputMenu = Menu.buildFromTemplate([
|
||||
{
|
||||
label: this.$t('word.cut'),
|
||||
role: 'cut'
|
||||
},
|
||||
{
|
||||
label: this.$t('word.copy'),
|
||||
role: 'copy'
|
||||
},
|
||||
{
|
||||
label: this.$t('word.paste'),
|
||||
role: 'paste'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: this.$t('message.selectAll'),
|
||||
role: 'selectAll'
|
||||
}
|
||||
]);
|
||||
const isAllConnectionsModal: Ref<boolean> = ref(false);
|
||||
|
||||
document.body.addEventListener('contextmenu', (e) => {
|
||||
e.preventDefault();
|
||||
const onKey = (e: KeyboardEvent) => {
|
||||
if (e.ctrlKey || e.metaKey) {
|
||||
if (e.code === 'Space') {
|
||||
isAllConnectionsModal.value = true;
|
||||
e.stopPropagation();
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
let node: any = e.target;
|
||||
|
||||
while (node) {
|
||||
if (node.nodeName.match(/^(input|textarea)$/i) || node.isContentEditable) {
|
||||
InputMenu.popup({ window: getCurrentWindow() });
|
||||
break;
|
||||
}
|
||||
node = node.parentNode;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
setTimeout(() => {
|
||||
changeApplicationTheme(applicationTheme.value);// Forces persistentStore to save on file and mail process
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
window.addEventListener('keypress', onKey);
|
||||
|
||||
onMounted(() => {
|
||||
ipcRenderer.send('check-for-updates');
|
||||
checkVersionUpdate();
|
||||
|
||||
const InputMenu = Menu.buildFromTemplate([
|
||||
{
|
||||
label: t('word.cut'),
|
||||
role: 'cut'
|
||||
},
|
||||
{
|
||||
label: t('word.copy'),
|
||||
role: 'copy'
|
||||
},
|
||||
{
|
||||
label: t('word.paste'),
|
||||
role: 'paste'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: t('message.selectAll'),
|
||||
role: 'selectAll'
|
||||
}
|
||||
]);
|
||||
|
||||
document.body.addEventListener('contextmenu', (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
let node: any = e.target;
|
||||
|
||||
while (node) {
|
||||
if (node.nodeName.match(/^(input|textarea)$/i) || node.isContentEditable) {
|
||||
InputMenu.popup({ window: getCurrentWindow() });
|
||||
break;
|
||||
}
|
||||
node = node.parentNode;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener('keydown', onKey);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
358
src/renderer/components/ModalAllConnections.vue
Normal file
358
src/renderer/components/ModalAllConnections.vue
Normal file
@@ -0,0 +1,358 @@
|
||||
<template>
|
||||
<Teleport to="#window-content">
|
||||
<div class="modal active">
|
||||
<a class="modal-overlay" @click.stop="closeModal" />
|
||||
<div ref="trapRef" class="modal-container p-0 pb-4">
|
||||
<div class="modal-header pl-2">
|
||||
<div class="modal-title h6">
|
||||
<div class="d-flex">
|
||||
<i class="mdi mdi-24px mdi-apps mr-1" />
|
||||
<span class="cut-text">{{ $t('message.allConnections') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<a class="btn btn-clear c-hand" @click.stop="closeModal" />
|
||||
</div>
|
||||
<div class="modal-body py-0">
|
||||
<div class="columns">
|
||||
<div class="connections-search column col-12 columns col-gapless">
|
||||
<div class="column col-12 mt-2">
|
||||
<div ref="searchForm" class="form-group has-icon-right p-2 m-0">
|
||||
<input
|
||||
v-model="searchTerm"
|
||||
class="form-input"
|
||||
type="text"
|
||||
:placeholder="t('message.searchForConnections')"
|
||||
@keypress.esc="searchTerm = ''"
|
||||
>
|
||||
<i v-if="!searchTerm" class="form-icon mdi mdi-magnify mdi-18px pr-4" />
|
||||
<i
|
||||
v-else
|
||||
class="form-icon c-hand mdi mdi-backspace mdi-18px pr-4"
|
||||
@click="searchTerm = ''"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<TransitionGroup name="fade" :duration="{ enter: 200, leave: 200 }">
|
||||
<div
|
||||
v-for="connection in filteredConnections"
|
||||
:key="connection.uid"
|
||||
class="connection-block column col-md-6 col-lg-4 col-3 p-3"
|
||||
tabindex="0"
|
||||
@click.stop="selectConnection(connection.uid)"
|
||||
@keypress.stop.enter="selectConnection(connection.uid)"
|
||||
@mouseover="connectionHover = connection.uid"
|
||||
@mouseleave="connectionHover = null"
|
||||
>
|
||||
<div class="panel">
|
||||
<div class="panel-header p-2 text-center p-relative">
|
||||
<figure class="avatar avatar-lg pt-1 mb-1">
|
||||
<i class="settingbar-element-icon dbi" :class="[`dbi-${connection.client}`]" />
|
||||
</figure>
|
||||
<div class="panel-title h6 text-ellipsis">
|
||||
{{ getConnectionName(connection.uid) }}
|
||||
</div>
|
||||
<div class="panel-subtitle">
|
||||
{{ clients.get(connection.client) || connection.client }}
|
||||
</div>
|
||||
<div class="all-connections-buttons p-absolute d-flex" style="top: 0; right: 0;">
|
||||
<i
|
||||
v-if="connection.isPinned"
|
||||
class="all-connections-pinned mdi mdi-18px"
|
||||
:class="connectionHover === connection.uid ? 'mdi-pin-off' : 'mdi-pin'"
|
||||
:title="t('word.unpin')"
|
||||
@click.stop="unpinConnection(connection.uid)"
|
||||
/>
|
||||
<i
|
||||
v-else
|
||||
class="all-connections-pin mdi mdi-18px mdi-pin mdi-rotate-45"
|
||||
:title="t('word.pin')"
|
||||
@click.stop="pinConnection(connection.uid)"
|
||||
/>
|
||||
<i
|
||||
class="all-connections-delete mdi mdi-delete mdi-18px ml-2"
|
||||
:title="t('word.delete')"
|
||||
@click.stop="askToDelete(connection)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body text-center">
|
||||
<div v-if="connection.databasePath">
|
||||
<div class="text-ellipsis" :title="connection.databasePath">
|
||||
<i class="mdi mdi-database d-inline" /> <span class="text-bold">{{
|
||||
connection.databasePath
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="text-ellipsis" :title="`${connection.host}:${connection.port}`">
|
||||
<i class="mdi mdi-server d-inline" /> <span class="text-bold">{{ connection.host
|
||||
}}:{{ connection.port }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="connection.user">
|
||||
<div class="text-ellipsis">
|
||||
<i class="mdi mdi-account d-inline" /> <span class="text-bold">{{ connection.user
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="connection.schema">
|
||||
<div class="text-ellipsis">
|
||||
<i class="mdi mdi-database d-inline" /> <span class="text-bold">{{ connection.schema
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="connection.database">
|
||||
<div class="text-ellipsis">
|
||||
<i class="mdi mdi-database d-inline" /> <span class="text-bold">{{
|
||||
connection.database
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-footer text-center py-0">
|
||||
<div v-if="connection.ssl" class="chip bg-success mt-2">
|
||||
<i class="mdi mdi-lock mdi-18px mr-1" />
|
||||
SSL
|
||||
</div>
|
||||
<div v-if="connection.ssh" class="chip bg-success mt-2">
|
||||
<i class="mdi mdi-console-network mdi-18px mr-1" />
|
||||
SSH
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
key="trick"
|
||||
readonly
|
||||
class="p-absolute"
|
||||
style="width: 1px; height: 1px; opacity: 0"
|
||||
type="text"
|
||||
>
|
||||
<!-- workaround for useFocusTrap $lastFocusable -->
|
||||
</TransitionGroup>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ConfirmModal
|
||||
v-if="isConfirmModal"
|
||||
@confirm="confirmDeleteConnection"
|
||||
@hide="isConfirmModal = false"
|
||||
>
|
||||
<template #header>
|
||||
<div class="d-flex">
|
||||
<i class="mdi mdi-24px mdi-server-remove mr-1" /> {{ t('message.deleteConnection') }}
|
||||
</div>
|
||||
</template>
|
||||
<template #body>
|
||||
<div class="mb-2">
|
||||
{{ t('message.deleteCorfirm') }} <b>{{ selectedConnectionName }}</b>?
|
||||
</div>
|
||||
</template>
|
||||
</ConfirmModal>
|
||||
</Teleport>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, onBeforeUnmount, Ref, ref } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useFocusTrap } from '@/composables/useFocusTrap';
|
||||
import { useConnectionsStore } from '@/stores/connections';
|
||||
import { useWorkspacesStore } from '@/stores/workspaces';
|
||||
import ConfirmModal from '@/components/BaseConfirmModal.vue';
|
||||
import { ConnectionParams } from 'common/interfaces/antares';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const connectionsStore = useConnectionsStore();
|
||||
const workspacesStore = useWorkspacesStore();
|
||||
|
||||
const { connections,
|
||||
pinnedConnections,
|
||||
lastConnections
|
||||
} = storeToRefs(connectionsStore);
|
||||
const { getSelected: selectedWorkspace } = storeToRefs(workspacesStore);
|
||||
|
||||
const {
|
||||
getConnectionName,
|
||||
pinConnection,
|
||||
unpinConnection,
|
||||
deleteConnection
|
||||
} = connectionsStore;
|
||||
const { selectWorkspace } = workspacesStore;
|
||||
|
||||
const { trapRef } = useFocusTrap();
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
const clients = new Map([
|
||||
['mysql', 'MySQL'],
|
||||
['maria', 'MariaDB'],
|
||||
['pg', 'PostgreSQL'],
|
||||
['sqlite', 'SQLite']
|
||||
]);
|
||||
|
||||
const searchTerm = ref('');
|
||||
const isConfirmModal = ref(false);
|
||||
const connectionHover: Ref<string> = ref(null);
|
||||
const selectedConnection: Ref<ConnectionParams> = ref(null);
|
||||
|
||||
const sortedConnections = computed(() => {
|
||||
return connections.value
|
||||
.map(c => {
|
||||
const connTime = lastConnections.value.find((lc) => lc.uid === c.uid)?.time || 0;
|
||||
return {
|
||||
...c,
|
||||
time: connTime,
|
||||
isPinned: pinnedConnections.value.has(c.uid)
|
||||
};
|
||||
})
|
||||
.sort((a, b) => {
|
||||
if (a.isPinned < b.isPinned) return 1;
|
||||
if (a.isPinned > b.isPinned) return -1;
|
||||
if (a.time < b.time) return 1;
|
||||
if (a.time > b.time) return -1;
|
||||
return 0;
|
||||
});
|
||||
});
|
||||
|
||||
const filteredConnections = computed(() => {
|
||||
return sortedConnections.value.filter(connection => {
|
||||
return connection.name?.toLocaleLowerCase().includes(searchTerm.value.toLocaleLowerCase()) ||
|
||||
connection.host?.toLocaleLowerCase().includes(searchTerm.value.toLocaleLowerCase()) ||
|
||||
connection.database?.toLocaleLowerCase().includes(searchTerm.value.toLocaleLowerCase()) ||
|
||||
connection.databasePath?.toLocaleLowerCase().includes(searchTerm.value.toLocaleLowerCase()) ||
|
||||
connection.schema?.toLocaleLowerCase().includes(searchTerm.value.toLocaleLowerCase()) ||
|
||||
connection.user?.toLocaleLowerCase().includes(searchTerm.value.toLocaleLowerCase()) ||
|
||||
String(connection.port)?.includes(searchTerm.value);
|
||||
});
|
||||
});
|
||||
|
||||
const selectedConnectionName = computed(() => getConnectionName(selectedConnection.value?.uid));
|
||||
|
||||
const closeModal = () => emit('close');
|
||||
|
||||
const selectConnection = (uid: string) => {
|
||||
selectWorkspace(uid);
|
||||
closeModal();
|
||||
};
|
||||
|
||||
const askToDelete = (connection: ConnectionParams) => {
|
||||
selectedConnection.value = connection;
|
||||
isConfirmModal.value = true;
|
||||
};
|
||||
|
||||
const confirmDeleteConnection = () => {
|
||||
if (selectedWorkspace.value === selectedConnection.value.uid)
|
||||
selectWorkspace(null);
|
||||
deleteConnection(selectedConnection.value);
|
||||
};
|
||||
|
||||
const onKey = (e: KeyboardEvent) => {
|
||||
e.stopPropagation();
|
||||
if (e.key === 'Escape') {
|
||||
if ((e.target as HTMLInputElement).tagName === 'INPUT' && searchTerm.value.length > 0)
|
||||
searchTerm.value = '';
|
||||
else
|
||||
closeModal();
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener('keydown', onKey);
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener('keydown', onKey);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.vscroll {
|
||||
height: 1000px;
|
||||
overflow: auto;
|
||||
overflow-anchor: none;
|
||||
}
|
||||
|
||||
.column-resizable {
|
||||
|
||||
&:hover,
|
||||
&:active {
|
||||
resize: horizontal;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.table-column-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.sort-icon {
|
||||
font-size: 0.7rem;
|
||||
line-height: 1;
|
||||
margin-left: 0.2rem;
|
||||
}
|
||||
|
||||
.modal {
|
||||
align-items: flex-start;
|
||||
|
||||
.modal-container {
|
||||
max-width: 75vw;
|
||||
margin-top: 10vh;
|
||||
|
||||
.modal-body {
|
||||
height: 80vh;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.connections-search {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.connection-block {
|
||||
cursor: pointer;
|
||||
transition: all .2s;
|
||||
border-radius: $border-radius;
|
||||
outline: none;
|
||||
|
||||
&:focus {
|
||||
box-shadow: 0 0 3px .1rem rgba($primary-color, 80%);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.all-connections-buttons {
|
||||
|
||||
.all-connections-delete,
|
||||
.all-connections-pinned,
|
||||
.all-connections-pin {
|
||||
opacity: .5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.all-connections-buttons {
|
||||
.all-connections-pinned {
|
||||
opacity: .3;
|
||||
transition: opacity .2s;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.all-connections-delete,
|
||||
.all-connections-pin {
|
||||
opacity: 0;
|
||||
transition: opacity .2s;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@@ -269,8 +269,8 @@ import * as moment from 'moment';
|
||||
import { ipcRenderer } from 'electron';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { SchemaInfos } from 'common/interfaces/antares';
|
||||
import { ExportOptions, ExportState, TableParams } from 'common/interfaces/exporter';
|
||||
import { ClientCode, SchemaInfos } from 'common/interfaces/antares';
|
||||
import { ExportOptions, ExportState } from 'common/interfaces/exporter';
|
||||
import { useNotificationsStore } from '@/stores/notifications';
|
||||
import { useWorkspacesStore } from '@/stores/workspaces';
|
||||
import { useFocusTrap } from '@/composables/useFocusTrap';
|
||||
@@ -302,11 +302,15 @@ const isExporting = ref(false);
|
||||
const isRefreshing = ref(false);
|
||||
const progressPercentage = ref(0);
|
||||
const progressStatus = ref('');
|
||||
const tables: Ref<TableParams[]> = ref([]);
|
||||
const options: Ref<ExportOptions> = ref({
|
||||
const tables: Ref<{
|
||||
table: string;
|
||||
includeStructure: boolean;
|
||||
includeContent: boolean;
|
||||
includeDropStatement: boolean;
|
||||
}[]> = ref([]);
|
||||
const options: Ref<Partial<ExportOptions>> = ref({
|
||||
schema: props.selectedSchema,
|
||||
includes: {} as {[key: string]: boolean},
|
||||
outputFile: '',
|
||||
outputFormat: 'sql' as 'sql' | 'sql.zip',
|
||||
sqlInsertAfter: 250,
|
||||
sqlInsertDivider: 'bytes' as 'bytes' | 'rows'
|
||||
@@ -353,7 +357,7 @@ const startExport = async () => {
|
||||
outputFile: dumpFilePath.value,
|
||||
tables: [...tables.value],
|
||||
...options.value
|
||||
};
|
||||
} as ExportOptions & { uid: string; type: ClientCode };
|
||||
|
||||
try {
|
||||
const { status, response } = await Schema.export(params);
|
||||
|
@@ -126,6 +126,19 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group column col-12 mb-0">
|
||||
<div class="col-5 col-sm-12">
|
||||
<label class="form-label">
|
||||
{{ t('message.disableScratchpad') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-3 col-sm-12">
|
||||
<label class="form-switch d-inline-block" @click.prevent="toggleDisableScratchpad">
|
||||
<input type="checkbox" :checked="disableScratchpad">
|
||||
<i class="form-icon" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group column col-12">
|
||||
<div class="col-5 col-sm-12">
|
||||
<label class="form-label">
|
||||
@@ -337,6 +350,7 @@ const {
|
||||
notificationsTimeout,
|
||||
restoreTabs,
|
||||
disableBlur,
|
||||
disableScratchpad,
|
||||
applicationTheme,
|
||||
editorTheme,
|
||||
editorFontSize
|
||||
@@ -349,6 +363,7 @@ const {
|
||||
changePageSize,
|
||||
changeRestoreTabs,
|
||||
changeDisableBlur,
|
||||
changeDisableScratchpad,
|
||||
changeAutoComplete,
|
||||
changeLineWrap,
|
||||
changeApplicationTheme,
|
||||
@@ -490,6 +505,10 @@ const toggleDisableBlur = () => {
|
||||
changeDisableBlur(!disableBlur.value);
|
||||
};
|
||||
|
||||
const toggleDisableScratchpad = () => {
|
||||
changeDisableScratchpad(!disableScratchpad.value);
|
||||
};
|
||||
|
||||
const toggleAutoComplete = () => {
|
||||
changeAutoComplete(!selectedAutoComplete.value);
|
||||
};
|
||||
|
@@ -3,6 +3,20 @@
|
||||
:context-event="contextEvent"
|
||||
@close-context="$emit('close-context')"
|
||||
>
|
||||
<div
|
||||
v-if="isPinned"
|
||||
class="context-element"
|
||||
@click="unpin"
|
||||
>
|
||||
<span class="d-flex"><i class="mdi mdi-18px mdi-pin-off text-light pr-1" /> {{ $t('word.unpin') }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
class="context-element"
|
||||
@click="pin"
|
||||
>
|
||||
<span class="d-flex"><i class="mdi mdi-18px mdi-pin mdi-rotate-45 text-light pr-1" /> {{ $t('word.pin') }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="isConnected"
|
||||
class="context-element"
|
||||
@@ -46,11 +60,18 @@ import BaseContextMenu from '@/components/BaseContextMenu.vue';
|
||||
import ConfirmModal from '@/components/BaseConfirmModal.vue';
|
||||
import { ConnectionParams } from 'common/interfaces/antares';
|
||||
|
||||
const connectionsStore = useConnectionsStore();
|
||||
|
||||
const {
|
||||
getConnectionName,
|
||||
addConnection,
|
||||
deleteConnection
|
||||
} = useConnectionsStore();
|
||||
deleteConnection,
|
||||
pinConnection,
|
||||
unpinConnection
|
||||
} = connectionsStore;
|
||||
|
||||
const { pinnedConnections } = storeToRefs(connectionsStore);
|
||||
|
||||
const workspacesStore = useWorkspacesStore();
|
||||
const { getSelected: selectedWorkspace } = storeToRefs(workspacesStore);
|
||||
|
||||
@@ -71,6 +92,7 @@ const isConfirmModal = ref(false);
|
||||
|
||||
const connectionName = computed(() => getConnectionName(props.contextConnection.uid));
|
||||
const isConnected = computed(() => getWorkspace(props.contextConnection.uid).connectionStatus === 'connected');
|
||||
const isPinned = computed(() => pinnedConnections.value.has(props.contextConnection.uid));
|
||||
|
||||
const confirmDeleteConnection = () => {
|
||||
if (selectedWorkspace.value === props.contextConnection.uid)
|
||||
@@ -100,6 +122,16 @@ const hideConfirmModal = () => {
|
||||
closeContext();
|
||||
};
|
||||
|
||||
const pin = () => {
|
||||
pinConnection(props.contextConnection.uid);
|
||||
closeContext();
|
||||
};
|
||||
|
||||
const unpin = () => {
|
||||
unpinConnection(props.contextConnection.uid);
|
||||
closeContext();
|
||||
};
|
||||
|
||||
const disconnect = () => {
|
||||
disconnectWorkspace(props.contextConnection.uid);
|
||||
closeContext();
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="settingbar">
|
||||
<div class="settingbar-top-elements">
|
||||
<div ref="sidebarConnections" class="settingbar-top-elements">
|
||||
<SettingBarContext
|
||||
v-if="isContext"
|
||||
:context-event="contextEvent"
|
||||
@@ -9,7 +9,7 @@
|
||||
/>
|
||||
<ul class="settingbar-elements">
|
||||
<Draggable
|
||||
v-model="connections"
|
||||
v-model="pinnedConnectionsArr"
|
||||
:item-key="'uid'"
|
||||
@start="isDragging = true"
|
||||
@end="dragStop"
|
||||
@@ -23,11 +23,40 @@
|
||||
@contextmenu.prevent="contextMenu($event, element)"
|
||||
@mouseover.self="tooltipPosition"
|
||||
>
|
||||
<i class="settingbar-element-icon dbi" :class="`dbi-${element.client} ${getStatusBadge(element.uid)}`" />
|
||||
<span v-if="!isDragging" class="ex-tooltip-content">{{ getConnectionName(element.uid) }}</span>
|
||||
<i class="settingbar-element-icon dbi" :class="[`dbi-${element.client}`, getStatusBadge(element.uid), (pinnedConnections.has(element.uid) ? 'settingbar-element-pin' : false)]" />
|
||||
<span v-if="!isDragging && !isScrolling" class="ex-tooltip-content">{{ getConnectionName(element.uid) }}</span>
|
||||
</li>
|
||||
</template>
|
||||
</Draggable>
|
||||
|
||||
<div v-if="pinnedConnectionsArr.length" class="divider" />
|
||||
|
||||
<li
|
||||
v-for="connection in unpinnedConnectionsArr"
|
||||
:key="connection.uid"
|
||||
class="settingbar-element btn btn-link ex-tooltip"
|
||||
:class="{'selected': connection.uid === selectedWorkspace}"
|
||||
@click.stop="selectWorkspace(connection.uid)"
|
||||
@contextmenu.prevent="contextMenu($event, connection)"
|
||||
@mouseover.self="tooltipPosition"
|
||||
>
|
||||
<i class="settingbar-element-icon dbi" :class="[`dbi-${connection.client}`, getStatusBadge(connection.uid)]" />
|
||||
<span v-if="!isDragging && !isScrolling" class="ex-tooltip-content">{{ getConnectionName(connection.uid) }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="settingbar-middle-elements">
|
||||
<ul class="settingbar-elements">
|
||||
<li
|
||||
v-if="isScrollable"
|
||||
class="settingbar-element btn btn-link ex-tooltip"
|
||||
@click="emit('show-connections-modal')"
|
||||
@mouseover.self="tooltipPosition"
|
||||
>
|
||||
<i class="settingbar-element-icon mdi mdi-24px mdi-dots-horizontal text-light" />
|
||||
<span class="ex-tooltip-content">{{ $t('message.allConnections') }} (CTRL+Space)</span>
|
||||
</li>
|
||||
<li
|
||||
class="settingbar-element btn btn-link ex-tooltip"
|
||||
:class="{'selected': 'NEW' === selectedWorkspace}"
|
||||
@@ -42,7 +71,11 @@
|
||||
|
||||
<div class="settingbar-bottom-elements">
|
||||
<ul class="settingbar-elements">
|
||||
<li class="settingbar-element btn btn-link ex-tooltip" @click="showScratchpad">
|
||||
<li
|
||||
v-if="!disableScratchpad"
|
||||
class="settingbar-element btn btn-link ex-tooltip"
|
||||
@click="showScratchpad"
|
||||
>
|
||||
<i class="settingbar-element-icon mdi mdi-24px mdi-notebook-edit-outline text-light" />
|
||||
<span class="ex-tooltip-content">{{ $t('word.scratchpad') }}</span>
|
||||
</li>
|
||||
@@ -56,42 +89,70 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, Ref, computed } from 'vue';
|
||||
import { ref, Ref, computed, watch } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useApplicationStore } from '@/stores/application';
|
||||
import { useConnectionsStore } from '@/stores/connections';
|
||||
import { useWorkspacesStore } from '@/stores/workspaces';
|
||||
import { useSettingsStore } from '@/stores/settings';
|
||||
import * as Draggable from 'vuedraggable';
|
||||
import SettingBarContext from '@/components/SettingBarContext.vue';
|
||||
import { ConnectionParams } from 'common/interfaces/antares';
|
||||
import { useElementBounding, useScroll } from '@vueuse/core';
|
||||
|
||||
const applicationStore = useApplicationStore();
|
||||
const connectionsStore = useConnectionsStore();
|
||||
const workspacesStore = useWorkspacesStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
|
||||
const { updateStatus } = storeToRefs(applicationStore);
|
||||
const { connections: getConnections } = storeToRefs(connectionsStore);
|
||||
const { connections: storedConnections, pinnedConnections, lastConnections } = storeToRefs(connectionsStore);
|
||||
const { getSelected: selectedWorkspace } = storeToRefs(workspacesStore);
|
||||
const { disableScratchpad } = storeToRefs(settingsStore);
|
||||
|
||||
const { showSettingModal, showScratchpad } = applicationStore;
|
||||
const { getConnectionName, updateConnections } = connectionsStore;
|
||||
const { getConnectionName, updatePinnedConnections } = connectionsStore;
|
||||
const { getWorkspace, selectWorkspace } = workspacesStore;
|
||||
|
||||
const emit = defineEmits(['show-connections-modal']);
|
||||
|
||||
const isLinux = process.platform === 'linux';
|
||||
|
||||
const sidebarConnections: Ref<HTMLDivElement> = ref(null);
|
||||
const isContext: Ref<boolean> = ref(false);
|
||||
const isDragging: Ref<boolean> = ref(false);
|
||||
const isScrollable: Ref<boolean> = ref(false);
|
||||
const isScrolling = ref(useScroll(sidebarConnections)?.isScrolling);
|
||||
const contextEvent: Ref<MouseEvent> = ref(null);
|
||||
const contextConnection: Ref<ConnectionParams> = ref(null);
|
||||
const sidebarConnectionsHeight = ref(useElementBounding(sidebarConnections)?.height);
|
||||
|
||||
const connections = computed({
|
||||
get () {
|
||||
return getConnections.value;
|
||||
},
|
||||
set (value: ConnectionParams[]) {
|
||||
updateConnections(value);
|
||||
const pinnedConnectionsArr = computed({
|
||||
get: () => [...pinnedConnections.value].map(c => storedConnections.value.find(sc => sc.uid === c)).filter(Boolean),
|
||||
set: (value: ConnectionParams[]) => {
|
||||
const pinnedUid = value.reduce((acc, curr) => {
|
||||
acc.push(curr.uid);
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
updatePinnedConnections(pinnedUid);
|
||||
}
|
||||
});
|
||||
|
||||
const unpinnedConnectionsArr = computed(() => {
|
||||
return storedConnections.value
|
||||
.filter(c => !pinnedConnections.value.has(c.uid))
|
||||
.map(c => {
|
||||
const connTime = lastConnections.value.find((lc) => lc.uid === c.uid)?.time || 0;
|
||||
return { ...c, time: connTime };
|
||||
})
|
||||
.sort((a, b) => {
|
||||
if (a.time < b.time) return 1;
|
||||
else if (a.time > b.time) return -1;
|
||||
return 0;
|
||||
});
|
||||
});
|
||||
|
||||
const hasUpdates = computed(() => ['available', 'downloading', 'downloaded', 'link'].includes(updateStatus.value));
|
||||
|
||||
const contextMenu = (event: MouseEvent, connection: ConnectionParams) => {
|
||||
@@ -101,11 +162,14 @@ const contextMenu = (event: MouseEvent, connection: ConnectionParams) => {
|
||||
};
|
||||
|
||||
const tooltipPosition = (e: Event) => {
|
||||
const el = e.target ? e.target : e;
|
||||
const fromTop = isLinux
|
||||
? window.scrollY + (el as HTMLElement).getBoundingClientRect().top + ((el as HTMLElement).offsetHeight / 4)
|
||||
: window.scrollY + (el as HTMLElement).getBoundingClientRect().top - ((el as HTMLElement).offsetHeight / 4);
|
||||
(el as HTMLElement).querySelector<HTMLElement>('.ex-tooltip-content').style.top = `${fromTop}px`;
|
||||
const el = (e.target ? e.target : e) as unknown as HTMLElement;
|
||||
const tooltip = el.querySelector<HTMLElement>('.ex-tooltip-content');
|
||||
if (tooltip) {
|
||||
const fromTop = isLinux
|
||||
? window.scrollY + el.getBoundingClientRect().top + (el.offsetHeight / 4)
|
||||
: window.scrollY + el.getBoundingClientRect().top - (el.offsetHeight / 4);
|
||||
tooltip.style.top = `${fromTop}px`;
|
||||
}
|
||||
};
|
||||
|
||||
const getStatusBadge = (uid: string) => {
|
||||
@@ -126,13 +190,50 @@ const getStatusBadge = (uid: string) => {
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const dragStop = (e: any) => { // TODO: temp
|
||||
const dragStop = (e: any) => {
|
||||
isDragging.value = false;
|
||||
|
||||
setTimeout(() => {
|
||||
tooltipPosition(e.originalEvent.target.parentNode);
|
||||
}, 200);
|
||||
};
|
||||
|
||||
watch(sidebarConnectionsHeight, (value) => {
|
||||
isScrollable.value = value < sidebarConnections.value.scrollHeight;
|
||||
});
|
||||
|
||||
watch(unpinnedConnectionsArr, (newVal, oldVal) => {
|
||||
if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
|
||||
setTimeout(() => {
|
||||
const element = document.querySelector<HTMLElement>('.settingbar-element.selected');
|
||||
if (element) {
|
||||
const rect = element.getBoundingClientRect();
|
||||
const elemTop = rect.top;
|
||||
const elemBottom = rect.bottom;
|
||||
const isVisible = (elemTop >= 0) && (elemBottom <= window.innerHeight);
|
||||
|
||||
if (!isVisible) {
|
||||
element.setAttribute('tabindex', '-1');
|
||||
element.focus();
|
||||
element.removeAttribute('tabindex');
|
||||
}
|
||||
}
|
||||
}, 50);
|
||||
}
|
||||
});
|
||||
|
||||
watch(selectedWorkspace, (newVal, oldVal) => {
|
||||
if (newVal !== oldVal) {
|
||||
setTimeout(() => {
|
||||
const element = document.querySelector<HTMLElement>('.settingbar-element.selected');
|
||||
if (element) {
|
||||
element.setAttribute('tabindex', '-1');
|
||||
element.focus();
|
||||
element.removeAttribute('tabindex');
|
||||
}
|
||||
}, 150);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@@ -141,7 +242,7 @@ const dragStop = (e: any) => { // TODO: temp
|
||||
height: calc(100vh - #{$excluding-size});
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
// justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
z-index: 9;
|
||||
@@ -149,7 +250,7 @@ const dragStop = (e: any) => { // TODO: temp
|
||||
.settingbar-top-elements {
|
||||
overflow-x: hidden;
|
||||
overflow-y: overlay;
|
||||
max-height: calc((100vh - 3.5rem) - #{$excluding-size});
|
||||
// max-height: calc((100vh - 3.5rem) - #{$excluding-size});
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 3px;
|
||||
@@ -157,8 +258,8 @@ const dragStop = (e: any) => { // TODO: temp
|
||||
}
|
||||
|
||||
.settingbar-bottom-elements {
|
||||
padding-top: 0.5rem;
|
||||
z-index: 1;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.settingbar-elements {
|
||||
@@ -214,6 +315,21 @@ const dragStop = (e: any) => { // TODO: temp
|
||||
bottom: initial;
|
||||
}
|
||||
}
|
||||
|
||||
.settingbar-element-pin{
|
||||
margin: 0 auto;
|
||||
|
||||
&::before {
|
||||
font: normal normal normal 14px/1 "Material Design Icons";
|
||||
content: "\F0403";
|
||||
color: $body-font-color-dark;
|
||||
transform: rotate(45deg);
|
||||
opacity: .25;
|
||||
bottom: -8px;
|
||||
left: -4px;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -512,7 +512,9 @@ const {
|
||||
selectTab,
|
||||
newTab,
|
||||
removeTab,
|
||||
updateTabs
|
||||
updateTabs,
|
||||
selectNextTab,
|
||||
selectPrevTab
|
||||
} = workspacesStore;
|
||||
|
||||
const props = defineProps({
|
||||
@@ -588,6 +590,22 @@ const onKey = (e: KeyboardEvent) => {
|
||||
if (currentTab)
|
||||
closeTab(currentTab);
|
||||
}
|
||||
|
||||
// select next tab
|
||||
if (e.altKey && (e.ctrlKey || e.metaKey) && e.key === 'ArrowRight')
|
||||
selectNextTab({ uid: props.connection.uid });
|
||||
|
||||
// select prev tab
|
||||
if (e.altKey && (e.ctrlKey || e.metaKey) && e.key === 'ArrowLeft')
|
||||
selectPrevTab({ uid: props.connection.uid });
|
||||
|
||||
// select tab by index (range 1-9). CTRL|CMD number
|
||||
if ((e.ctrlKey || e.metaKey) && !e.altKey && e.keyCode >= 49 && e.keyCode <= 57) {
|
||||
const newIndex = parseInt(e.key) - 1;
|
||||
|
||||
if (workspace.value.tabs[newIndex])
|
||||
selectTab({ uid: props.connection.uid, tab: workspace.value.tabs[newIndex].uid });
|
||||
}
|
||||
};
|
||||
|
||||
const openAsPermanentTab = (tab: WorkspaceTab) => {
|
||||
|
@@ -411,12 +411,12 @@ const workspacesStore = useWorkspacesStore();
|
||||
|
||||
const { connectWorkspace, selectWorkspace } = workspacesStore;
|
||||
|
||||
const clients = ref([
|
||||
const clients = [
|
||||
{ name: 'MySQL', slug: 'mysql' },
|
||||
{ name: 'MariaDB', slug: 'maria' },
|
||||
{ name: 'PostgreSQL', slug: 'pg' },
|
||||
{ name: 'SQLite', slug: 'sqlite' }
|
||||
]);
|
||||
];
|
||||
|
||||
const connection = ref({
|
||||
name: '',
|
||||
|
@@ -253,6 +253,14 @@
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group columns">
|
||||
<div class="column col-4 col-sm-12" />
|
||||
<div class="column col-8 col-sm-12">
|
||||
<label class="form-checkbox form-inline">
|
||||
<input v-model="localConnection.untrustedConnection" type="checkbox"><i class="form-icon" /> {{ t('message.untrustedConnection') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
@@ -416,12 +424,12 @@ const { editConnection } = useConnectionsStore();
|
||||
const { addNotification } = useNotificationsStore();
|
||||
const { connectWorkspace } = useWorkspacesStore();
|
||||
|
||||
const clients = ref([
|
||||
const clients = [
|
||||
{ name: 'MySQL', slug: 'mysql' },
|
||||
{ name: 'MariaDB', slug: 'maria' },
|
||||
{ name: 'PostgreSQL', slug: 'pg' },
|
||||
{ name: 'SQLite', slug: 'sqlite' }
|
||||
]);
|
||||
];
|
||||
|
||||
const firstInput: Ref<HTMLInputElement> = ref(null);
|
||||
const localConnection: Ref<ConnectionParams & { pgConnString: string }> = ref(null);
|
||||
|
@@ -125,9 +125,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Component, computed, onBeforeUnmount, onMounted, onUnmounted, Ref, ref, watch } from 'vue';
|
||||
import { Component, computed, onBeforeUnmount, onMounted, onUnmounted, Prop, Ref, ref, watch } from 'vue';
|
||||
import { Ace } from 'ace-builds';
|
||||
import { EventInfos } from 'common/interfaces/antares';
|
||||
import { ConnectionParams, EventInfos } from 'common/interfaces/antares';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useNotificationsStore } from '@/stores/notifications';
|
||||
import { useWorkspacesStore } from '@/stores/workspaces';
|
||||
@@ -141,7 +141,7 @@ const { t } = useI18n();
|
||||
|
||||
const props = defineProps({
|
||||
tabUid: String,
|
||||
connection: Object,
|
||||
connection: Object as Prop<ConnectionParams>,
|
||||
tab: Object,
|
||||
isSelected: Boolean,
|
||||
schema: String
|
||||
|
@@ -332,7 +332,10 @@ const addField = () => {
|
||||
collation: defaultCollation.value,
|
||||
autoIncrement: false,
|
||||
onUpdate: '',
|
||||
comment: ''
|
||||
comment: '',
|
||||
alias: '',
|
||||
tableAlias: '',
|
||||
orgTable: ''
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
|
@@ -56,7 +56,8 @@ const useFocusTrap = (args?: {disableAutofocus?: boolean}) => {
|
||||
}
|
||||
|
||||
function initFocusTrap () {
|
||||
if (!trapRef.value || isInitiated.value) return;
|
||||
if (!trapRef.value || (isInitiated.value)) return;
|
||||
|
||||
focusableElements = (trapRef.value as HTMLElement).querySelectorAll(
|
||||
focusableElementsSelector
|
||||
);
|
||||
|
@@ -139,7 +139,9 @@ module.exports = {
|
||||
commit: 'Commit',
|
||||
rollback: 'Rollback',
|
||||
connectionString: 'Connection string',
|
||||
contributors: 'Contributors'
|
||||
contributors: 'Contributors',
|
||||
pin: 'Pin',
|
||||
unpin: 'Unpin'
|
||||
},
|
||||
message: {
|
||||
appWelcome: 'Welcome to Antares SQL Client!',
|
||||
@@ -291,7 +293,10 @@ module.exports = {
|
||||
untrustedConnection: 'Untrusted connection',
|
||||
missingOrIncompleteTranslation: 'Missing or incomplete translation?',
|
||||
findOutHowToContribute: 'Find out how to contribute',
|
||||
disableFKChecks: 'Disable foreigh key checks'
|
||||
disableFKChecks: 'Disable foreigh key checks',
|
||||
allConnections: 'All connections',
|
||||
searchForConnections: 'Search for connections',
|
||||
disableScratchpad: 'Disable scratchpad'
|
||||
},
|
||||
faker: {
|
||||
address: 'Address',
|
||||
|
@@ -3,6 +3,7 @@
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
background-size: cover;
|
||||
position: relative;
|
||||
|
||||
&.dbi-mysql {
|
||||
background-image: url("../images/svg/mysql.svg");
|
||||
|
@@ -356,6 +356,16 @@ option:checked {
|
||||
.accordion-body {
|
||||
max-height: 5000rem !important;
|
||||
}
|
||||
.btn {
|
||||
&:focus{
|
||||
box-shadow: 0 0 3px 1px rgba($primary-color, 90%);
|
||||
}
|
||||
|
||||
&.btn-success:focus {
|
||||
border-color: $primary-color;
|
||||
box-shadow: 0 0 3px 1px rgba($primary-color, 90%);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
flex-wrap: nowrap;
|
||||
@@ -368,6 +378,10 @@ option:checked {
|
||||
}
|
||||
}
|
||||
|
||||
.divider {
|
||||
margin: 0.15rem 0.3rem;
|
||||
}
|
||||
|
||||
.table-dropdown {
|
||||
.menu {
|
||||
min-width: 100%;
|
||||
|
@@ -148,6 +148,10 @@
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.divider {
|
||||
border-top: 0.05rem solid rgba($body-font-color-dark, 0.1);
|
||||
}
|
||||
|
||||
.form-switch .form-icon::before {
|
||||
background: $bg-color-light-dark;
|
||||
}
|
||||
@@ -252,6 +256,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
.connection-block{
|
||||
&:hover {
|
||||
background: $bg-color-light-dark;
|
||||
}
|
||||
}
|
||||
|
||||
.bg-checkered {
|
||||
background-image:
|
||||
linear-gradient(to right, rgba(192, 192, 192, 0.75), rgba(192, 192, 192, 0.75)),
|
||||
@@ -396,9 +406,7 @@
|
||||
}
|
||||
|
||||
.settingbar-bottom-elements {
|
||||
padding-top: 0.5rem;
|
||||
background: $bg-color-light-dark;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.settingbar-elements {
|
||||
|
@@ -94,6 +94,10 @@
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.divider {
|
||||
border-top: 0.05rem solid rgba($body-font-color-dark, 0.1);
|
||||
}
|
||||
|
||||
.tile {
|
||||
transition: background 0.2s;
|
||||
|
||||
@@ -165,9 +169,7 @@
|
||||
}
|
||||
|
||||
.settingbar-bottom-elements {
|
||||
padding-top: 0.5rem;
|
||||
background: $bg-color-light-dark;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.settingbar-elements {
|
||||
@@ -272,6 +274,12 @@
|
||||
background: rgba($bg-color-light-gray, 100%);
|
||||
}
|
||||
}
|
||||
|
||||
.connection-block{
|
||||
&:hover {
|
||||
background: $bg-color-light-gray;
|
||||
}
|
||||
}
|
||||
|
||||
.context {
|
||||
color: $body-font-color-dark;
|
||||
|
@@ -17,7 +17,9 @@ const persistentStore = new Store({
|
||||
|
||||
export const useConnectionsStore = defineStore('connections', {
|
||||
state: () => ({
|
||||
connections: persistentStore.get('connections', []) as ConnectionParams[]
|
||||
connections: persistentStore.get('connections', []) as ConnectionParams[],
|
||||
pinnedConnections: new Set([...persistentStore.get('pinnedConnections', []) as string[]]) as Set<string>,
|
||||
lastConnections: persistentStore.get('lastConnections', []) as {uid: string; time: number}[]
|
||||
}),
|
||||
getters: {
|
||||
getConnectionName: state => (uid: string) => {
|
||||
@@ -50,6 +52,8 @@ export const useConnectionsStore = defineStore('connections', {
|
||||
deleteConnection (connection: ConnectionParams) {
|
||||
this.connections = (this.connections as ConnectionParams[]).filter(el => el.uid !== connection.uid);
|
||||
persistentStore.set('connections', this.connections);
|
||||
(this.pinnedConnections as Set<string>).delete(connection.uid);
|
||||
persistentStore.set('pinnedConnections', [...this.pinnedConnections]);
|
||||
},
|
||||
editConnection (connection: ConnectionParams) {
|
||||
const editedConnections = (this.connections as ConnectionParams[]).map(conn => {
|
||||
@@ -63,6 +67,28 @@ export const useConnectionsStore = defineStore('connections', {
|
||||
updateConnections (connections: ConnectionParams[]) {
|
||||
this.connections = connections;
|
||||
persistentStore.set('connections', this.connections);
|
||||
},
|
||||
updatePinnedConnections (pinned: string[]) {
|
||||
this.pinnedConnections = new Set(pinned);
|
||||
persistentStore.set('pinnedConnections', [...this.pinnedConnections]);
|
||||
},
|
||||
pinConnection (uid: string) {
|
||||
(this.pinnedConnections as Set<string>).add(uid);
|
||||
persistentStore.set('pinnedConnections', [...this.pinnedConnections]);
|
||||
},
|
||||
unpinConnection (uid: string) {
|
||||
(this.pinnedConnections as Set<string>).delete(uid);
|
||||
persistentStore.set('pinnedConnections', [...this.pinnedConnections]);
|
||||
},
|
||||
updateLastConnection (uid: string) {
|
||||
const cIndex = (this.lastConnections as {uid: string; time: number}[]).findIndex((c) => c.uid === uid);
|
||||
|
||||
if (cIndex >= 0)
|
||||
this.lastConnections[cIndex].time = new Date().getTime();
|
||||
else
|
||||
this.lastConnections.push({ uid, time: new Date().getTime() });
|
||||
|
||||
persistentStore.set('lastConnections', this.lastConnections);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -23,7 +23,8 @@ export const useSettingsStore = defineStore('settings', {
|
||||
editorTheme: persistentStore.get('editor_theme', defaultEditorTheme) as string,
|
||||
editorFontSize: persistentStore.get('editor_font_size', 'medium') as EditorFontSize,
|
||||
restoreTabs: persistentStore.get('restore_tabs', true) as boolean,
|
||||
disableBlur: persistentStore.get('disable_blur', false) as boolean
|
||||
disableBlur: persistentStore.get('disable_blur', false) as boolean,
|
||||
disableScratchpad: persistentStore.get('disable_scratchpad', false) as boolean
|
||||
}),
|
||||
actions: {
|
||||
changeLocale (locale: string) {
|
||||
@@ -75,6 +76,10 @@ export const useSettingsStore = defineStore('settings', {
|
||||
changeDisableBlur (val: boolean) {
|
||||
this.disableBlur = val;
|
||||
persistentStore.set('disable_blur', this.disableBlur);
|
||||
},
|
||||
changeDisableScratchpad (val: boolean) {
|
||||
this.disableScratchpad = val;
|
||||
persistentStore.set('disable_scratchpad', this.disableScratchpad);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -170,6 +170,9 @@ export const useWorkspacesStore = defineStore('workspaces', {
|
||||
let dataTypes: TypesGroup[] = [];
|
||||
let indexTypes: string[] = [];
|
||||
let clientCustomizations: Customizations;
|
||||
const { updateLastConnection } = connectionsStore;
|
||||
|
||||
updateLastConnection(connection.uid);
|
||||
|
||||
switch (connection.client) {
|
||||
case 'mysql':
|
||||
@@ -715,44 +718,6 @@ export const useWorkspacesStore = defineStore('workspaces', {
|
||||
);
|
||||
persistentStore.set(uid, (this.workspaces as Workspace[]).find(workspace => workspace.uid === uid).tabs);
|
||||
},
|
||||
// setTabFields ({ cUid, tUid, fields }: { cUid: string; tUid: string; fields: any }) {
|
||||
// this.workspaces = (this.workspaces as Workspace[]).map(workspace => {
|
||||
// if (workspace.uid === cUid) {
|
||||
// return {
|
||||
// ...workspace,
|
||||
// tabs: workspace.tabs.map(tab => {
|
||||
// if (tab.uid === tUid)
|
||||
// return { ...tab, fields };
|
||||
// else
|
||||
// return tab;
|
||||
// })
|
||||
// };
|
||||
// }
|
||||
// else
|
||||
// return workspace;
|
||||
// });
|
||||
|
||||
// persistentStore.set(cUid, (this.workspaces as Workspace[]).find(workspace => workspace.uid === cUid).tabs);
|
||||
// },
|
||||
// setTabKeyUsage ({ cUid, tUid, keyUsage }: { cUid: string; tUid: string; keyUsage: any }) {
|
||||
// this.workspaces = (this.workspaces as Workspace[]).map(workspace => {
|
||||
// if (workspace.uid === cUid) {
|
||||
// return {
|
||||
// ...workspace,
|
||||
// tabs: workspace.tabs.map(tab => {
|
||||
// if (tab.uid === tUid)
|
||||
// return { ...tab, keyUsage };
|
||||
// else
|
||||
// return tab;
|
||||
// })
|
||||
// };
|
||||
// }
|
||||
// else
|
||||
// return workspace;
|
||||
// });
|
||||
|
||||
// persistentStore.set(cUid, (this.workspaces as Workspace[]).find(workspace => workspace.uid === cUid).tabs);
|
||||
// },
|
||||
setUnsavedChanges ({ uid, tUid, isChanged }: { uid: string; tUid: string; isChanged: boolean }) {
|
||||
this.workspaces = (this.workspaces as Workspace[]).map(workspace => {
|
||||
if (workspace.uid === uid) {
|
||||
|
@@ -5,6 +5,7 @@
|
||||
"./src/renderer/**/*",
|
||||
"./src/common/interfaces/antares.ts"
|
||||
],
|
||||
"exclude": ["./src/renderer/libs/ext-language_tools.js"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"target": "es2021",
|
||||
|
Reference in New Issue
Block a user