diff --git a/client/App.tsx b/client/App.tsx index be284756..5836f068 100644 --- a/client/App.tsx +++ b/client/App.tsx @@ -551,14 +551,70 @@ const App = () => ( /> {/* Staff Pages Routes - Protected */} - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> {/* Explicit 404 route for static hosting fallbacks */} } /> diff --git a/client/components/ArmSwitcher.tsx b/client/components/ArmSwitcher.tsx index 0e7f386f..1fa7ca28 100644 --- a/client/components/ArmSwitcher.tsx +++ b/client/components/ArmSwitcher.tsx @@ -78,7 +78,8 @@ const ARMS: Arm[] = [ ]; const LOGO_URLS: Record = { - staff: "https://cdn.builder.io/api/v1/image/assets%2Ffc53d607e21d497595ac97e0637001a1%2Fc0414efd7af54ef4b821a05d469150d0?format=webp&width=800", + staff: + "https://cdn.builder.io/api/v1/image/assets%2Ffc53d607e21d497595ac97e0637001a1%2Fc0414efd7af54ef4b821a05d469150d0?format=webp&width=800", labs: "https://cdn.builder.io/api/v1/image/assets%2Ffc53d607e21d497595ac97e0637001a1%2Fd93f7113d34347469e74421c3a3412e5?format=webp&width=800", gameforge: "https://cdn.builder.io/api/v1/image/assets%2Ffc53d607e21d497595ac97e0637001a1%2Fcd3534c1caa0497abfd44224040c6059?format=webp&width=800", diff --git a/client/components/Layout.tsx b/client/components/Layout.tsx index 2b82bbf8..a52e3a87 100644 --- a/client/components/Layout.tsx +++ b/client/components/Layout.tsx @@ -367,7 +367,10 @@ export default function CodeLayout({ children, hideFooter }: LayoutProps) { - + Internal Docs diff --git a/client/components/admin/AdminBlogManager.tsx b/client/components/admin/AdminBlogManager.tsx index e8effb11..93ad0955 100644 --- a/client/components/admin/AdminBlogManager.tsx +++ b/client/components/admin/AdminBlogManager.tsx @@ -87,46 +87,46 @@ export default function AdminBlogManager() { loadBlogPosts(); }, [loadBlogPosts]); - const handleDeleteBlogPost = useCallback( - async (slug: string) => { - setDeleting(slug); - try { - const res = await fetch(`/api/blog/${slug}`, { method: "DELETE" }); - if (res.ok) { - setBlogPosts((posts) => posts.filter((p) => p.slug !== slug)); - aethexToast.success({ - title: "Blog post deleted", - description: `Post "${slug}" has been removed`, - }); - } else { - aethexToast.error({ - title: "Failed to delete blog post", - description: res.statusText || "Unknown error", - }); - } - } catch (error) { - console.error("Error deleting blog post:", error); - aethexToast.error({ - title: "Error deleting blog post", - description: String(error), + const handleDeleteBlogPost = useCallback(async (slug: string) => { + setDeleting(slug); + try { + const res = await fetch(`/api/blog/${slug}`, { method: "DELETE" }); + if (res.ok) { + setBlogPosts((posts) => posts.filter((p) => p.slug !== slug)); + aethexToast.success({ + title: "Blog post deleted", + description: `Post "${slug}" has been removed`, + }); + } else { + aethexToast.error({ + title: "Failed to delete blog post", + description: res.statusText || "Unknown error", }); - } finally { - setDeleting(null); } - }, - [], - ); + } catch (error) { + console.error("Error deleting blog post:", error); + aethexToast.error({ + title: "Error deleting blog post", + description: String(error), + }); + } finally { + setDeleting(null); + } + }, []); const filteredPosts = blogPosts.filter((post) => { const matchesSearch = post.title.toLowerCase().includes(searchQuery.toLowerCase()) || post.slug.toLowerCase().includes(searchQuery.toLowerCase()) || - (post.author && post.author.toLowerCase().includes(searchQuery.toLowerCase())); + (post.author && + post.author.toLowerCase().includes(searchQuery.toLowerCase())); const matchesCategory = !filterCategory || post.category === filterCategory; return matchesSearch && matchesCategory; }); - const categories = Array.from(new Set(blogPosts.map((p) => p.category).filter(Boolean))); + const categories = Array.from( + new Set(blogPosts.map((p) => p.category).filter(Boolean)), + ); const formatDate = (dateStr?: string | null) => { if (!dateStr) return "—"; @@ -149,7 +149,8 @@ export default function AdminBlogManager() {
Blog Management - {blogPosts.length} published {blogPosts.length === 1 ? "post" : "posts"} + {blogPosts.length} published{" "} + {blogPosts.length === 1 ? "post" : "posts"}
@@ -201,7 +206,9 @@ export default function AdminBlogManager() { {filteredPosts.length === 0 ? (

- {blogPosts.length === 0 ? "No blog posts found" : "No matching blog posts"} + {blogPosts.length === 0 + ? "No blog posts found" + : "No matching blog posts"}

{blogPosts.length === 0 && ( + + + + + + + + + + + + + + + + + + + + + + + + + + Operations + Directory + Chat + Admin + Docs + + Achievements + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setSelectedMemberId(id)} + onRefresh={loadProfiles} + ownerEmail="admin@aethex.tech" + /> + + + + + + + + + +
+ + +
+
+ Labs +
+ + +
+

Research

+

12 projects

+
+
+

Team

+

24 members

+
+
+ + + + +
+
+ GameForge +
+ + +
+

Games

+

45 shipped

+
+
+

Players

+

2.8M MAU

+
+
+ + + + +
+
+ Corp +
+ + +
+

Clients

+

34 active

+
+
+

ARR

+

$4.2M

+
+
+ + + + +
+
+ Foundation +
+ + +
+

Learners

+

342 active

+
+
+

Completion

+

87.5%

+
+
+ + + + +
+
+ Nexus +
+ + +
+

Creators

+

1,240 active

+
+
+

Success Rate

+

68%

+
+
+ +
+ + + + + + + + + + +
+ + Home Banner +
+ + Controls the notice shown at the top of the home page +
-
- {totalMembers || "—"} -
-

- Active profiles synced -

+
- - - Published Posts - + +
+ + Featured Studios +
+ + Control studios highlighted across AeThex +
-
- {publishedPosts || "0"} -
-

- Blog entries available -

-
-
- - - - - Featured Studios - - - -
- {featuredStudios} -
-

- Highlighted partners -

-
-
- - - - - Pending Applications - - - -
- {pendingProjectApplications} -
-

- Awaiting review -

-
-
-
- - - -
- - Quick Actions -
-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - Operations - Directory - Chat - Admin - Docs - Achievements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - setSelectedMemberId(id)} - onRefresh={loadProfiles} - ownerEmail="admin@aethex.tech" - /> - - - - - - - - - -
- - -
-
- Labs -
- - -
-

Research

-

12 projects

-
-
-

Team

-

24 members

+
+ {studios.map((s, i) => ( +
+

{s.name}

+

+ {s.tagline} +

+
+ ))}
- - - -
-
- GameForge -
- - -
-

Games

-

45 shipped

-
-
-

Players

-

2.8M MAU

-
-
- - - - -
-
- Corp -
- - -
-

Clients

-

34 active

-
-
-

ARR

-

$4.2M

-
-
- - - - -
-
- Foundation -
- - -
-

Learners

-

342 active

-
-
-

Completion

-

87.5%

-
-
- - - - -
-
- Nexus -
- - -
-

Creators

-

1,240 active

-
-
-

Success Rate

-

68%

-
-
- -
- - - - - - - - - - -
- - Home Banner -
- - Controls the notice shown at the top of the home page - -
- - - -
- - - -
- - Featured Studios -
- - Control studios highlighted across AeThex - -
- -
- {studios.map((s, i) => ( -
-

{s.name}

-

- {s.tagline} -

-
- ))} -
-
-
-
+
diff --git a/client/pages/Staff.tsx b/client/pages/Staff.tsx index d64460ea..781d5666 100644 --- a/client/pages/Staff.tsx +++ b/client/pages/Staff.tsx @@ -140,14 +140,14 @@ export default function Staff() {
- + {/* Grid background */}
@@ -181,7 +181,10 @@ export default function Staff() { The Staff Command Center

- Unified workspace for internal communications, team collaboration, and operational excellence. Manage projects, track performance, and connect with your team—all in one secure platform. + Unified workspace for internal communications, team + collaboration, and operational excellence. Manage projects, + track performance, and connect with your team—all in one secure + platform.

@@ -233,7 +236,8 @@ export default function Staff() { Quick Access Resources

- Everything you need to manage operations, collaborate with your team, and stay informed + Everything you need to manage operations, collaborate with + your team, and stay informed

@@ -282,7 +286,9 @@ export default function Staff() {
-

Communication & Collaboration

+

+ Communication & Collaboration +

    {[ @@ -341,7 +347,10 @@ export default function Staff() { Enterprise Security & Privacy

    - All staff information is protected with enterprise-grade security. Access is restricted to authenticated team members only. Your data is encrypted, audited, and compliant with privacy regulations. + All staff information is protected with enterprise-grade + security. Access is restricted to authenticated team members + only. Your data is encrypted, audited, and compliant with + privacy regulations.

diff --git a/server/index.ts b/server/index.ts index 84ede9ce..e79d9c95 100644 --- a/server/index.ts +++ b/server/index.ts @@ -2355,14 +2355,23 @@ export function createServer() { const { data, error } = await query; if (error) { // If table doesn't exist, return empty array (client will use seed data) - if (error.message?.includes("does not exist") || error.code === "42P01") { - console.log("[Blog] blog_posts table not found, returning empty array"); + if ( + error.message?.includes("does not exist") || + error.code === "42P01" + ) { + console.log( + "[Blog] blog_posts table not found, returning empty array", + ); return res.json([]); } console.error("[Blog] Error fetching blog posts:", error); return res.status(500).json({ error: error.message }); } - console.log("[Blog] Successfully fetched", (data || []).length, "blog posts"); + console.log( + "[Blog] Successfully fetched", + (data || []).length, + "blog posts", + ); res.json(data || []); } catch (e: any) { console.error("[Blog] Exception:", e); @@ -2386,7 +2395,10 @@ export function createServer() { // No rows returned - 404 return res.status(404).json({ error: "Blog post not found" }); } - if (error.message?.includes("does not exist") || error.code === "42P01") { + if ( + error.message?.includes("does not exist") || + error.code === "42P01" + ) { // Table doesn't exist return res.status(404).json({ error: "Blog not configured" }); } @@ -4851,7 +4863,10 @@ export function createServer() { // Staff Members API app.get("/api/staff/members", async (_req, res) => { try { - console.log("[Staff] GET /api/staff/members - adminSupabase initialized:", !!adminSupabase); + console.log( + "[Staff] GET /api/staff/members - adminSupabase initialized:", + !!adminSupabase, + ); if (!adminSupabase) { console.error("[Staff] adminSupabase is not initialized"); @@ -4875,7 +4890,11 @@ export function createServer() { return res.status(500).json({ error: error.message }); } - console.log("[Staff] Successfully fetched", (data || []).length, "staff members"); + console.log( + "[Staff] Successfully fetched", + (data || []).length, + "staff members", + ); return res.json(data || []); } catch (e: any) { console.error("[Staff] Unexpected error:", e);