1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

Compare commits

...

6 Commits

Author SHA1 Message Date
9d90dc362e chore(release): 0.7.13 2023-07-06 22:02:55 +02:00
e808b86c52 fix(PostgreSQL): unable to connect to database, fixes #614 2023-07-06 22:01:41 +02:00
6e01f0f2e7 fix: unable to copy as sql inserts with BIT fileds, fixes #613 2023-07-06 12:06:32 +02:00
38bfea279c feat: button to open table settings tab, closes #608 2023-07-05 18:27:30 +02:00
0044522390 Merge pull request #611 from 64knl/feat/update-connection-icons
feat: update connection icons
2023-07-05 17:42:49 +02:00
Rene
462ede8dc7 feat: update connection
icons to better match other icons
2023-07-05 15:50:17 +02:00
11 changed files with 71 additions and 21 deletions

View File

@@ -2,6 +2,20 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [0.7.13](https://github.com/antares-sql/antares/compare/v0.7.12...v0.7.13) (2023-07-06)
### Features
* button to open table settings tab, closes [#608](https://github.com/antares-sql/antares/issues/608) ([38bfea2](https://github.com/antares-sql/antares/commit/38bfea279ce93366dfd2021d0e91622a5a88878e))
* update connection ([462ede8](https://github.com/antares-sql/antares/commit/462ede8dc701aaf9c6089b3ec41eea0f31babdf9))
### Bug Fixes
* **PostgreSQL:** unable to connect to database, fixes [#614](https://github.com/antares-sql/antares/issues/614) ([e808b86](https://github.com/antares-sql/antares/commit/e808b86c52b8488e0c079a9f0ddce225338af4c0))
* unable to copy as sql inserts with BIT fileds, fixes [#613](https://github.com/antares-sql/antares/issues/613) ([6e01f0f](https://github.com/antares-sql/antares/commit/6e01f0f2e7194284341f89a44839d16398358f9b))
### [0.7.12](https://github.com/antares-sql/antares/compare/v0.7.11...v0.7.12) (2023-07-03)

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "antares",
"version": "0.7.12",
"version": "0.7.13",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "antares",
"version": "0.7.12",
"version": "0.7.13",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {

View File

@@ -1,7 +1,7 @@
{
"name": "antares",
"productName": "Antares",
"version": "0.7.12",
"version": "0.7.13",
"description": "A modern, fast and productivity driven SQL client with a focus in UX.",
"license": "MIT",
"repository": "https://github.com/antares-sql/antares.git",

View File

@@ -72,7 +72,7 @@ export const escapeAndQuote = (val: string, client: ClientCode) => {
export const valueToSqlString = (args: {
val: any;
client: ClientCode;
field: {type: string; datePrecision: number; isArray?: boolean};
field: {type: string; datePrecision?: number; precision?: number | false; isArray?: boolean};
}): string => {
let parsedValue;
const { val, client, field } = args;
@@ -105,7 +105,7 @@ export const valueToSqlString = (args: {
else if (TEXT_SEARCH.includes(field.type))
parsedValue = `'${val.replaceAll('\'', '\'\'')}'`;
else if (BIT.includes(field.type))
parsedValue = `b'${hexToBinary(Buffer.from(val).toString('hex') as undefined as HexChar[])}'`;
parsedValue = `b'${hexToBinary(Buffer.from(new Uint8Array(Object.values(val))).toString('hex') as undefined as HexChar[])}'`;
else if (BLOB.includes(field.type)) {
let buffer: Buffer;
if (val instanceof Uint8Array)

View File

@@ -104,7 +104,7 @@
class="tab-link"
:class="{'badge': element.isChanged}"
>
<i class="mdi mdi-tune-vertical-variant mdi-18px mr-1" />
<i class="mdi mdi-wrench-cog mdi-18px mr-1" />
<span :title="`${t('word.settings').toUpperCase()}: ${t(`word.${element.elementType}`)}`">
{{ cutText(element.elementName, 20, true) }}
<span
@@ -121,7 +121,7 @@
class="tab-link"
:class="{'badge': element.isChanged}"
>
<i class="mdi mdi-tune-vertical-variant mdi-18px mr-1" />
<i class="mdi mdi-wrench-cog mdi-18px mr-1" />
<span :title="`${t('word.settings').toUpperCase()}: ${t(`word.view`)}`">
{{ cutText(element.elementName, 20, true) }}
<span
@@ -241,7 +241,7 @@
:class="{'badge': element.isChanged}"
@dblclick="openAsPermanentTab(element)"
>
<i class="mdi mdi-18px mdi-tune-vertical-variant mr-1" />
<i class="mdi mdi-18px mdi-wrench-cog mr-1" />
<span :title="`${t('word.settings').toUpperCase()}: ${t(`word.${element.elementType}`)}`">
<span class=" text-italic">{{ cutText(element.elementName, 20, true) }}</span>
<span
@@ -258,7 +258,7 @@
class="tab-link"
:class="{'badge': element.isChanged}"
>
<i class="mdi mdi-18px mdi-tune-vertical-variant mr-1" />
<i class="mdi mdi-18px mdi-wrench-cog mr-1" />
<span :title="`${t('word.settings').toUpperCase()}: ${t(`word.${element.elementType}`)}`">
{{ cutText(element.elementName, 20, true) }}
<span
@@ -331,8 +331,8 @@
</li>
</template>
</Draggable>
<WorkspaceEmptyState v-if="!workspace.tabs.length" @new-tab="addQueryTab" />
<template v-for="tab of workspace.tabs" :key="tab.uid">
<WorkspaceEmptyState v-if="!draggableTabs.length" @new-tab="addQueryTab" />
<template v-for="tab of draggableTabs" :key="tab.uid">
<WorkspaceTabQuery
v-if="tab.type ==='query'"
:tab-uid="tab.uid"

View File

@@ -8,14 +8,14 @@
class="context-element"
@click="openTableSettingTab"
>
<span class="d-flex"><i class="mdi mdi-18px mdi-tune-vertical-variant text-light pr-1" /> {{ t('word.settings') }}</span>
<span class="d-flex"><i class="mdi mdi-18px mdi-wrench-cog text-light pr-1" /> {{ t('word.settings') }}</span>
</div>
<div
v-if="selectedTable && selectedTable.type === 'view' && customizations.viewSettings"
class="context-element"
@click="openViewSettingTab"
>
<span class="d-flex"><i class="mdi mdi-18px mdi-tune-vertical-variant text-light pr-1" /> {{ t('word.settings') }}</span>
<span class="d-flex"><i class="mdi mdi-18px mdi-wrench-cog text-light pr-1" /> {{ t('word.settings') }}</span>
</div>
<div
v-if="selectedTable && selectedTable.type === 'table' && customizations.tableDuplicate"

View File

@@ -293,7 +293,7 @@ const inputProps = computed(() => {
let timeMask = '##:##:##';
const precision = props.fields[editingField.value].length;
for (let i = 0; i < precision; i++)
for (let i = 0; i < Number(precision); i++)
timeMask += i === 0 ? '.#' : '#';
if (HAS_TIMEZONE.includes(editingType.value))
@@ -309,7 +309,7 @@ const inputProps = computed(() => {
let datetimeMask = '####-##-## ##:##:##';
const precision = props.fields[editingField.value].length;
for (let i = 0; i < precision; i++)
for (let i = 0; i < Number(precision); i++)
datetimeMask += i === 0 ? '.#' : '#';
if (HAS_TIMEZONE.includes(editingType.value))
@@ -582,7 +582,7 @@ const typeFormat = (val: string | number | Date | number[], type: string, precis
return val;
let datePrecision = '';
for (let i = 0; i < precision; i++)
for (let i = 0; i < Number(precision); i++)
datePrecision += i === 0 ? '.S' : 'S';
return moment(val).isValid() ? moment(val).format(`YYYY-MM-DD HH:mm:ss${datePrecision}`) : val;

View File

@@ -89,7 +89,7 @@
<span>{{ t('message.insertRow', 2) }}</span>
</button>
<div class="dropdown table-dropdown pr-2">
<div class="dropdown table-dropdown">
<button
:disabled="isQuering"
class="btn btn-dark btn-sm dropdown-toggle mr-0 pr-0"
@@ -114,6 +114,19 @@
</li>
</ul>
</div>
<div class="divider-vert py-3" />
<button
v-if="isTable"
class="btn btn-dark btn-sm"
:disabled="isQuering"
:title="t('word.settings')"
@click="openTableSettingTab()"
>
<i class="mdi mdi-24px mdi-cog" />
<!-- <span>{{ t('word.settings') }}</span> -->
</button>
</div>
<div class="workspace-query-info">
<div
@@ -203,6 +216,7 @@ import { ConnectionParams } from 'common/interfaces/antares';
import { TableFilterClausole } from 'common/interfaces/tableApis';
import { useFilters } from '@/composables/useFilters';
import { ipcRenderer } from 'electron';
import { table } from 'console';
const { localeString } = useFilters();
@@ -231,7 +245,7 @@ const workspacesStore = useWorkspacesStore();
const { dataTabLimit: limit } = storeToRefs(settingsStore);
const { changeBreadcrumbs, getWorkspace } = workspacesStore;
const { changeBreadcrumbs, getWorkspace, newTab } = workspacesStore;
const pageSelect: Ref<HTMLInputElement> = ref(null);
const tabUid = ref('data');
@@ -428,6 +442,21 @@ const hasApproximately = computed(() => {
results.value[0].rows.length < approximateCount.value;
});
const openTableSettingTab = () => {
newTab({
uid: workspace.value.uid,
elementName: props.table,
schema: props.schema,
type: 'table-props',
elementType: 'table'
});
changeBreadcrumbs({
schema: props.schema,
table: props.table
});
};
watch(() => props.schema, () => {
if (props.isSelected) {
page.value = 1;

View File

@@ -1 +1,8 @@
<svg height="32" viewBox="0 0 45.025 44.217" width="32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m0 0h191.356v57.344h-191.356z"/></clipPath><path clip-path="url(#a)" d="m75.198 5.328c-1.872.047-2.977.863-3.34 2.42.48.418 1.126.6 1.77.572 1.415-.06 2.817-1.138 2.42-2.965-.298-.025-.582-.035-.85-.027m9.642-5.328h-.167c-1.335.043-1.542.767-4.425 1.477-2.912.717-5.725.028-8.86 1.344-9.363 3.927-11.358 17.472-19.868 22.279-6.36 3.593-12.512 5.188-18.28 6.995-3.792 1.188-7.552 2.556-10.988 5.516-2.667 2.3-3.4 4.085-6.177 6.97-2.835 2.933-11.553-2.258-15.8 1.54a.84.84 0 0 0 .014 1.253c.92.805 2.67 2.722 4.336 3.314-.528 1-3.513 3.946-2.904 5.42.64 1.55 8.04.497 14.88-3.633 3.185-1.924 5.723-4.696 10.685-5.357 6.42-.855 13.817.55 21.25 1.62-1.103 3.286-3.315 5.473-5.088 8.1-.55.592 1.103.658 2.986.3 3.4-.838 5.832-1.513 8.4-3 3.143-1.83 3.62-6.52 7.474-7.534 1.864 2.865 6.5 3.83 10.074 2.3.198-.084.392-.177.582-.275.43-.375.178-.813-.086-1.135a6.21 6.21 0 0 1 -.362-.364c-2.012-2.162-2.472-7.266-1.58-9.748 1.017-2.824 2.022-7.343 3.046-11.075 1.1-4 1.506-9.063 2.837-11.106 2.002-3.072 4.215-4.127 6.136-5.86s3.68-3.42 3.62-7.384c-.028-1.223-.629-1.927-1.735-1.957m.204 4.163c-.397 2.734-2.144 4.237-4.208 5.687-1.8 1.27-3.794 2.493-5.07 4.477-1.305 2.03-2.134 8.985-4.16 15.852-1.68 5.698-4.184 11.335-8.467 14.05-.278.176-.645.015-.704-.3-.3-1.592-.24-4.5-.734-3.56-.62 1.77-1.322 3.458-2.143 5.027-2.52 4.816-6.166 8.505-12.057 9.95a.53.53 0 0 1 -.552-.82c2.718-3.77 5.15-7.825 5.447-14.014.025-.534-.646-.778-.983-.364-1.284 1.583-1.6 5.347-3.477 6.506-1.474.16-2.967.16-4.47.07-6.17-.37-12.502-2.226-18.274-.373-3.93 1.262-8.057 4.85-11.386 6.293-3.912 1.686-5.766 3.286-10.706 3.176-.505-.68 2.062-3.623 2.934-4.893.278-.407-.317-.835-.874-1.1-1.338-.614-2.68-2.28-4.107-2.93.183-.337.83-.674 1.187-.88 3.24-1.88 11.832 2.124 14.14-.143 1.425-1.398 2.385-2.626 3.353-4.05.94-1.38 2.368-2.838 3.847-4.047a31.3 31.3 0 0 1 1.94-1.435c2.52-1.724 3.907-1.852 7.17-3.064 4.152-1.544 9.293-2.898 13.747-4.6 2.752-1.053 5.744-2.35 8.183-4.17.58-.432 1.127-.893 1.634-1.386 6.964-6.8 8.345-18.766 19.2-19.882 1.314-.135 2.248-.192 3.228-.223 1.096-.03 2.18-.3 3.263-.818.334-.146 2.324-1.35 2.996-.768.448.388.115 2.492.086 2.72" fill="#fff" transform="matrix(.52012 0 0 .52012 0 7.19564)"/></svg>
<svg height="32" viewBox="0 0 45.025 44.217" width="32" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><g
transform="matrix(0.13871016,0,0,0.13871016,1.6658507,8.5440648)"><path
d="m 299.2,3.87 a 4.36,4.36 0 0 0 -2.92,-1 c -2.9,0 -6.65,2 -8.66,3 -0.35,0.18 -0.62,0.33 -0.81,0.41 A 27.32,27.32 0 0 1 276,9.06 c -3.86,0.12 -7.19,0.35 -11.5,0.79 -25.66,2.64 -37.05,22.28 -48.06,41.27 -6,10.33 -12.18,21 -20.67,29.28 a 55,55 0 0 1 -5.59,4.75 c -8.78,6.54 -19.81,11.17 -28.43,14.47 -8.26,3.15 -17.28,6 -26,8.74 -8,2.51 -15.51,4.88 -22.44,7.46 -3.13,1.16 -5.79,2.05 -8.13,2.83 -6.31,2.1 -10.87,3.62 -17.51,8.16 -2.59,1.78 -5.19,3.7 -7,5.14 a 73.49,73.49 0 0 0 -13.87,14.63 87.05,87.05 0 0 1 -11.6,14 c -1.4,1.37 -3.89,2 -7.62,2 -4.37,0 -9.67,-0.9 -15.28,-1.86 -5.77,-1 -11.75,-2 -16.87,-2 -4.17,0 -7.35,0.68 -9.74,2.06 0,0 -4,2.34 -5.69,5.36 l 1.66,0.76 a 34.33,34.33 0 0 1 7.1,5.1 35.39,35.39 0 0 0 7.37,5.25 6.61,6.61 0 0 1 2.27,1.51 c -0.7,1 -1.73,2.35 -2.8,3.76 -5.92,7.74 -9.37,12.63 -7.39,15.29 a 6.15,6.15 0 0 0 3,0.7 c 12.9,0 19.82,-3.35 28.59,-7.59 2.54,-1.23 5.16,-2.5 8.16,-3.8 5.12,-2.22 10.64,-5.77 16.48,-9.52 7.74,-5 15.74,-10.12 23.49,-12.6 a 63.71,63.71 0 0 1 19.71,-2.77 c 8.23,0 16.83,1.1 25.15,2.16 6.21,0.8 12.63,1.62 18.93,2 2.45,0.15 4.72,0.22 6.92,0.22 a 77.2,77.2 0 0 0 8.83,-0.47 l 0.7,-0.24 c 4.42,-2.72 6.49,-8.55 8.5,-14.19 1.29,-3.62 2.37,-6.88 4.05,-9 a 2.1,2.1 0 0 1 0.34,-0.28 0.41,0.41 0 0 1 0.5,0.08 c 0,0 0,0 0,0.16 -1.06,22.05 -9.9,36.05 -18.88,48.49 l -6,6.43 c 0,0 8.39,0 13.16,-1.84 17.42,-5.22 30.58,-16.69 40.15,-35 a 148.57,148.57 0 0 0 6.32,-14.45 c 0.16,-0.41 1.68,-1.16 1.53,1 0,0.63 -0.09,1.33 -0.14,2 v 0 c 0,0.44 -0.06,0.88 -0.08,1.32 -0.25,3 -1,9.57 -1,9.57 l 5.38,-2.88 c 13,-8.23 23,-24.74 30.56,-50.48 3.16,-10.71 5.47,-21.36 7.51,-30.75 2.44,-11.24 4.55,-20.94 7,-24.69 3.78,-5.88 9.55,-9.86 15.13,-13.72 l 2.28,-1.58 c 7,-4.93 14,-10.62 15.54,-21.22 v -0.24 c 1.2,-7.82 0.25,-9.83 -0.82,-10.76 z"
transform="translate(0,-2.9)"
style="fill:#ffffff" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -233,7 +233,7 @@ export const useWorkspacesStore = defineStore('workspaces', {
const selectedTab = cachedTabs.length
? connection.database
? cachedTabs.filter(tab => tab.type === 'query' || tab.database === connection.database)[0].uid
? cachedTabs.filter(tab => tab.type === 'query' || tab.database === connection.database)[0]?.uid
: cachedTabs[0].uid
: null;