diff --git a/package-lock.json b/package-lock.json index 46753f4..6113e6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@testing-library/user-event": "^12.1.10", "autoprefixer": "^10.4.4", "heroicons": "^1.0.6", - "highlight.js": "^11.2.0", + "highlight.js": "^11.5.1", "history": "^5.0.1", "nth-check": ">=2.0.1", "postcss": "^8.4.12", @@ -7921,9 +7921,9 @@ "integrity": "sha512-5bxTsG2hyNBF0l+BrFlZlR5YngQNMfl0ggJjIRkMSADBQbaZMoTg47OIQzq6f1mpEZ85HEIgSC4wt5AeFM9J2Q==" }, "node_modules/highlight.js": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.5.0.tgz", - "integrity": "sha512-SM6WDj5/C+VfIY8pZ6yW6Xa0Fm1tniYVYWYW1Q/DcMnISZFrC3aQAZZZFAAZtybKNrGId3p/DNbFTtcTXXgYBw==", + "version": "11.5.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.5.1.tgz", + "integrity": "sha512-LKzHqnxr4CrD2YsNoIf/o5nJ09j4yi/GcH5BnYz9UnVpZdS4ucMgvP61TDty5xJcFGRjnH4DpujkS9bHT3hq0Q==", "engines": { "node": ">=12.0.0" } @@ -21876,9 +21876,9 @@ "integrity": "sha512-5bxTsG2hyNBF0l+BrFlZlR5YngQNMfl0ggJjIRkMSADBQbaZMoTg47OIQzq6f1mpEZ85HEIgSC4wt5AeFM9J2Q==" }, "highlight.js": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.5.0.tgz", - "integrity": "sha512-SM6WDj5/C+VfIY8pZ6yW6Xa0Fm1tniYVYWYW1Q/DcMnISZFrC3aQAZZZFAAZtybKNrGId3p/DNbFTtcTXXgYBw==" + "version": "11.5.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.5.1.tgz", + "integrity": "sha512-LKzHqnxr4CrD2YsNoIf/o5nJ09j4yi/GcH5BnYz9UnVpZdS4ucMgvP61TDty5xJcFGRjnH4DpujkS9bHT3hq0Q==" }, "history": { "version": "5.0.1", diff --git a/package.json b/package.json index a6708c3..0733b3a 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "@testing-library/user-event": "^12.1.10", "autoprefixer": "^10.4.4", "heroicons": "^1.0.6", - "highlight.js": "^11.2.0", + "highlight.js": "^11.5.1", "history": "^5.0.1", "postcss": "^8.4.12", "prop-types": "^15.7.2", diff --git a/src/components/Footer.js b/src/components/Footer.js index da405ac..c09fb6f 100644 --- a/src/components/Footer.js +++ b/src/components/Footer.js @@ -3,8 +3,8 @@ import React from 'react'; const Footer = () => { return (
-

- Copyright © 2021 Wiretrustee Authors +

