Compare commits

..
3 Commits
Author SHA1 Message Date
Andrew S Erwin e3d765e97b release 0.2.15: bump federated service VERSION, installer image version and mcp package version
release gate / check (push) Failing after 6m55s
release / smoke (push) Successful in 10m30s
release / publish (push) Failing after 9m49s
2026-11-17 11:08:33 -06:00
Andrew S Erwin 78231502f1 CHANGELOG: 0.2.15 grouped settings navigation entry 2026-11-17 11:08:33 -06:00
Andrew S Erwin 212d587f97 Settings: grouped vertical navigation replaces the overflowing flat tab strip
The 12 settings sat in a flat horizontal tab strip inside a narrow max-w-2xl
container, so roughly half (MCP, WebDAV, CalDAV, CardDAV, OIDC) hid behind a
horizontal scrollbar on desktop AND mobile, with no logical grouping.

Replaced with a grouped vertical settings nav:
- Account: Profile, Sign-in
- Connections: WebDAV, CalDAV, CardDAV, Contacts sync, IMAP
- AI & Automation: AI, MCP, Automations, Notifications
- Developer: API Keys

Desktop shows the nav beside the content pane (page widened to max-w-5xl);
below md it becomes a list -> detail flow with an "All settings" back button,
the same master-detail pattern as collections/tags/contacts. Built on Radix
Tabs with orientation="vertical" and controlled value, so role="tab"
locators, deep links and keyboard navigation are preserved; group headers
are non-focusable fragments inside the list.

