diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index aac24863..c98243d7 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -1,4 +1,4 @@ -name: Build/release [linux] +name: Build/release [LINUX] on: push diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml index 8c79ef4c..10f92ead 100644 --- a/.github/workflows/build-mac.yml +++ b/.github/workflows/build-mac.yml @@ -1,4 +1,4 @@ -name: Build/release [mac] +name: Build/release [MAC] on: push diff --git a/.github/workflows/build-win.yml b/.github/workflows/build-win.yml index 4f6ccdab..d5379621 100644 --- a/.github/workflows/build-win.yml +++ b/.github/workflows/build-win.yml @@ -1,4 +1,4 @@ -name: Build/release [windows] +name: Build/release [WINDOWS] on: push diff --git a/.github/workflows/create-artifact-linux.yml b/.github/workflows/create-artifact-linux.yml new file mode 100644 index 00000000..c053ce4e --- /dev/null +++ b/.github/workflows/create-artifact-linux.yml @@ -0,0 +1,26 @@ +name: Create artifact [LINUX] + +on: + workflow_dispatch: {} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v3 + + - name: npm install & build + run: | + npm install + npm run build:local + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: linux-build + retention-days: 3 + path: | + build + !build/*-unpacked + !build/.icon-ico diff --git a/.github/workflows/test-e2e-linux.yml b/.github/workflows/test-e2e-linux.yml index 407fc365..a53ccfc2 100644 --- a/.github/workflows/test-e2e-linux.yml +++ b/.github/workflows/test-e2e-linux.yml @@ -1,4 +1,4 @@ -name: Test end-to-end [linux] +name: Test end-to-end [LINUX] on: push diff --git a/.vscode/settings.json b/.vscode/settings.json index c21e9f5a..aa3ac164 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,8 @@ "PostgreSQL", "SQLite", "Windows", - "translation" + "translation", + "Linux" ], "svg.preview.background": "transparent" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 331d425c..f3084513 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.5.6](https://github.com/antares-sql/antares/compare/v0.5.4...v0.5.6) (2022-06-02) + +### Bug Fixes + +* empty query tab schema select if no schema selected ([31b7999](https://github.com/antares-sql/antares/commit/31b7999bba5d115913d42087614b9888bc761068)) +* inline field update not working with tables missing primary key ([caf776b](https://github.com/antares-sql/antares/commit/caf776bd55606c793c9763c204aa9f05d1feb27f)) +* **SQLite:** unable to insert rows with TEXT fields ([a7d5e19](https://github.com/antares-sql/antares/commit/a7d5e1973cd59d7d0ef1e74bdcf44d87fba43559)) +* **UI:** select closes clicking on scrollbar ([8870304](https://github.com/antares-sql/antares/commit/8870304c15346257a90193807b9ae07c1393e3e2)) + + +### Improvements + +* improved precision of MariaDB or MySQL auto detection ([26aad51](https://github.com/antares-sql/antares/commit/26aad519df6ea1bbc7dffbf540193a7b2ed9ae2a)) + ### [0.5.5](https://github.com/antares-sql/antares/compare/v0.5.4...v0.5.5) (2022-05-24) diff --git a/assets/appx/Square44x44Logo.targetsize-256_altform-unplated.png b/assets/appx/Square44x44Logo.targetsize-256_altform-unplated.png new file mode 100644 index 00000000..966f5bcb Binary files /dev/null and b/assets/appx/Square44x44Logo.targetsize-256_altform-unplated.png differ diff --git a/package.json b/package.json index d2ce9eef..f39182e6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "antares", "productName": "Antares", - "version": "0.5.5", + "version": "0.5.6", "description": "A modern, fast and productivity driven SQL client with a focus in UX.", "license": "MIT", "repository": "https://github.com/antares-sql/antares.git", @@ -13,7 +13,7 @@ "compile:workers": "webpack --mode=production --config webpack.workers.config.js", "compile:renderer": "webpack --mode=production --config webpack.renderer.config.js", "build": "cross-env NODE_ENV=production npm run compile", - "build:local": "npm run build && electron-builder", + "build:local": "npm run build && electron-builder --publish never", "build:appx": "npm run build:local -- --win appx", "rebuild:electron": "rimraf ./dist && npm run postinstall", "release": "standard-version", @@ -82,6 +82,12 @@ "license": "./LICENSE", "category": "Development" }, + "nsis": { + "license": "./LICENSE", + "installerIcon": "assets/icon.ico", + "uninstallerIcon": "assets/icon.ico", + "installerHeader": "assets/icon.ico" + }, "portable": { "artifactName": "${productName}-${version}-portable.exe" }, diff --git a/src/main/ipc-handlers/tables.ts b/src/main/ipc-handlers/tables.ts index 0acdc380..6addcb06 100644 --- a/src/main/ipc-handlers/tables.ts +++ b/src/main/ipc-handlers/tables.ts @@ -169,6 +169,8 @@ export default (connections: {[key: string]: antares.Client}) => { } else { const { orgRow } = params; + delete orgRow._antares_id; + reload = true; for (const key in orgRow) { diff --git a/src/main/main.ts b/src/main/main.ts index 4c3137dc..0f54031e 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -1,4 +1,4 @@ -import { app, BrowserWindow, /* session, */ nativeImage, Menu } from 'electron'; +import { app, BrowserWindow, /* session, */ nativeImage, Menu, ipcMain } from 'electron'; import * as path from 'path'; import * as Store from 'electron-store'; import * as windowStateKeeper from 'electron-window-state'; @@ -7,9 +7,13 @@ import * as remoteMain from '@electron/remote/main'; import ipcHandlers from './ipc-handlers'; Store.initRenderer(); +const persistentStore = new Store({ name: 'settings' }); +const appTheme = persistentStore.get('application_theme'); const isDevelopment = process.env.NODE_ENV !== 'production'; const isMacOS = process.platform === 'darwin'; +const isLinux = process.platform === 'linux'; +const isWindows = process.platform === 'win32'; const gotTheLock = app.requestSingleInstanceLock(); process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = 'true'; @@ -19,7 +23,7 @@ let mainWindow: BrowserWindow; let mainWindowState: windowStateKeeper.State; async function createMainWindow () { - const icon = require('../renderer/images/logo-32.png'); + const icon = require('../renderer/images/logo-64.png'); const window = new BrowserWindow({ width: mainWindowState.width, height: mainWindowState.height, @@ -28,15 +32,21 @@ async function createMainWindow () { minWidth: 900, minHeight: 550, title: 'Antares SQL', - autoHideMenuBar: true, icon: nativeImage.createFromDataURL(icon.default), webPreferences: { nodeIntegration: true, contextIsolation: false, spellcheck: false }, - frame: false, - titleBarStyle: isMacOS ? 'hidden' : 'default', + autoHideMenuBar: true, + titleBarStyle: isLinux ? 'default' :'hidden', + titleBarOverlay: isWindows + ? { + color: appTheme === 'dark' ? '#3f3f3f' : '#fff', + symbolColor: appTheme === 'dark' ? '#fff' : '#000', + height: 30 + } + : false, trafficLightPosition: isMacOS ? { x: 10, y: 8 } : undefined, backgroundColor: '#1d1d1d' }); @@ -73,10 +83,24 @@ else { // Initialize ipcHandlers ipcHandlers(); + ipcMain.on('refresh-theme-settings', () => { + const appTheme = persistentStore.get('application_theme'); + if(isWindows){ + mainWindow.setTitleBarOverlay({ + color: appTheme === 'dark' ? '#3f3f3f' : '#fff', + symbolColor: appTheme === 'dark' ? '#fff' : '#000' + }); + } + }); + + ipcMain.on('change-window-title', (event, title: string) => { + if (mainWindow) mainWindow.setTitle(title); + }); + // quit application when all windows are closed app.on('window-all-closed', () => { // on macOS it is common for applications to stay open until the user explicitly quits - if (isMacOS) app.quit(); + if (!isMacOS) app.quit(); }); app.on('activate', async () => { diff --git a/src/renderer/components/BaseSelect.vue b/src/renderer/components/BaseSelect.vue index 0f5433f2..53265480 100644 --- a/src/renderer/components/BaseSelect.vue +++ b/src/renderer/components/BaseSelect.vue @@ -222,8 +222,16 @@ export default defineComponent({ hightlightedIndex.value = 0; }); + watch(() => props.modelValue, (val) => { + internalValue.value = val; + }); + + watch(() => props.value, (val) => { + internalValue.value = val; + }); + const currentOptionLabel = computed(() => - flattenOptions.value.find(d => d.value === props.modelValue)?.label + flattenOptions.value.find(d => d.value === internalValue.value)?.label ); const select = (opt) => { diff --git a/src/renderer/components/TheSettingBar.vue b/src/renderer/components/TheSettingBar.vue index b7f48cde..fd4533a3 100644 --- a/src/renderer/components/TheSettingBar.vue +++ b/src/renderer/components/TheSettingBar.vue @@ -77,6 +77,7 @@ const { showSettingModal, showScratchpad } = applicationStore; const { getConnectionName, updateConnections } = connectionsStore; const { getWorkspace, selectWorkspace } = workspacesStore; +const isLinux = process.platform === 'linux'; const isContext: Ref = ref(false); const isDragging: Ref = ref(false); const contextEvent: Ref = ref(null); @@ -101,7 +102,9 @@ const contextMenu = (event: MouseEvent, connection: ConnectionParams) => { const tooltipPosition = (e: Event) => { const el = e.target ? e.target : e; - const fromTop = window.scrollY + (el as HTMLElement).getBoundingClientRect().top - ((el as HTMLElement).offsetHeight / 4); + 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('.ex-tooltip-content').style.top = `${fromTop}px`; }; diff --git a/src/renderer/components/TheTitleBar.vue b/src/renderer/components/TheTitleBar.vue index 3c9e8ad2..d40362bc 100644 --- a/src/renderer/components/TheTitleBar.vue +++ b/src/renderer/components/TheTitleBar.vue @@ -1,5 +1,9 @@ @@ -55,7 +38,6 @@