+ Connect
+ {client && tokenInfo && (
+
+ Connected to {client.baseUrl} as {tokenInfo.display_name || 'token'} (policies: {tokenInfo.policies.join(', ')}){' '}
+
+
+ )}
+
+ {health && (
+
+ Server: OpenBao {health.version}, {health.sealed ? 'sealed' : 'unsealed'}
+ {health.standby ? ', standby' : ''}
+
+ )}
+ {error && {error}
}
+
+ )
}
diff --git a/src/index.css b/src/index.css
index bb725ef..a2283f4 100644
--- a/src/index.css
+++ b/src/index.css
@@ -33,3 +33,18 @@ body {
.shell main {
padding: 1rem;
}
+
+form {
+ display: grid;
+ gap: 0.75rem;
+ max-width: 24rem;
+}
+
+form label {
+ display: grid;
+ gap: 0.25rem;
+}
+
+[role='alert'] {
+ color: #c0392b;
+}
diff --git a/src/routes.test.tsx b/src/routes.test.tsx
index 5889661..ef3fcab 100644
--- a/src/routes.test.tsx
+++ b/src/routes.test.tsx
@@ -1,6 +1,7 @@
import { render, screen } from '@testing-library/react'
import { createMemoryRouter, RouterProvider } from 'react-router'
import { expect, test } from 'vitest'
+import { SessionProvider } from './api/session'
import { routes } from './routes'
test.each([
@@ -10,12 +11,20 @@ test.each([
['/connect', 'Connect'],
])('renders %s', (path, heading) => {
const router = createMemoryRouter(routes, { initialEntries: [path] })
- render(