@nordsym/apiclaw 1.3.4 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,7 +43,7 @@ function VerifyContent() {
43
43
 
44
44
  // Redirect to dashboard after short delay
45
45
  setTimeout(() => {
46
- router.push("/dashboard");
46
+ router.push("/workspace");
47
47
  }, 1500);
48
48
  } catch (err) {
49
49
  setStatus("error");
@@ -20,7 +20,7 @@ export default function LoginPage() {
20
20
  const res = await fetch("/api/workspace-auth/session");
21
21
  const data = await res.json();
22
22
  if (data.session) {
23
- router.push("/dashboard");
23
+ router.push("/workspace");
24
24
  return;
25
25
  }
26
26
  } catch {
@@ -154,6 +154,7 @@ const directCallProviders = [
154
154
 
155
155
  export default function Home() {
156
156
  const [isDark, setIsDark] = useState(true);
157
+ const [isLoggedIn, setIsLoggedIn] = useState(false);
157
158
  const [showCopied, setShowCopied] = useState(false);
158
159
  const [showContextCopied, setShowContextCopied] = useState(false);
159
160
  const [activeSection, setActiveSection] = useState<string>("");
@@ -262,6 +263,11 @@ Website: https://apiclaw.nordsym.com`;
262
263
  const prefersDark = saved ? saved === 'dark' : true;
263
264
  setIsDark(prefersDark);
264
265
  document.documentElement.classList.toggle('dark', prefersDark);
266
+
267
+ // Check if logged in
268
+ const workspaceSession = localStorage.getItem('apiclaw_workspace_session');
269
+ const providerSession = localStorage.getItem('apiclaw_session');
270
+ setIsLoggedIn(!!(workspaceSession || providerSession));
265
271
  }, []);
266
272
 
267
273
  const toggleTheme = () => {
@@ -325,13 +331,23 @@ Website: https://apiclaw.nordsym.com`;
325
331
 
326
332
  {/* Desktop actions */}
327
333
  <div className="hidden md:flex items-center gap-3">
328
- <a
329
- href="/providers/dashboard"
330
- className="text-sm text-text-muted hover:text-accent transition flex items-center gap-1"
331
- >
332
- <FileText className="w-4 h-4" />
333
- Add Your API
334
- </a>
334
+ {isLoggedIn ? (
335
+ <a
336
+ href="/workspace"
337
+ className="text-sm text-text-muted hover:text-accent transition flex items-center gap-1"
338
+ >
339
+ <Zap className="w-4 h-4" />
340
+ Workspace
341
+ </a>
342
+ ) : (
343
+ <a
344
+ href="/providers/register"
345
+ className="text-sm text-text-muted hover:text-accent transition flex items-center gap-1"
346
+ >
347
+ <FileText className="w-4 h-4" />
348
+ Add Your API
349
+ </a>
350
+ )}
335
351
  <button
336
352
  onClick={toggleTheme}
337
353
  className="p-2.5 rounded-lg hover:bg-surface transition"
@@ -18,6 +18,7 @@ import {
18
18
  PlayCircle,
19
19
  RefreshCw,
20
20
  Loader2,
21
+ Users,
21
22
  } from "lucide-react";
22
23
 
23
24
  interface NavItem {
@@ -28,9 +29,9 @@ interface NavItem {
28
29
  }
29
30
 
30
31
  const mainNavItems: NavItem[] = [
31
- { label: "Overview", href: "/providers/dashboard?tab=overview", icon: Home },
32
- { label: "APIs", href: "/providers/dashboard?tab=apis", icon: Zap },
33
- { label: "Analytics", href: "/providers/dashboard?tab=analytics", icon: BarChart3 },
32
+ { label: "Workspace", href: "/workspace", icon: Home },
33
+ { label: "APIs", href: "/workspace?tab=apis", icon: Zap },
34
+ { label: "Agents", href: "/workspace?tab=agents", icon: Users },
34
35
  ];
35
36
 
36
37
  export default function DashboardLayout({
@@ -271,7 +272,7 @@ export default function DashboardLayout({
271
272
  </Link>
272
273
  )}
273
274
  {!isApiDetailPage && (
274
- <h1 className="text-xl font-bold">Provider Dashboard</h1>
275
+ <h1 className="text-xl font-bold">API Management</h1>
275
276
  )}
276
277
  </div>
277
278
  <div className="flex items-center gap-4">