Skip to content

Commit

Permalink
0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnmichel committed Mar 5, 2020
1 parent e2248a2 commit 086b6fe
Show file tree
Hide file tree
Showing 23 changed files with 420 additions and 477 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@quasar/extras": "^1.0.0",
"axios": "^0.19.2",
"lodash": "^4.17.15",
"node-pty": "^0.9.0",
"node-pty-prebuilt-multiarch": "^0.9.0",
"os": "^0.1.1",
"quasar": "^1.0.0",
"xterm": "^4.4.0",
Expand Down
Binary file modified src-electron/icons/Square107x107Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/Square142x142Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/Square150x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/Square284x284Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/Square30x30Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/Square310x310Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/Square44x44Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/Square71x71Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/Square89x89Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/StoreLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/linux-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/linux-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/linux-24x24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/linux-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/linux-48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/linux-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/linux-64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-electron/icons/linux-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions src/boot/xterm.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// import something here
import "xterm/css/xterm.css";

import os from "os";
const pty = require("node-pty-prebuilt-multiarch");
import { Terminal } from "xterm";

// "async" is optional
export default async ({ app, router, store, Vue }) => {
// something to do

var os = require("os");
var pty = require("node-pty");
var Terminal = require("xterm").Terminal;
var shell = os.platform() === "win32" ? "powershell.exe" : "bash";

var ptyProcess = pty.spawn(shell, ["-l"], {
Expand All @@ -26,7 +27,7 @@ export default async ({ app, router, store, Vue }) => {
fontSize: 12
});

ptyProcess.on("data", function(data) {
ptyProcess.onData(function(data) {
term.write(data);
});
term.onData(data => {
Expand Down
16 changes: 13 additions & 3 deletions src/components/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,25 @@ export default {
},
async created() {
await window.ptyProcess.write("nordvpn login\r");
window.ptyProcess.on("data", data => {
window.ptyProcess.onData(data => {
console.log(data);
/**
* Catch some response from nordvpn cli
*/
if (data.includes("Username or password is not correct")) {
// INCORRECT
this.progress = "username";
this.$root.$emit("update:login", true);
this.$q.notify({
type: "negative",
message: `Username or password is not correct.`
});
this.$root.$emit("update:login", true);
/**
*
*
*
*/
} else if (data.includes("Too many login attempts.")) {
// TOO MANY ATTEMPTS
this.progress = "username";
Expand All @@ -90,6 +95,11 @@ export default {
message: `Too many login attempts, please start over.`
});
this.$root.$emit("update:login", true);
/**
*
*
*
*/
} else if (data.includes("Welcome to NordVPN!")) {
// SUCCESS
this.$q.notify({
Expand Down
Loading

0 comments on commit 086b6fe

Please sign in to comment.