+ Copyright © 2022 Wiretrustee UG & Authors

); diff --git a/src/components/Highlight.js b/src/components/Highlight.js index dd48753..6ccf11c 100644 --- a/src/components/Highlight.js +++ b/src/components/Highlight.js @@ -2,7 +2,8 @@ import React, { Component } from "react"; import PropTypes from "prop-types"; import hljs from "highlight.js"; -import "highlight.js/styles/agate.css"; +import "highlight.js/styles/mono-blue.css"; +//import "highlight.js/styles/base16/flat.css"; import "highlight.js/lib/languages/bash"; class Highlight extends Component { diff --git a/src/components/addpeer/AddPeerTabSelector.js b/src/components/addpeer/AddPeerTabSelector.js index 58fbf8d..2cbe32e 100644 --- a/src/components/addpeer/AddPeerTabSelector.js +++ b/src/components/addpeer/AddPeerTabSelector.js @@ -1,5 +1,5 @@ import LinuxTab from "./LinuxTab"; -import {useState} from "react"; +import {useEffect, useState} from "react"; import {classNames} from "../../utils/common"; import WindowsTab from "./WindowsTab"; import MacTab from "./MacTab"; @@ -14,6 +14,20 @@ const AddPeerTabSelector = ({setupKey}) => { const [openTab, setOpenTab] = useState(1); + const detectOS = () => { + let os = 1; + if (navigator.userAgent.indexOf("Win")!==-1) os=2; + if (navigator.userAgent.indexOf("Mac")!==-1) os=3; + if (navigator.userAgent.indexOf("X11")!==-1) os=1; + if (navigator.userAgent.indexOf("Linux")!==-1) os=1 + + setOpenTab(os) + } + + useEffect(() => { + detectOS(); + }, []); + return (
@@ -30,7 +44,7 @@ const AddPeerTabSelector = ({setupKey}) => { tab.idx === openTab ? 'border-indigo-500 text-gray-600' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300', - 'whitespace-nowrap py-4 px-1 border-b-2 text-sm' + 'whitespace-nowrap py-4 px-1 border-b-2 text-m' )} aria-current={tab.idx === openTab ? 'page' : undefined} > diff --git a/src/components/addpeer/LinuxTab.js b/src/components/addpeer/LinuxTab.js index 8832519..c685850 100644 --- a/src/components/addpeer/LinuxTab.js +++ b/src/components/addpeer/LinuxTab.js @@ -11,7 +11,7 @@ const LinuxTab = ({setupKey}) => { const steps = [ { id: 1, - target: 'Add Netbird\'s repository:', + target: 'Add repository:', icon: ArrowCircleRightIcon, iconBackground: 'bg-gray-600', content: null, @@ -25,16 +25,16 @@ const LinuxTab = ({setupKey}) => { iconBackground: 'bg-gray-600', content: null, copy: true, - commands: ["sudo apt-get update", "sudo apt-get install wiretrustee"] + commands: ["sudo apt-get update", "# for CLI only\nsudo apt-get install netbird", "# for GUI package\nsudo apt-get install netbird-ui"] }, { id: 3, - target: 'Login and run Netbird:', + target: 'Run Netbird and log in the browser:', icon: ArrowCircleRightIcon, iconBackground: 'bg-gray-600', content: null, copy: true, - commands: grpcApiOrigin === '' ? ["sudo wiretrustee up --setup-key "] : ["sudo wiretrustee up --setup-key --management-url " + grpcApiOrigin] + commands: grpcApiOrigin === '' ? ["sudo netbird up"] : ["sudo netbird up --management-url " + grpcApiOrigin] }, { id: 4, diff --git a/src/components/addpeer/MacTab.js b/src/components/addpeer/MacTab.js index dd80f40..b764a61 100644 --- a/src/components/addpeer/MacTab.js +++ b/src/components/addpeer/MacTab.js @@ -14,7 +14,11 @@ const MacTab = ({setupKey}) => { target: 'Download and install Brew (package manager):', icon: ArrowCircleRightIcon, iconBackground: 'bg-gray-600', - content: , + content: , commands: [], copy: false }, @@ -25,16 +29,16 @@ const MacTab = ({setupKey}) => { iconBackground: 'bg-gray-600', content: null, copy: true, - commands: ["brew install wiretrustee/client/wiretrustee"] + commands: ["# for CLI only\nbrew install netbirdio/tap/netbird", "# for GUI package\nbrew install --cask netbirdio/tap/netbird-ui"] }, { id: 3, - target: 'Login and run Netbird:', + target: 'Run Netbird and log in the browser:', icon: ArrowCircleRightIcon, iconBackground: 'bg-gray-600', content: null, copy: true, - commands: grpcApiOrigin === '' ? ["sudo wiretrustee up --setup-key "] : ["sudo wiretrustee up --setup-key --management-url " + grpcApiOrigin] + commands: grpcApiOrigin === '' ? ["sudo netbird up"] : ["sudo netbird up --management-url " + grpcApiOrigin] }, { id: 4, @@ -43,7 +47,7 @@ const MacTab = ({setupKey}) => { iconBackground: 'bg-gray-600', content: null, copy: true, - commands: ["sudo ipconfig getifaddr utun100"] + commands: ["sudo ifconfig utun100"] }, ] diff --git a/src/components/addpeer/WindowsTab.js b/src/components/addpeer/WindowsTab.js index 347b4f4..358f49a 100644 --- a/src/components/addpeer/WindowsTab.js +++ b/src/components/addpeer/WindowsTab.js @@ -9,21 +9,17 @@ const {grpcApiOrigin} = getConfig(); const WindowsTab = ({setupKey}) => { - const downloadBtn = () => { - return - } - const steps = [ { id: 1, target: 'Download and run Windows installer:', icon: ArrowCircleRightIcon, iconBackground: 'bg-gray-600', - content: downloadBtn(), + content: , commands: [], copy: false }, @@ -38,7 +34,7 @@ const WindowsTab = ({setupKey}) => { }, { id: 3, - target: 'Login with your email address.', + target: 'Log in your browser.', icon: ArrowCircleRightIcon, iconBackground: 'bg-gray-600', content: "", diff --git a/src/views/AddPeer.js b/src/views/AddPeer.js index 7de49b9..8b279c8 100644 --- a/src/views/AddPeer.js +++ b/src/views/AddPeer.js @@ -47,9 +47,9 @@ export const AddPeerComponent = () => { {error.toString()} )} {setupKeys && ()}