diff --git a/client/uiwails/.gitignore b/client/uiwails/.gitignore index 4a35222df..1a0f1d541 100644 --- a/client/uiwails/.gitignore +++ b/client/uiwails/.gitignore @@ -1,3 +1,4 @@ frontend/node_modules/ frontend/dist/ bin/ +.task/ diff --git a/client/uiwails/.task/checksum/build-frontend--DEV-- b/client/uiwails/.task/checksum/build-frontend--DEV-- deleted file mode 100644 index 7cb530d8b..000000000 --- a/client/uiwails/.task/checksum/build-frontend--DEV-- +++ /dev/null @@ -1 +0,0 @@ -4340708917a9379498dcca2d1bd8c665 diff --git a/client/uiwails/.task/checksum/linux-common-install-frontend-deps b/client/uiwails/.task/checksum/linux-common-install-frontend-deps deleted file mode 100644 index 21f7acb7d..000000000 --- a/client/uiwails/.task/checksum/linux-common-install-frontend-deps +++ /dev/null @@ -1 +0,0 @@ -f88f16cee21f42c24ff6b3c1410b0ddd diff --git a/client/uiwails/build/darwin/Taskfile.yml b/client/uiwails/build/darwin/Taskfile.yml new file mode 100644 index 000000000..6cd268658 --- /dev/null +++ b/client/uiwails/build/darwin/Taskfile.yml @@ -0,0 +1,35 @@ +version: '3' + +includes: + common: ../Taskfile.yml + +tasks: + build: + summary: Builds the application for macOS + cmds: + - task: build:native + vars: + DEV: '{{.DEV}}' + OUTPUT: '{{.OUTPUT}}' + + build:native: + summary: Builds the application natively on macOS + internal: true + deps: + - task: common:build:frontend + vars: + DEV: + ref: .DEV + cmds: + - go build {{.BUILD_FLAGS}} -o {{.OUTPUT}} + vars: + BUILD_FLAGS: '{{if eq .DEV "true"}}-buildvcs=false -gcflags=all="-l"{{else}}-tags production -trimpath -buildvcs=false -ldflags="-w -s"{{end}}' + DEFAULT_OUTPUT: '{{.BIN_DIR}}/{{.APP_NAME}}' + OUTPUT: '{{ .OUTPUT | default .DEFAULT_OUTPUT }}' + env: + GOOS: darwin + CGO_ENABLED: 1 + + run: + cmds: + - '{{.BIN_DIR}}/{{.APP_NAME}}' \ No newline at end of file diff --git a/client/uiwails/frontend/index.html b/client/uiwails/frontend/index.html index bac8e85ba..57a8dcea7 100644 --- a/client/uiwails/frontend/index.html +++ b/client/uiwails/frontend/index.html @@ -3,6 +3,7 @@ + NetBird diff --git a/client/uiwails/frontend/src/App.tsx b/client/uiwails/frontend/src/App.tsx index afdff120d..736147afa 100644 --- a/client/uiwails/frontend/src/App.tsx +++ b/client/uiwails/frontend/src/App.tsx @@ -34,9 +34,15 @@ export default function App() { return ( -
+
-
+
} /> } /> diff --git a/client/uiwails/frontend/src/components/NavBar.tsx b/client/uiwails/frontend/src/components/NavBar.tsx index f68ec5df0..15df4fa4f 100644 --- a/client/uiwails/frontend/src/components/NavBar.tsx +++ b/client/uiwails/frontend/src/components/NavBar.tsx @@ -1,60 +1,90 @@ import { NavLink } from 'react-router-dom' import NetBirdLogo from './NetBirdLogo' -const navItems = [ +const mainItems = [ { to: '/', label: 'Status', icon: StatusIcon }, { to: '/peers', label: 'Peers', icon: PeersIcon }, { to: '/networks', label: 'Networks', icon: NetworksIcon }, { to: '/profiles', label: 'Profiles', icon: ProfilesIcon }, +] + +const systemItems = [ { to: '/settings', label: 'Settings', icon: SettingsIcon }, { to: '/debug', label: 'Debug', icon: DebugIcon }, { to: '/update', label: 'Update', icon: UpdateIcon }, ] +function NavGroup({ items }: { items: typeof mainItems }) { + return ( +
+ {items.map((item) => ( + + {({ isActive }) => ( +
{ + if (!isActive) e.currentTarget.style.backgroundColor = 'var(--color-sidebar-hover)' + }} + onMouseLeave={e => { + if (!isActive) e.currentTarget.style.backgroundColor = 'transparent' + }} + > + + {item.label} +
+ )} +
+ ))} +
+ ) +} + export default function NavBar() { return ( -