Additions
52
package-lock.json
generated
@ -3357,6 +3357,58 @@
|
||||
"xpipe": "*"
|
||||
}
|
||||
},
|
||||
"cross-env": {
|
||||
"version": "7.0.2",
|
||||
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.2.tgz",
|
||||
"integrity": "sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cross-spawn": "^7.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-key": "^3.1.0",
|
||||
"shebang-command": "^2.0.0",
|
||||
"which": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"path-key": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
||||
"dev": true
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"shebang-regex": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"shebang-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
||||
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
||||
"dev": true
|
||||
},
|
||||
"which": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
|
11
package.json
@ -6,15 +6,15 @@
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/Fabio286/antares.git",
|
||||
"scripts": {
|
||||
"dev": "electron-webpack dev",
|
||||
"dev": "cross-env NODE_ENV=development electron-webpack dev",
|
||||
"compile": "electron-webpack",
|
||||
"dist": "npm run compile && electron-builder",
|
||||
"dist:dir": "npm run dist --dir -c.compression=store -c.mac.identity=null"
|
||||
"dist": "cross-env NODE_ENV=production npm run compile && electron-builder",
|
||||
"dist:dir": "cross-env NODE_ENV=production npm run dist --dir -c.compression=store -c.mac.identity=null"
|
||||
},
|
||||
"author": "Fabio Di Stasio <fabio286@gmail.com>",
|
||||
"build": {
|
||||
"appId": "com.estarium.${name}",
|
||||
"artifactName": "${productName}.${ext}",
|
||||
"appId": "com.estarium.antares",
|
||||
"artifactName": "${productName}-${version}-${channel}-${os}_${arch}.${ext}",
|
||||
"files": [
|
||||
"static/*"
|
||||
]
|
||||
@ -46,6 +46,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-eslint": "^10.1.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"electron": "^8.3.0",
|
||||
"electron-builder": "^22.7.0",
|
||||
"electron-devtools-installer": "^3.0.0",
|
||||
|
@ -1,20 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
import { app, BrowserWindow } from 'electron';
|
||||
import { app, BrowserWindow, nativeImage } from 'electron';
|
||||
import * as path from 'path';
|
||||
import { format as formatUrl } from 'url';
|
||||
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer';
|
||||
import { autoUpdater } from 'electron-updater';
|
||||
|
||||
import ipcHandlers from './ipc-handlers';
|
||||
|
||||
const isDevelopment = process.env.NODE_ENV !== 'production';
|
||||
const isDevelopment = process.env.NODE_ENV === 'development';
|
||||
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = 'true';
|
||||
|
||||
// global reference to mainWindow (necessary to prevent window from being garbage collected)
|
||||
let mainWindow;
|
||||
|
||||
function createMainWindow () {
|
||||
const icon = require('../renderer/images/logo-32.png');
|
||||
const window = new BrowserWindow({
|
||||
width: 1600,
|
||||
height: 1000,
|
||||
@ -22,7 +22,7 @@ function createMainWindow () {
|
||||
minWidth: 900,
|
||||
title: 'Antares',
|
||||
autoHideMenuBar: true,
|
||||
icon: path.join(__static, 'logo-32.png'),
|
||||
icon: nativeImage.createFromDataURL(icon.default),
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
'web-security': false
|
||||
@ -40,6 +40,7 @@ function createMainWindow () {
|
||||
}
|
||||
|
||||
if (isDevelopment) {
|
||||
const { default: installExtension, VUEJS_DEVTOOLS } = require('electron-devtools-installer');
|
||||
window.webContents.openDevTools();
|
||||
|
||||
installExtension(VUEJS_DEVTOOLS)
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="workspace-explorebar column">
|
||||
<div class="workspace-explorebar-header">
|
||||
<span class="workspace-explorebar-title">{{ connection.ask ? '': connection.user+'@' }}{{ connection.host }}:{{ connection.port }}</span>
|
||||
<span class="workspace-explorebar-title">{{ connectionName }}</span>
|
||||
<span v-if="workspace.connected" class="workspace-explorebar-tools">
|
||||
<i
|
||||
class="material-icons md-18 c-hand"
|
||||
@ -17,6 +17,26 @@
|
||||
</span>
|
||||
</div>
|
||||
<DatabaseConnectPanel v-if="!workspace.connected" :connection="connection" />
|
||||
<div class="workspace-explorebar-body">
|
||||
<div
|
||||
v-for="db of workspace.structure"
|
||||
:key="db.dbName"
|
||||
>
|
||||
<div class="database-name">
|
||||
<i class="material-icons md-18 mr-1">view_agenda</i>{{ db.dbName }}
|
||||
</div>
|
||||
<div class="d-block ml-4">
|
||||
<div
|
||||
v-for="table of db.tables"
|
||||
:key="table.TABLE_NAME"
|
||||
>
|
||||
<div class="table-name">
|
||||
<i class="material-icons md-18 mr-1">view_headline</i>{{ table.TABLE_NAME }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -39,10 +59,14 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
getWorkspace: 'workspaces/getWorkspace'
|
||||
getWorkspace: 'workspaces/getWorkspace',
|
||||
getConnectionName: 'connections/getConnectionName'
|
||||
}),
|
||||
workspace () {
|
||||
return this.getWorkspace(this.connection.uid);
|
||||
},
|
||||
connectionName () {
|
||||
return this.getConnectionName(this.connection.uid);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -62,6 +86,8 @@ export default {
|
||||
<style lang="scss">
|
||||
.workspace-explorebar{
|
||||
width: $explorebar-width;
|
||||
height: calc(100vh - #{$footer-height});
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
@ -112,5 +138,15 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.workspace-explorebar-body{
|
||||
width: 100%;
|
||||
|
||||
.database-name,
|
||||
.table-name{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -13,10 +13,22 @@
|
||||
<form class="form-horizontal">
|
||||
<fieldset class="m-0" :disabled="isTesting">
|
||||
<div class="form-group">
|
||||
<div class="col-3 col-sm-12">
|
||||
<div class="col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.connectionName') }}:</label>
|
||||
</div>
|
||||
<div class="col-8 col-sm-12">
|
||||
<input
|
||||
v-model="localConnection.name"
|
||||
class="form-input"
|
||||
type="text"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.client') }}:</label>
|
||||
</div>
|
||||
<div class="col-9 col-sm-12">
|
||||
<div class="col-8 col-sm-12">
|
||||
<select v-model="localConnection.client" class="form-select">
|
||||
<option value="mysql">
|
||||
MySQL/MariaDB
|
||||
@ -34,10 +46,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-3 col-sm-12">
|
||||
<div class="col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.hostName') }}/IP:</label>
|
||||
</div>
|
||||
<div class="col-9 col-sm-12">
|
||||
<div class="col-8 col-sm-12">
|
||||
<input
|
||||
v-model="localConnection.host"
|
||||
class="form-input"
|
||||
@ -46,10 +58,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-3 col-sm-12">
|
||||
<div class="col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.port') }}:</label>
|
||||
</div>
|
||||
<div class="col-9 col-sm-12">
|
||||
<div class="col-8 col-sm-12">
|
||||
<input
|
||||
v-model="localConnection.port"
|
||||
class="form-input"
|
||||
@ -60,10 +72,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-3 col-sm-12">
|
||||
<div class="col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.user') }}:</label>
|
||||
</div>
|
||||
<div class="col-9 col-sm-12">
|
||||
<div class="col-8 col-sm-12">
|
||||
<input
|
||||
v-model="localConnection.user"
|
||||
class="form-input"
|
||||
@ -73,10 +85,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-3 col-sm-12">
|
||||
<div class="col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.password') }}:</label>
|
||||
</div>
|
||||
<div class="col-9 col-sm-12">
|
||||
<div class="col-8 col-sm-12">
|
||||
<input
|
||||
v-model="localConnection.password"
|
||||
class="form-input"
|
||||
@ -86,8 +98,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-3 col-sm-12" />
|
||||
<div class="col-9 col-sm-12">
|
||||
<div class="col-4 col-sm-12" />
|
||||
<div class="col-8 col-sm-12">
|
||||
<label class="form-checkbox form-inline">
|
||||
<input v-model="localConnection.ask" type="checkbox"><i class="form-icon" /> {{ $t('message.askCredentials') }}
|
||||
</label>
|
||||
|
@ -13,10 +13,22 @@
|
||||
<form class="form-horizontal">
|
||||
<fieldset class="m-0" :disabled="isTesting">
|
||||
<div class="form-group">
|
||||
<div class="col-3 col-sm-12">
|
||||
<div class="col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.connectionName') }}:</label>
|
||||
</div>
|
||||
<div class="col-8 col-sm-12">
|
||||
<input
|
||||
v-model="connection.name"
|
||||
class="form-input"
|
||||
type="text"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.client') }}:</label>
|
||||
</div>
|
||||
<div class="col-9 col-sm-12">
|
||||
<div class="col-8 col-sm-12">
|
||||
<select
|
||||
v-model="connection.client"
|
||||
class="form-select"
|
||||
@ -38,10 +50,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-3 col-sm-12">
|
||||
<div class="col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.hostName') }}/IP:</label>
|
||||
</div>
|
||||
<div class="col-9 col-sm-12">
|
||||
<div class="col-8 col-sm-12">
|
||||
<input
|
||||
v-model="connection.host"
|
||||
class="form-input"
|
||||
@ -50,10 +62,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-3 col-sm-12">
|
||||
<div class="col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.port') }}:</label>
|
||||
</div>
|
||||
<div class="col-9 col-sm-12">
|
||||
<div class="col-8 col-sm-12">
|
||||
<input
|
||||
v-model="connection.port"
|
||||
class="form-input"
|
||||
@ -64,10 +76,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-3 col-sm-12">
|
||||
<div class="col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.user') }}:</label>
|
||||
</div>
|
||||
<div class="col-9 col-sm-12">
|
||||
<div class="col-8 col-sm-12">
|
||||
<input
|
||||
v-model="connection.user"
|
||||
class="form-input"
|
||||
@ -77,10 +89,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-3 col-sm-12">
|
||||
<div class="col-4 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.password') }}:</label>
|
||||
</div>
|
||||
<div class="col-9 col-sm-12">
|
||||
<div class="col-8 col-sm-12">
|
||||
<input
|
||||
v-model="connection.password"
|
||||
class="form-input"
|
||||
@ -90,8 +102,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-3 col-sm-12" />
|
||||
<div class="col-9 col-sm-12">
|
||||
<div class="col-4 col-sm-12" />
|
||||
<div class="col-8 col-sm-12">
|
||||
<label class="form-checkbox form-inline">
|
||||
<input v-model="connection.ask" type="checkbox"><i class="form-icon" /> {{ $t('message.askCredentials') }}
|
||||
</label>
|
||||
@ -146,6 +158,7 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
connection: {
|
||||
name: '',
|
||||
client: 'mysql',
|
||||
host: '127.0.0.1',
|
||||
port: '3306',
|
||||
|
@ -47,7 +47,10 @@
|
||||
<div class="col-6 col-sm-12">
|
||||
<div class="form-group">
|
||||
<div class="col-6 col-sm-12">
|
||||
<label class="form-label">{{ $t('word.language') }}:</label>
|
||||
<label class="form-label">
|
||||
<i class="material-icons md-18 mr-1">translate</i>
|
||||
{{ $t('word.language') }}:
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-6 col-sm-12">
|
||||
<select
|
||||
@ -55,8 +58,12 @@
|
||||
class="form-select"
|
||||
@change="changeLocale(localLocale)"
|
||||
>
|
||||
<option v-for="(locale, key) in locales" :key="key">
|
||||
{{ locale }}
|
||||
<option
|
||||
v-for="(locale, key) in locales"
|
||||
:key="key"
|
||||
:value="locale.code"
|
||||
>
|
||||
{{ locale.name }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
@ -72,7 +79,7 @@
|
||||
</div>
|
||||
<div v-if="selectedTab === 'about'" class="panel-body py-4">
|
||||
<div class="text-center">
|
||||
<img src="logo.svg" width="128">
|
||||
<img :src="require('@/images/logo.svg').default" width="128">
|
||||
<h4>{{ appName }}</h4>
|
||||
<p>
|
||||
{{ $t('word.version') }}: {{ appVersion }}<br>
|
||||
@ -88,6 +95,7 @@
|
||||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex';
|
||||
import localesNames from '@/i18n/supported-locales';
|
||||
const { shell } = require('electron');
|
||||
|
||||
export default {
|
||||
@ -103,14 +111,20 @@ export default {
|
||||
...mapGetters({
|
||||
appName: 'application/appName',
|
||||
appVersion: 'application/appVersion',
|
||||
selectedSettingTab: 'application/selectedSettingTab',
|
||||
selectedLocale: 'settings/getLocale'
|
||||
}),
|
||||
locales () {
|
||||
return this.$i18n.availableLocales;
|
||||
const locales = [];
|
||||
for (const locale of this.$i18n.availableLocales)
|
||||
locales.push({ code: locale, name: localesNames[locale] });
|
||||
|
||||
return locales;
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.localLocale = this.selectedLocale;
|
||||
this.selectedTab = this.selectedSettingTab;
|
||||
},
|
||||
methods: {
|
||||
...mapActions({
|
||||
@ -140,6 +154,11 @@ export default {
|
||||
.badge::after{
|
||||
background: #32b643;
|
||||
}
|
||||
|
||||
.form-label{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
</template>
|
||||
<div :slot="'body'">
|
||||
<div class="mb-2">
|
||||
{{ $t('message.deleteConnectionCorfirm') }} <b>{{ contextConnection.user }}@{{ contextConnection.host }}:{{ contextConnection.port }}</b>?
|
||||
{{ $t('message.deleteConnectionCorfirm') }} <b>{{ connectionName }}</b>?
|
||||
</div>
|
||||
</div>
|
||||
</ConfirmModal>
|
||||
@ -28,7 +28,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions } from 'vuex';
|
||||
import { mapActions, mapGetters } from 'vuex';
|
||||
import BaseContextMenu from '@/components/BaseContextMenu';
|
||||
import ConfirmModal from '@/components/BaseConfirmModal';
|
||||
|
||||
@ -47,6 +47,14 @@ export default {
|
||||
isConfirmModal: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
getConnectionName: 'connections/getConnectionName'
|
||||
}),
|
||||
connectionName () {
|
||||
return this.getConnectionName(this.contextConnection.uid);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapActions({
|
||||
deleteConnection: 'connections/deleteConnection',
|
||||
|
@ -3,17 +3,22 @@
|
||||
<div class="footer-left-elements">
|
||||
<ul class="footer-elements">
|
||||
<li class="footer-element">
|
||||
<i class="material-icons md-18">memory</i>
|
||||
<i class="material-icons md-18 mr-1">memory</i>
|
||||
<small>{{ appVersion }}</small>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer-right-elements">
|
||||
<ul class="footer-elements">
|
||||
<li class="footer-element">
|
||||
<i class="material-icons md-18">favorite</i>
|
||||
<li class="footer-element footer-link">
|
||||
<i class="material-icons md-18 mr-1">favorite</i>
|
||||
<small>{{ $t('word.donate') }}</small>
|
||||
</li>
|
||||
<li class="footer-element">
|
||||
<li class="footer-element footer-link">
|
||||
<i class="material-icons md-18">bug_report</i>
|
||||
</li>
|
||||
<li class="footer-element footer-link" @click="showSettingModal('about')">
|
||||
<i class="material-icons md-18">info_outline</i>
|
||||
</li>
|
||||
</ul>
|
||||
@ -22,9 +27,21 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
|
||||
name: 'TheFooter',
|
||||
computed: {
|
||||
...mapGetters({
|
||||
appName: 'application/appName',
|
||||
appVersion: 'application/appVersion'
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapActions({
|
||||
showSettingModal: 'application/showSettingModal'
|
||||
})
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -46,9 +63,23 @@ export default {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.footer-element{
|
||||
height: $footer-height;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 .4rem;
|
||||
margin: 0;
|
||||
|
||||
&.footer-link{
|
||||
cursor: pointer;
|
||||
transition: background .2s;
|
||||
|
||||
&:hover{
|
||||
background: rgba($color: #fff, $alpha: .1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
draggable="true"
|
||||
class="settingbar-element btn btn-link tooltip tooltip-right"
|
||||
:class="{'selected': connection.uid === selectedWorkspace}"
|
||||
:data-tooltip="`${connection.ask ? '': connection.user+'@'}${connection.host}:${connection.port}`"
|
||||
:data-tooltip="`${getConnectionName(connection.uid)}`"
|
||||
@click="selectWorkspace(connection.uid)"
|
||||
@contextmenu.prevent="contextMenu($event, connection)"
|
||||
>
|
||||
@ -37,7 +37,7 @@
|
||||
<li
|
||||
class="settingbar-element btn btn-link tooltip tooltip-right mb-2"
|
||||
:data-tooltip="$t('word.settings')"
|
||||
@click="showSettingModal"
|
||||
@click="showSettingModal('general')"
|
||||
>
|
||||
<i class="settingbar-element-icon material-icons text-light">settings</i>
|
||||
</li>
|
||||
@ -68,6 +68,7 @@ export default {
|
||||
computed: {
|
||||
...mapGetters({
|
||||
getConnections: 'connections/getConnections',
|
||||
getConnectionName: 'connections/getConnectionName',
|
||||
connected: 'workspaces/getConnected',
|
||||
selectedWorkspace: 'workspaces/getSelected'
|
||||
}),
|
||||
@ -91,6 +92,9 @@ export default {
|
||||
this.contextEvent = event;
|
||||
this.contextConnection = connection;
|
||||
this.isContext = true;
|
||||
},
|
||||
workspaceName (connection) {
|
||||
return connection.ask ? '' : `${connection.user + '@'}${connection.host}:${connection.port}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -7,6 +7,7 @@ module.exports = {
|
||||
confirm: 'Confirm',
|
||||
cancel: 'Cancel',
|
||||
send: 'Send',
|
||||
connectionName: 'Connection name',
|
||||
client: 'Client',
|
||||
hostName: 'Host name',
|
||||
port: 'Port',
|
||||
@ -24,7 +25,8 @@ module.exports = {
|
||||
update: 'Update',
|
||||
about: 'About',
|
||||
language: 'Language',
|
||||
version: 'Version'
|
||||
version: 'Version',
|
||||
donate: 'Donate'
|
||||
},
|
||||
message: {
|
||||
appWelcome: 'Welcome to Antares SQL Client!',
|
||||
|
@ -7,6 +7,7 @@ module.exports = {
|
||||
confirm: 'Conferma',
|
||||
cancel: 'Annulla',
|
||||
send: 'Invia',
|
||||
connectionName: 'Nome connessione',
|
||||
client: 'Client',
|
||||
hostName: 'Nome host',
|
||||
port: 'Porta',
|
||||
@ -24,7 +25,8 @@ module.exports = {
|
||||
update: 'Aggiornamento',
|
||||
about: 'Informazioni',
|
||||
language: 'Lingua',
|
||||
version: 'Versione'
|
||||
version: 'Versione',
|
||||
donate: 'Dona'
|
||||
},
|
||||
message: {
|
||||
appWelcome: 'Benvenuto in Antares SQL Client!',
|
||||
|
4
src/renderer/i18n/supported-locales.js
Normal file
@ -0,0 +1,4 @@
|
||||
export default {
|
||||
'en-US': 'English',
|
||||
'it-IT': 'Italiano'
|
||||
};
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 892 B After Width: | Height: | Size: 892 B |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 1004 B After Width: | Height: | Size: 1004 B |
@ -34,19 +34,19 @@ body{
|
||||
background-size: cover;
|
||||
|
||||
&.dbi-mysql{
|
||||
background-image: url('/svg/mysql.svg');
|
||||
background-image: url('../images/svg/mysql.svg');
|
||||
}
|
||||
|
||||
&.dbi-mssql{
|
||||
background-image: url('/svg/mssql.svg');
|
||||
background-image: url('../images/svg/mssql.svg');
|
||||
}
|
||||
|
||||
&.dbi-pg{
|
||||
background-image: url('/svg/pg.svg');
|
||||
background-image: url('../images/svg/pg.svg');
|
||||
}
|
||||
|
||||
&.dbi-oracledb{
|
||||
background-image: url('/svg/oracledb.svg');
|
||||
background-image: url('../images/svg/oracledb.svg');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ export default {
|
||||
is_new_modal: false,
|
||||
is_edit_modal: false,
|
||||
is_setting_modal: false,
|
||||
selected_setting_tab: 'general',
|
||||
selected_conection: {}
|
||||
},
|
||||
getters: {
|
||||
@ -18,7 +19,8 @@ export default {
|
||||
getSelectedConnection: state => state.selected_conection,
|
||||
isNewModal: state => state.is_new_modal,
|
||||
isEditModal: state => state.is_edit_modal,
|
||||
isSettingModal: state => state.is_setting_modal
|
||||
isSettingModal: state => state.is_setting_modal,
|
||||
selectedSettingTab: state => state.selected_setting_tab
|
||||
},
|
||||
mutations: {
|
||||
SET_LOADING_STATUS (state, payload) {
|
||||
@ -37,7 +39,8 @@ export default {
|
||||
HIDE_EDIT_CONNECTION_MODAL (state) {
|
||||
state.is_edit_modal = false;
|
||||
},
|
||||
SHOW_SETTING_MODAL (state) {
|
||||
SHOW_SETTING_MODAL (state, tab) {
|
||||
state.selected_setting_tab = tab;
|
||||
state.is_setting_modal = true;
|
||||
},
|
||||
HIDE_SETTING_MODAL (state) {
|
||||
@ -61,8 +64,8 @@ export default {
|
||||
hideEditConnModal ({ commit }) {
|
||||
commit('HIDE_EDIT_CONNECTION_MODAL');
|
||||
},
|
||||
showSettingModal ({ commit }) {
|
||||
commit('SHOW_SETTING_MODAL');
|
||||
showSettingModal ({ commit }, tab) {
|
||||
commit('SHOW_SETTING_MODAL', tab);
|
||||
},
|
||||
hideSettingModal ({ commit }) {
|
||||
commit('HIDE_SETTING_MODAL');
|
||||
|
@ -7,7 +7,15 @@ export default {
|
||||
connections: []
|
||||
},
|
||||
getters: {
|
||||
getConnections: state => state.connections
|
||||
getConnections: state => state.connections,
|
||||
getConnectionName: state => uid => {
|
||||
const connection = state.connections.filter(connection => connection.uid === uid)[0];
|
||||
return connection.name
|
||||
? connection.name
|
||||
: connection.ask
|
||||
? ''
|
||||
: `${connection.user + '@'}${connection.host}:${connection.port}`;
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
ADD_CONNECTION (state, connection) {
|
||||
|
@ -1,5 +1,16 @@
|
||||
'use strict';
|
||||
import Connection from '@/ipc-api/Connection';
|
||||
function remapStructure (structure) {
|
||||
const databases = structure.map(table => table.TABLE_SCHEMA)
|
||||
.filter((value, index, self) => self.indexOf(value) === index);
|
||||
|
||||
return databases.map(db => {
|
||||
return {
|
||||
dbName: db,
|
||||
tables: structure.filter(table => table.TABLE_SCHEMA === db)
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
@ -34,7 +45,7 @@ export default {
|
||||
REMOVE_CONNECTED (state, uid) {
|
||||
state.workspaces = state.workspaces.map(workspace => workspace.uid === uid ? { ...workspace, structure: {}, connected: false } : workspace);
|
||||
},
|
||||
REFRESH_STRUCTURE (state, uid) {
|
||||
REFRESH_STRUCTURE (state, { uid, structure }) {
|
||||
state.workspaces = state.workspaces.map(workspace => workspace.uid === uid ? { ...workspace, structure } : workspace);
|
||||
},
|
||||
ADD_WORKSPACE (state, workspace) {
|
||||
@ -51,7 +62,7 @@ export default {
|
||||
if (status === 'error')
|
||||
dispatch('notifications/addNotification', { status, message: response }, { root: true });
|
||||
else
|
||||
commit('ADD_CONNECTED', { uid: connection.uid, structure: response });
|
||||
commit('ADD_CONNECTED', { uid: connection.uid, structure: remapStructure(response) });
|
||||
}
|
||||
catch (err) {
|
||||
dispatch('notifications/addNotification', { status: 'error', message: err.stack }, { root: true });
|
||||
@ -63,7 +74,7 @@ export default {
|
||||
if (status === 'error')
|
||||
dispatch('notifications/addNotification', { status, message: response }, { root: true });
|
||||
else
|
||||
commit('REFRESH_STRUCTURE', { uid, structure: response });
|
||||
commit('REFRESH_STRUCTURE', { uid, structure: remapStructure(response) });
|
||||
}
|
||||
catch (err) {
|
||||
dispatch('notifications/addNotification', { status: 'error', message: err.stack }, { root: true });
|
||||
|