From 323e5e627b3776ae92b6f8082f5dd5c685bc12e8 Mon Sep 17 00:00:00 2001 From: Tobias Date: Mon, 11 Mar 2024 11:11:59 +0000 Subject: [PATCH] fixes #615 and #617 --- website/src/components/DeviceListItem.tsx | 5 +---- website/src/components/DeviceListItemSkeleton.tsx | 5 +---- website/src/components/Navigation.tsx | 12 +++++++++--- website/vite.config.ts | 10 ++++++++++ 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/website/src/components/DeviceListItem.tsx b/website/src/components/DeviceListItem.tsx index 4fb35af5..c6cc3f49 100644 --- a/website/src/components/DeviceListItem.tsx +++ b/website/src/components/DeviceListItem.tsx @@ -47,6 +47,7 @@ export const DeviceListItem = observer( {device.name} } + subheader={"Last seen: " + lastSeen(device.lastHandshakeTime)} avatar={ {/* */} @@ -83,10 +84,6 @@ export const DeviceListItem = observer( Disconnected )} - - Last Seen - {lastSeen(device.lastHandshakeTime)} - Public key diff --git a/website/src/components/DeviceListItemSkeleton.tsx b/website/src/components/DeviceListItemSkeleton.tsx index 8dbe582c..2cadaad2 100644 --- a/website/src/components/DeviceListItemSkeleton.tsx +++ b/website/src/components/DeviceListItemSkeleton.tsx @@ -6,6 +6,7 @@ export function DeviceListItemSkeleton() { } + subheader={} avatar={} action={} /> @@ -24,10 +25,6 @@ export function DeviceListItemSkeleton() { Upload - - Last Seen - - Public key diff --git a/website/src/components/Navigation.tsx b/website/src/components/Navigation.tsx index 2baea97c..af1df4c0 100644 --- a/website/src/components/Navigation.tsx +++ b/website/src/components/Navigation.tsx @@ -7,13 +7,13 @@ import AppBar from '@mui/material/AppBar'; import Toolbar from '@mui/material/Toolbar'; import Typography from '@mui/material/Typography'; import Link from '@mui/material/Link'; -import Button from '@mui/material/Button'; import Chip from '@mui/material/Chip'; import VpnKey from '@mui/icons-material/VpnKey'; import IconButton from "@mui/material/IconButton"; import Brightness4Icon from '@mui/icons-material/Brightness4'; import Brightness7Icon from '@mui/icons-material/Brightness7'; import LogoutIcon from '@mui/icons-material/Logout'; +import LoginIcon from '@mui/icons-material/Login'; import DevicesIcon from '@mui/icons-material/Devices'; import {useMediaQuery} from "@mui/material"; @@ -57,12 +57,18 @@ export default function Navigation() { )} - {hasAuthCookie && ( + {hasAuthCookie ? ( - + + ) : ( + + + + + )} diff --git a/website/vite.config.ts b/website/vite.config.ts index 461f47bb..381dcdda 100644 --- a/website/vite.config.ts +++ b/website/vite.config.ts @@ -15,6 +15,16 @@ export default defineConfig({ target: 'http://localhost:8000', changeOrigin: true, secure: false + }, + '/signin': { + target: 'http://localhost:8000', + changeOrigin: true, + secure: false + }, + '/signout': { + target: 'http://localhost:8000', + changeOrigin: true, + secure: false } } }