@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.
- package/dist/cli.d.ts +7 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +272 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/docs/PRD-workspace-fixes.md +178 -0
- package/landing/src/app/dashboard/page.tsx +9 -679
- package/landing/src/app/dashboard/verify/page.tsx +1 -1
- package/landing/src/app/login/page.tsx +1 -1
- package/landing/src/app/page.tsx +23 -7
- package/landing/src/app/providers/dashboard/layout.tsx +5 -4
- package/landing/src/app/providers/dashboard/page.tsx +11 -641
- package/landing/src/app/workspace/layout.tsx +30 -0
- package/landing/src/app/workspace/page.tsx +1637 -0
- package/landing/src/lib/stats.json +1 -1
- package/package.json +1 -1
- package/src/cli.ts +320 -0
- package/src/index.ts +10 -0
package/landing/src/app/page.tsx
CHANGED
|
@@ -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
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
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: "
|
|
32
|
-
{ label: "APIs", href: "/
|
|
33
|
-
{ label: "
|
|
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">
|
|
275
|
+
<h1 className="text-xl font-bold">API Management</h1>
|
|
275
276
|
)}
|
|
276
277
|
</div>
|
|
277
278
|
<div className="flex items-center gap-4">
|