Add environments (spaces) support
All checks were successful
Deploy to Server / deploy (push) Successful in 2m28s
All checks were successful
Deploy to Server / deploy (push) Successful in 2m28s
- API client sends _environment param on all content/asset requests - GET /api/environments endpoint to list configured environments - EnvironmentSwitcher in Sidebar with i18n label "Space" - clearSession() also clears environment from sessionStorage - .env.example documents ADMIN_USERNAME/PASSWORD/SESSION_SECRET Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import { useQueries, useQuery } from "@tanstack/react-query";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { fetchCollections, fetchContentList, getApiKey, clearSession } from "@/lib/api";
|
||||
import { LocaleSwitcher } from "./LocaleSwitcher";
|
||||
import { EnvironmentSwitcher } from "./EnvironmentSwitcher";
|
||||
|
||||
const navLinkClass =
|
||||
"inline-flex items-center gap-2 rounded-lg px-3 py-2.5 text-sm font-medium min-h-[44px] md:min-h-0 md:py-2";
|
||||
@@ -101,6 +102,9 @@ export function Sidebar({ locale, mobileOpen = false, onClose }: SidebarProps) {
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex shrink-0 flex-col gap-2 pb-1">
|
||||
<EnvironmentSwitcher />
|
||||
</div>
|
||||
<div className="flex shrink-0 flex-col gap-1">
|
||||
<Link
|
||||
href="/"
|
||||
|
||||
Reference in New Issue
Block a user