Skip to content

Commit

Permalink
Allow to set passphrase for private key #61
Browse files Browse the repository at this point in the history
  • Loading branch information
ekvedaras committed Jul 31, 2022
1 parent a516e47 commit 7fbc497
Show file tree
Hide file tree
Showing 5 changed files with 220 additions and 193 deletions.
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redis-gui",
"version": "2.1.1",
"version": "2.2.0",
"private": true,
"description": "Graphical UI for managing Redis databases",
"author": {
Expand Down Expand Up @@ -35,41 +35,41 @@
"@types/electron-devtools-installer": "2.2.2",
"@types/lodash": "4.14.182",
"@types/splitpanes": "2.2.1",
"@types/ssh2": "1.11.4",
"@types/ssh2": "1.11.5",
"@types/node_redis" : "0.8.29",
"@typescript-eslint/eslint-plugin": "5.30.6",
"@typescript-eslint/parser": "5.30.6",
"@vitejs/plugin-vue": "3.0.0",
"@typescript-eslint/eslint-plugin": "5.31.0",
"@typescript-eslint/parser": "5.31.0",
"@vitejs/plugin-vue": "3.0.1",
"@vue/test-utils": "2.0.2",
"autoprefixer": "10.4.7",
"autoprefixer": "10.4.8",
"cross-env": "7.0.3",
"electron": "19.0.8",
"electron": "19.0.10",
"electron-builder": "23.1.0",
"electron-devtools-installer": "3.2.0",
"eslint": "8.19.0",
"eslint-plugin-vue": "9.2.0",
"happy-dom": "6.0.3",
"eslint": "8.20.0",
"eslint-plugin-vue": "9.3.0",
"happy-dom": "6.0.4",
"nano-staged": "0.8.0",
"playwright": "1.23.3",
"playwright": "1.24.2",
"postcss": "8.4.14",
"postcss-import": "14.1.0",
"simple-git-hooks": "2.8.0",
"tailwindcss": "3.1.6",
"tailwindcss": "3.1.7",
"typescript": "4.7.4",
"vite": "3.0.0",
"vitest": "0.18.0",
"vue-tsc": "0.38.5"
"vite": "3.0.4",
"vitest": "0.19.1",
"vue-tsc": "0.39.3"
},
"dependencies": {
"@meforma/vue-toaster": "1.3.0",
"custom-electron-titlebar": "4.1.0",
"dayjs": "1.11.3",
"dayjs": "1.11.4",
"electron-updater": "5.0.5",
"floating-vue": "2.0.0-beta.17",
"lodash": "4.17.21",
"lowdb": "3.0.0",
"mitt": "3.0.0",
"pinia": "2.0.16",
"pinia": "2.0.17",
"pretty-bytes": "6.0.0",
"redis": "4.2.0",
"splitpanes": "3.1.1",
Expand Down
1 change: 0 additions & 1 deletion packages/main/tests/unit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {BrowserWindow} from 'electron';
vi.mock('electron', () => {

const bw = vi.fn() as MaybeMocked<typeof BrowserWindow>;
// @ts-expect-error It's work in runtime, but I Haven't idea how to fix this type error
bw.getAllWindows = vi.fn(() => bw.mock.instances);
bw.prototype.loadURL = vi.fn();
bw.prototype.on = vi.fn();
Expand Down
5 changes: 5 additions & 0 deletions packages/renderer/src/components/Elements/ServerModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const ssh = ref<SshConfig>({
user: undefined,
password: undefined,
privateKey: undefined,
passphrase: undefined,
})
const title = computed(() => props.serverKey ? 'Edit server' : 'Add new server')
Expand Down Expand Up @@ -72,6 +73,7 @@ const fillForm = () => {
user: undefined,
password: undefined,
privateKey: undefined,
passphrase: undefined,
}
}
}
Expand Down Expand Up @@ -171,6 +173,9 @@ const test = async () => {
<div class="flex space-x-4">
<input v-model="ssh.privateKey" type="text" :placeholder="privateKeyPlaceholder" class="flex-1" />
</div>
<div class="flex space-x-4">
<input v-model="ssh.passphrase" type="password" placeholder="Private key password (optional)" class="flex-1" />
</div>
</div>
<div class="flex justify-end space-x-4">
<div v-if="isTesting" class="relative w-10 h-10 flex items-center justify-end">
Expand Down
1 change: 1 addition & 0 deletions packages/renderer/types/database.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type SshConfig = {
user?: string,
password?: string,
privateKey?: string,
passphrase?: string,
}

export type Server = {
Expand Down
Loading

0 comments on commit 7fbc497

Please sign in to comment.