Clarified two jargon labels: OIDC -> "Sign-in" (content header "Sign-in
(OIDC)") and Nextcloud -> "Contacts sync" (header "Contacts sync
(Nextcloud)"), distinguishing the legacy contact import from the CardDAV
collection connector. All 12 content panels preserved verbatim.

Verified: regressions 20/20 (incl. the three DAV settings walkthroughs and
the mobile settings test, now exercising the grouped nav), real-stack e2e
all pass, lint/SSR-lint/build 0 errors; before/after screenshots at 1280px
and 390px confirm the full grouped nav and the mobile master-detail flow.
2026-11-17 11:08:10 -06:00
8 changed files with 165 additions and 104 deletions
+14
View File
@@ -7,6 +7,20 @@ Versions correspond to git tags and to the published image set
(the line was reset to 0.2.x at 0.2.14 — Superbrain is pre-beta). (the line was reset to 0.2.x at 0.2.14 — Superbrain is pre-beta).
Dates are tag dates. Dates are tag dates.
## 0.2.15 — 2026-11-17
### Changed
- **Settings are now grouped and fully visible.** The flat tab strip (which
hid half the options behind a horizontal scrollbar, on desktop and mobile)
is replaced by a grouped navigation: **Account** (Profile, Sign-in),
**Connections** (WebDAV, CalDAV, CardDAV, Contacts sync, IMAP),
**AI & Automation** (AI, MCP, Automations, Notifications) and
**Developer** (API Keys). On desktop the menu sits beside the settings
panel; on phones it's a list that opens into the selected panel with a
back button. Two labels were clarified: "OIDC" is now **Sign-in**, and the
Nextcloud contact import is now **Contacts sync** (distinct from the
CardDAV connector).
## 0.2.14 — 2026-11-17 ## 0.2.14 — 2026-11-17
### Changed ### Changed
+1 -1
View File
@@ -48,7 +48,7 @@ SUPERBRAIN_APP_IP="192.168.0.94"
SUPERBRAIN_MIGRATE_IP="192.168.0.95" SUPERBRAIN_MIGRATE_IP="192.168.0.95"
# Release to install; the generic `upgrade` flow keeps .env in step with the # Release to install; the generic `upgrade` flow keeps .env in step with the
# service file's VERSION afterwards. # service file's VERSION afterwards.
SUPERBRAIN_IMAGE_VERSION="0.2.14" SUPERBRAIN_IMAGE_VERSION="0.2.15"
# render_superbrain_compose writes the app-dir compose file. Called by # render_superbrain_compose writes the app-dir compose file. Called by
# config_superbrain (install) and by deploy/federated/update.sh after a lib # config_superbrain (install) and by deploy/federated/update.sh after a lib
+1 -1
View File
@@ -2,7 +2,7 @@ NAME=superbrain
DESCRIPTION="Bookmark & Knowledge Base" DESCRIPTION="Bookmark & Knowledge Base"
DOCS=https://github.com/andrew/superbrain DOCS=https://github.com/andrew/superbrain
CONTAINER=federatedcomputer/superbrain-app CONTAINER=federatedcomputer/superbrain-app
VERSION=0.2.14 VERSION=0.2.15
INTERNAL_IP=192.168.0.93 INTERNAL_IP=192.168.0.93
DEPENDS="postgresql" DEPENDS="postgresql"
PORTS=3000 PORTS=3000
+1 -1
View File
@@ -91,7 +91,7 @@ func httpClient(conn Conn) *http.Client {
// ListTools connects, initializes and lists the server's tools, then closes // ListTools connects, initializes and lists the server's tools, then closes
// the session. The context bounds the whole exchange. // the session. The context bounds the whole exchange.
func ListTools(ctx context.Context, conn Conn) ([]Tool, error) { func ListTools(ctx context.Context, conn Conn) ([]Tool, error) {
client := mcpsdk.NewClient(&mcpsdk.Implementation{Name: "superbrain", Version: "0.2.14"}, nil) client := mcpsdk.NewClient(&mcpsdk.Implementation{Name: "superbrain", Version: "0.2.15"}, nil)
var transport mcpsdk.Transport var transport mcpsdk.Transport
hc := httpClient(conn) hc := httpClient(conn)
switch conn.Transport { switch conn.Transport {
+1 -1
View File
@@ -7,7 +7,7 @@ name = "superbrain-mcp"
# Versioned in lockstep with the Superbrain release it speaks to (house # Versioned in lockstep with the Superbrain release it speaks to (house
# tooling tracks one version per app); the federated mcpserver gateway # tooling tracks one version per app); the federated mcpserver gateway
# installs this package and spawns `superbrain-mcp` per linked instance. # installs this package and spawns `superbrain-mcp` per linked instance.
version = "0.2.14" version = "0.2.15"
description = "MCP server for Superbrain — bookmarks, tags and pages over the Superbrain REST API" description = "MCP server for Superbrain — bookmarks, tags and pages over the Superbrain REST API"
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.10"
+1 -1
View File
@@ -1,3 +1,3 @@
"""Superbrain MCP server — bookmarks, tags and pages for AI tooling.""" """Superbrain MCP server — bookmarks, tags and pages for AI tooling."""
__version__ = "0.2.14" __version__ = "0.2.15"
+1 -1
View File
@@ -828,7 +828,7 @@ try {
await noOverflow(path) await noOverflow(path)
} }
await mobileContext.close() await mobileContext.close()
console.log('PASS: mobile shell — drawer nav, bookmark cards, master-detail rails, scrollable settings tabs, no horizontal overflow on any screen') console.log('PASS: mobile shell — drawer nav, bookmark cards, master-detail rails, grouped settings nav, no horizontal overflow on any screen')
// Revocation failure path (review CR-02): when Go's revocation fails, the // Revocation failure path (review CR-02): when Go's revocation fails, the
// local sign-out still completes, but the UI must say so — local cookie // local sign-out still completes, but the UI must say so — local cookie
+143 -96
View File
@@ -1,11 +1,11 @@
'use client' 'use client'
import { useState, useEffect, useCallback } from 'react' import { useState, useEffect, useCallback, Fragment } from 'react'
import { useSession } from 'next-auth/react' import { useSession } from 'next-auth/react'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input' import { Input } from '@/components/ui/input'
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs' import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs'
import { User, Mail, Server, Cloud, Shield, Bell, Sparkles, Bot, KeyRound, PlugZap, FolderSync, CalendarDays, BookUser, Check, X, AlertTriangle } from 'lucide-react' import { User, Mail, Server, Cloud, Shield, Bell, Sparkles, Bot, KeyRound, PlugZap, FolderSync, CalendarDays, BookUser, ArrowLeft, Check, X, AlertTriangle } from 'lucide-react'
import { toast } from 'sonner' import { toast } from 'sonner'
import { invalidateReference } from '@/lib/reference-data' import { invalidateReference } from '@/lib/reference-data'
import { NotificationsSettings } from '@/components/notifications-settings' import { NotificationsSettings } from '@/components/notifications-settings'
@@ -17,6 +17,36 @@ import { WebdavSettings } from '@/components/webdav-settings'
import { CalDavSettings } from '@/components/caldav-settings' import { CalDavSettings } from '@/components/caldav-settings'
import { CardDavSettings } from '@/components/carddav-settings' import { CardDavSettings } from '@/components/carddav-settings'
import type { OidcStatus } from '@/lib/oidc-config' import type { OidcStatus } from '@/lib/oidc-config'
import { cn } from '@/lib/utils'
import { useMediaQuery } from '@/lib/use-media-query'
// Settings are grouped by purpose, not a flat strip: account, the external
// services that feed your data, the assistant/automation surface, and
// machine/developer access. Each item keeps its Radix tab value so deep
// links and the browser suites' role="tab" locators are unchanged.
const NAV_GROUPS = [
{ label: 'Account', items: [
{ value: 'profile', label: 'Profile', icon: User },
{ value: 'oidc', label: 'Sign-in', icon: Shield },
] },
{ label: 'Connections', items: [
{ value: 'webdav', label: 'WebDAV', icon: FolderSync },
{ value: 'caldav', label: 'CalDAV', icon: CalendarDays },
{ value: 'carddav', label: 'CardDAV', icon: BookUser },
{ value: 'nextcloud', label: 'Contacts sync', icon: Cloud },
{ value: 'imap', label: 'IMAP', icon: Mail },
] },
{ label: 'AI & Automation', items: [
{ value: 'ai', label: 'AI', icon: Bot },
{ value: 'mcp', label: 'MCP', icon: PlugZap },
{ value: 'automations', label: 'Automations', icon: Sparkles },
{ value: 'notifications', label: 'Notifications', icon: Bell },
] },
{ label: 'Developer', items: [
{ value: 'api-keys', label: 'API Keys', icon: KeyRound },
] },
]
export function SettingsClient({ oidc, callbackUrl }: { oidc: OidcStatus; callbackUrl: string }) { export function SettingsClient({ oidc, callbackUrl }: { oidc: OidcStatus; callbackUrl: string }) {
const { data: session } = useSession() const { data: session } = useSession()
@@ -25,6 +55,12 @@ export function SettingsClient({ oidc, callbackUrl }: { oidc: OidcStatus; callba
const [savingImap, setSavingImap] = useState(false) const [savingImap, setSavingImap] = useState(false)
const [testingImap, setTestingImap] = useState(false) const [testingImap, setTestingImap] = useState(false)
const [syncingContacts, setSyncingContacts] = useState(false) const [syncingContacts, setSyncingContacts] = useState(false)
const [section, setSection] = useState('profile')
// Below md the grouped nav becomes a list -> detail flow (same
// master-detail pattern as collections/tags/contacts); at md+ the
// nav and the selected panel sit side by side.
const isNarrow = useMediaQuery('(max-width: 767px)')
const [mobileDetail, setMobileDetail] = useState(false)
useEffect(() => { useEffect(() => {
fetch('/api/settings/imap').then(r => r.json()).then(data => { fetch('/api/settings/imap').then(r => r.json()).then(data => {
@@ -92,29 +128,49 @@ export function SettingsClient({ oidc, callbackUrl }: { oidc: OidcStatus; callba
} }
return ( return (
<div className="max-w-2xl space-y-6"> <div className="max-w-5xl space-y-6">
<div> <div>
<h1 className="font-display text-2xl font-bold tracking-tight">Settings</h1> <h1 className="font-display text-2xl font-bold tracking-tight">Settings</h1>
<p className="text-sm text-muted-foreground mt-1">Configure your integrations and preferences</p> <p className="text-sm text-muted-foreground mt-1">Configure your integrations and preferences</p>
</div> </div>
<Tabs defaultValue="profile" className="w-full"> <Tabs
<TabsList className="w-full justify-start overflow-x-auto flex-nowrap"> value={section}
<TabsTrigger value="profile" className="gap-1.5"><User className="h-3.5 w-3.5" /> Profile</TabsTrigger> onValueChange={(v) => { setSection(v); if (isNarrow) setMobileDetail(true) }}
<TabsTrigger value="imap" className="gap-1.5"><Mail className="h-3.5 w-3.5" /> IMAP</TabsTrigger> orientation="vertical"
<TabsTrigger value="nextcloud" className="gap-1.5"><Cloud className="h-3.5 w-3.5" /> Nextcloud</TabsTrigger> className="w-full"
<TabsTrigger value="notifications" className="gap-1.5"><Bell className="h-3.5 w-3.5" /> Notifications</TabsTrigger> >
<TabsTrigger value="automations" className="gap-1.5"><Sparkles className="h-3.5 w-3.5" /> Automations</TabsTrigger> <div className="flex flex-col gap-6 md:flex-row md:gap-8">
<TabsTrigger value="ai" className="gap-1.5"><Bot className="h-3.5 w-3.5" /> AI</TabsTrigger> <TabsList
<TabsTrigger value="api-keys" className="gap-1.5"><KeyRound className="h-3.5 w-3.5" /> API Keys</TabsTrigger> aria-label="Settings sections"
<TabsTrigger value="mcp" className="gap-1.5"><PlugZap className="h-3.5 w-3.5" /> MCP</TabsTrigger> className={cn(
<TabsTrigger value="webdav" className="gap-1.5"><FolderSync className="h-3.5 w-3.5" /> WebDAV</TabsTrigger> 'flex h-auto w-full flex-col items-stretch justify-start gap-0.5 rounded-lg border bg-card/50 p-2 md:w-56 md:shrink-0',
<TabsTrigger value="caldav" className="gap-1.5"><CalendarDays className="h-3.5 w-3.5" /> CalDAV</TabsTrigger> isNarrow && mobileDetail && 'hidden'
<TabsTrigger value="carddav" className="gap-1.5"><BookUser className="h-3.5 w-3.5" /> CardDAV</TabsTrigger> )}
<TabsTrigger value="oidc" className="gap-1.5"><Shield className="h-3.5 w-3.5" /> OIDC</TabsTrigger> >
{NAV_GROUPS.map((g) => (
<Fragment key={g.label}>
<div className="px-3 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground first:pt-1">{g.label}</div>
{g.items.map((it) => (
<TabsTrigger
key={it.value}
value={it.value}
className="w-full justify-start gap-2 rounded-md px-3 py-2 data-[state=active]:bg-accent data-[state=active]:text-accent-foreground data-[state=active]:shadow-none"
>
<it.icon className="h-3.5 w-3.5 shrink-0" /> {it.label}
</TabsTrigger>
))}
</Fragment>
))}
</TabsList> </TabsList>
<TabsContent value="profile" className="space-y-4 mt-4"> <div className={cn('min-w-0 flex-1', isNarrow && !mobileDetail && 'hidden')}>
{isNarrow && mobileDetail && (
<Button variant="ghost" size="sm" className="mb-3 -ml-2 gap-1 text-muted-foreground" onClick={() => setMobileDetail(false)}>
<ArrowLeft className="h-4 w-4" /> All settings
</Button>
)}
<TabsContent value="profile" className="mt-0 space-y-4">
<div className="flex items-center gap-4"> <div className="flex items-center gap-4">
<div className="h-16 w-16 rounded-full bg-primary/20 flex items-center justify-center text-2xl font-bold text-primary"> <div className="h-16 w-16 rounded-full bg-primary/20 flex items-center justify-center text-2xl font-bold text-primary">
{(session?.user?.name ?? session?.user?.email ?? '?')[0]?.toUpperCase()} {(session?.user?.name ?? session?.user?.email ?? '?')[0]?.toUpperCase()}
@@ -125,8 +181,67 @@ export function SettingsClient({ oidc, callbackUrl }: { oidc: OidcStatus; callba
</div> </div>
</div> </div>
</TabsContent> </TabsContent>
<TabsContent value="oidc" className="mt-0 space-y-4">
<TabsContent value="imap" className="space-y-4 mt-4"> <div className="rounded-lg border p-4 space-y-3">
<h3 className="font-medium flex items-center gap-2"><Shield className="h-4 w-4" /> Sign-in (OIDC)</h3>
<p className="text-sm text-muted-foreground">Authelia single sign-on, configured via environment variables (read-only)</p>
<div className={`flex items-start gap-2 rounded-md p-3 text-sm ${oidc.enabled ? 'bg-green-500/10 text-green-700 dark:text-green-400' : 'bg-amber-500/10 text-amber-800 dark:text-amber-300'}`}>
{oidc.enabled ? <Check className="h-4 w-4 mt-0.5 shrink-0" /> : <AlertTriangle className="h-4 w-4 mt-0.5 shrink-0" />}
<span>
{oidc.enabled
? <>Configured for <span className="font-mono break-all">{oidc.issuer}</span>. Authelia sign-in is enabled.</>
: <>Not connected. Authelia sign-in is disabled until all three variables below hold real values. Users can sign in with email and password meanwhile. Setup guide: <span className="font-mono">docs/AUTHELIA.md</span></>}
</span>
</div>
<div className="space-y-2">
{([['OIDC_ISSUER', oidc.issuerSet], ['OIDC_CLIENT_ID', oidc.clientIdSet], ['OIDC_CLIENT_SECRET', oidc.clientSecretSet]] as const).map(([name, set]) => (
<div key={name} className="flex items-center gap-2">
<span className="text-xs font-mono bg-muted px-2 py-1 rounded">{name}</span>
<span className="text-sm text-muted-foreground">{set ? 'Set' : 'Not set'}</span>
{set ? <Check className="h-4 w-4 text-green-500" /> : <X className="h-4 w-4 text-muted-foreground" />}
</div>
))}
</div>
<div className="space-y-1 pt-2 border-t">
<p className="text-xs font-medium text-muted-foreground">Redirect URI to register in Authelia</p>
<p className="text-xs font-mono bg-muted px-2 py-1.5 rounded break-all" suppressHydrationWarning>{callbackUrl}</p>
</div>
</div>
</TabsContent>
<TabsContent value="webdav" className="mt-0 space-y-4">
<WebdavSettings />
</TabsContent>
<TabsContent value="caldav" className="mt-0 space-y-4">
<CalDavSettings />
</TabsContent>
<TabsContent value="carddav" className="mt-0 space-y-4">
<CardDavSettings />
</TabsContent>
<TabsContent value="nextcloud" className="mt-0 space-y-4">
<div className="rounded-lg border p-4 space-y-3">
<h3 className="font-medium flex items-center gap-2"><Cloud className="h-4 w-4" /> Contacts sync (Nextcloud)</h3>
<div className="grid grid-cols-2 gap-3">
<div className="col-span-2">
<label className="text-xs font-medium text-muted-foreground">Nextcloud URL</label>
<Input value={ncConfig.nextcloudUrl} onChange={(e: React.ChangeEvent<HTMLInputElement>) => setNcConfig(p => ({ ...p, nextcloudUrl: e.target.value }))} placeholder="https://nextcloud.example.com" />
</div>
<div className="col-span-2">
<label className="text-xs font-medium text-muted-foreground">CardDAV Path (optional)</label>
<Input value={ncConfig.cardDavPath} onChange={(e: React.ChangeEvent<HTMLInputElement>) => setNcConfig(p => ({ ...p, cardDavPath: e.target.value }))} placeholder="/remote.php/dav/addressbooks/users/USER/contacts/" />
</div>
<div>
<label className="text-xs font-medium text-muted-foreground">Username</label>
<Input value={ncConfig.username} onChange={(e: React.ChangeEvent<HTMLInputElement>) => setNcConfig(p => ({ ...p, username: e.target.value }))} />
</div>
<div>
<label className="text-xs font-medium text-muted-foreground">App Password</label>
<Input type="password" value={ncConfig.password} onChange={(e: React.ChangeEvent<HTMLInputElement>) => setNcConfig(p => ({ ...p, password: e.target.value }))} />
</div>
</div>
<Button onClick={syncContacts} loading={syncingContacts}>Sync Contacts Now</Button>
</div>
</TabsContent>
<TabsContent value="imap" className="mt-0 space-y-4">
<div className="rounded-lg border p-4 space-y-3"> <div className="rounded-lg border p-4 space-y-3">
<h3 className="font-medium flex items-center gap-2"><Server className="h-4 w-4" /> IMAP Configuration</h3> <h3 className="font-medium flex items-center gap-2"><Server className="h-4 w-4" /> IMAP Configuration</h3>
<div className="grid grid-cols-2 gap-3"> <div className="grid grid-cols-2 gap-3">
@@ -162,91 +277,23 @@ export function SettingsClient({ oidc, callbackUrl }: { oidc: OidcStatus; callba
</div> </div>
</div> </div>
</TabsContent> </TabsContent>
<TabsContent value="ai" className="mt-0 space-y-4">
<TabsContent value="nextcloud" className="space-y-4 mt-4">
<div className="rounded-lg border p-4 space-y-3">
<h3 className="font-medium flex items-center gap-2"><Cloud className="h-4 w-4" /> Nextcloud / CardDAV</h3>
<div className="grid grid-cols-2 gap-3">
<div className="col-span-2">
<label className="text-xs font-medium text-muted-foreground">Nextcloud URL</label>
<Input value={ncConfig.nextcloudUrl} onChange={(e: React.ChangeEvent<HTMLInputElement>) => setNcConfig(p => ({ ...p, nextcloudUrl: e.target.value }))} placeholder="https://nextcloud.example.com" />
</div>
<div className="col-span-2">
<label className="text-xs font-medium text-muted-foreground">CardDAV Path (optional)</label>
<Input value={ncConfig.cardDavPath} onChange={(e: React.ChangeEvent<HTMLInputElement>) => setNcConfig(p => ({ ...p, cardDavPath: e.target.value }))} placeholder="/remote.php/dav/addressbooks/users/USER/contacts/" />
</div>
<div>
<label className="text-xs font-medium text-muted-foreground">Username</label>
<Input value={ncConfig.username} onChange={(e: React.ChangeEvent<HTMLInputElement>) => setNcConfig(p => ({ ...p, username: e.target.value }))} />
</div>
<div>
<label className="text-xs font-medium text-muted-foreground">App Password</label>
<Input type="password" value={ncConfig.password} onChange={(e: React.ChangeEvent<HTMLInputElement>) => setNcConfig(p => ({ ...p, password: e.target.value }))} />
</div>
</div>
<Button onClick={syncContacts} loading={syncingContacts}>Sync Contacts Now</Button>
</div>
</TabsContent>
<TabsContent value="notifications" className="space-y-4 mt-4">
<NotificationsSettings />
</TabsContent>
<TabsContent value="automations" className="space-y-4 mt-4">
<AutomationsSettings />
</TabsContent>
<TabsContent value="ai" className="space-y-4 mt-4">
<AiSettings /> <AiSettings />
</TabsContent> </TabsContent>
<TabsContent value="mcp" className="mt-0 space-y-4">
<TabsContent value="api-keys" className="space-y-4 mt-4">
<ApiKeysSettings />
</TabsContent>
<TabsContent value="mcp" className="space-y-4 mt-4">
<McpSettings /> <McpSettings />
</TabsContent> </TabsContent>
<TabsContent value="automations" className="mt-0 space-y-4">
<TabsContent value="webdav" className="space-y-4 mt-4"> <AutomationsSettings />
<WebdavSettings />
</TabsContent> </TabsContent>
<TabsContent value="notifications" className="mt-0 space-y-4">
<TabsContent value="caldav" className="space-y-4 mt-4"> <NotificationsSettings />
<CalDavSettings />
</TabsContent> </TabsContent>
<TabsContent value="api-keys" className="mt-0 space-y-4">
<TabsContent value="carddav" className="space-y-4 mt-4"> <ApiKeysSettings />
<CardDavSettings />
</TabsContent> </TabsContent>
<TabsContent value="oidc" className="space-y-4 mt-4">
<div className="rounded-lg border p-4 space-y-3">
<h3 className="font-medium flex items-center gap-2"><Shield className="h-4 w-4" /> OIDC Configuration</h3>
<p className="text-sm text-muted-foreground">Authelia single sign-on, configured via environment variables (read-only)</p>
<div className={`flex items-start gap-2 rounded-md p-3 text-sm ${oidc.enabled ? 'bg-green-500/10 text-green-700 dark:text-green-400' : 'bg-amber-500/10 text-amber-800 dark:text-amber-300'}`}>
{oidc.enabled ? <Check className="h-4 w-4 mt-0.5 shrink-0" /> : <AlertTriangle className="h-4 w-4 mt-0.5 shrink-0" />}
<span>
{oidc.enabled
? <>Configured for <span className="font-mono break-all">{oidc.issuer}</span>. Authelia sign-in is enabled.</>
: <>Not connected. Authelia sign-in is disabled until all three variables below hold real values. Users can sign in with email and password meanwhile. Setup guide: <span className="font-mono">docs/AUTHELIA.md</span></>}
</span>
</div>
<div className="space-y-2">
{([['OIDC_ISSUER', oidc.issuerSet], ['OIDC_CLIENT_ID', oidc.clientIdSet], ['OIDC_CLIENT_SECRET', oidc.clientSecretSet]] as const).map(([name, set]) => (
<div key={name} className="flex items-center gap-2">
<span className="text-xs font-mono bg-muted px-2 py-1 rounded">{name}</span>
<span className="text-sm text-muted-foreground">{set ? 'Set' : 'Not set'}</span>
{set ? <Check className="h-4 w-4 text-green-500" /> : <X className="h-4 w-4 text-muted-foreground" />}
</div>
))}
</div>
<div className="space-y-1 pt-2 border-t">
<p className="text-xs font-medium text-muted-foreground">Redirect URI to register in Authelia</p>
<p className="text-xs font-mono bg-muted px-2 py-1.5 rounded break-all" suppressHydrationWarning>{callbackUrl}</p>
</div> </div>
</div> </div>
</TabsContent>
</Tabs> </Tabs>
</div> </div>
) )