-
+
+
+
-
- Archive application
-
+
);
}
@@ -72,7 +82,7 @@ function EditableTitle({ initialValue = "" }: { initialValue?: string }) {
ref.current?.focus();
ref.current?.setSelectionRange(0, text.length);
}
- }, [editing]);
+ }, [editing, text.length]);
return (
@@ -95,7 +105,7 @@ function EditableTitle({ initialValue = "" }: { initialValue?: string }) {
}}
value={text}
/>
-
+
);
}
diff --git a/web/app/(console)/console/new/page.tsx b/web/app/(console)/console/applications/new/page.tsx
similarity index 52%
rename from web/app/(console)/console/new/page.tsx
rename to web/app/(console)/console/applications/new/page.tsx
index 765f968..23e721a 100644
--- a/web/app/(console)/console/new/page.tsx
+++ b/web/app/(console)/console/applications/new/page.tsx
@@ -1,10 +1,10 @@
'use client'
import React, { useEffect } from "react";
-import { Button, TextFormField } from "@editor-ui/console";
+import { TextFormField } from "@editor-ui/console";
import client from "@cors.sh/service-api";
import { useRouter } from "next/navigation";
-import { FormPageLayout } from "@app/ui/layouts";
+import { Form, FormFooter, FormHeader, FormRow, Button } from "@/console";
export default function NewApplicationPage() {
const router = useRouter();
@@ -47,9 +47,9 @@ export default function NewApplicationPage() {
}, [name, allowedOrigins]);
return (
-
- Create new application
-
-
+
+ */}
+
);
}
+
+function CreateApplicationForm() {
+ return (
+
+ )
+}
diff --git a/web/app/(console)/console/applications/page.tsx b/web/app/(console)/console/applications/page.tsx
new file mode 100644
index 0000000..89b4451
--- /dev/null
+++ b/web/app/(console)/console/applications/page.tsx
@@ -0,0 +1,66 @@
+import React from "react";
+import Link from "next/link";
+import type { Metadata } from 'next'
+import { ApplicationItem } from "@/components/console/application-item";
+import { Client } from "@cors.sh/service-api";
+import { Button, Form, FormHeader, FormRow } from "@/console";
+
+export const metadata: Metadata = {
+ title: "Dashboard",
+}
+
+export default async function AppsPage() {
+ // const client = new Client({});
+ // const applications = await client.listApplications()
+ const applications: any[] = []
+
+ return (
+
+
+
+ Applications
+
+
+
+
+
+
+ {
+ applications.length === 0
+ ?
+ : (
+
+ {applications.map((application) => (
+
+
+
+ ))}
+
+ )
+ }
+
+
+
+ );
+}
+
+function Empty() {
+ return (
+
+ )
+}
\ No newline at end of file
diff --git a/web/app/(console)/console/general/page.tsx b/web/app/(console)/console/general/page.tsx
new file mode 100644
index 0000000..6823199
--- /dev/null
+++ b/web/app/(console)/console/general/page.tsx
@@ -0,0 +1,5 @@
+export default function TeamPage() {
+ return
+
+
+}
\ No newline at end of file
diff --git a/web/app/(console)/console/invoices/page.tsx b/web/app/(console)/console/invoices/page.tsx
new file mode 100644
index 0000000..f2ac796
--- /dev/null
+++ b/web/app/(console)/console/invoices/page.tsx
@@ -0,0 +1,5 @@
+export default function InvoicesPage() {
+ return
+
+
+}
\ No newline at end of file
diff --git a/web/app/(console)/console/page.tsx b/web/app/(console)/console/page.tsx
index dd97bae..89ffd73 100644
--- a/web/app/(console)/console/page.tsx
+++ b/web/app/(console)/console/page.tsx
@@ -1,57 +1,114 @@
import React from "react";
import Link from "next/link";
import type { Metadata } from 'next'
-import { ApplicationItem, ApplicationList } from "@/components/console/application-list";
-import { FormPageLayout } from "@app/ui/layouts";
-import { UnderlineButton } from "@app/ui/components";
-
+import { ApplicationItem } from "@/components/console/application-item";
+import BarChart from "@/components/charts/bar-chart";
+import { Prism } from "@/components/prism";
+import { examples } from "@/k";
+import { ChartCard } from "@/components/charts/cart-card";
+import { Button, Card, Form, FormFooter, FormHeader, FormRow } from "@/console";
export const metadata: Metadata = {
title: "Dashboard",
}
-export default function ConsoleIndex() {
- const applications = [
- {
- id: "1",
- name: "My app",
- },
- {
- id: "2",
- name: "My app 2",
- },
- ]
+const applications = [
+ {
+ id: "1",
+ name: "My app",
+ },
+ {
+ id: "2",
+ name: "My app 2",
+ },
+]
+
+export default function ConsoleHome() {
return (
- <>
-
- {/* */}
-
-
- {applications.map((application) => (
-
- ))}
-
-
+
+
+
-
- {/*
*/}
- Create new application
- {/* */}
-
-
- {/*
*/}
- Manage subscription
- {/* */}
-
+ {applications.map((application) => (
+
+
+
+ ))}
-
- >
+
+
+
+
+
+ {quick_starts.map((d, i) => {
+ return
+ })}
+
+
+
+
+
+
);
}
+
+const quick_starts = [
+ {
+ title: "Ticktok",
+ description: "Learn how to integrate Ticktok API with your application",
+ },
+ {
+ title: "Shopify",
+ description: "Learn how to integrate Ticktok API with your application",
+ },
+ {
+ title: "Your Server",
+ description: "Learn how to integrate CORS Proxy to your own server",
+ },
+] as const
+
+function QuickStartCard({
+ icon,
+ title,
+ description,
+}: {
+ icon?: React.ReactNode;
+ title: string;
+ description: string;
+}) {
+ return (
+
+ )
+}
diff --git a/web/app/(console)/console/settings/page.tsx b/web/app/(console)/console/settings/page.tsx
new file mode 100644
index 0000000..bed313d
--- /dev/null
+++ b/web/app/(console)/console/settings/page.tsx
@@ -0,0 +1,31 @@
+import { Button } from "@/console";
+import Link from "next/link";
+
+export default function SettingsPage() {
+ return (
+
+
+
+
+ Members
+
+
+ Invite members to your organization.
+
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/web/app/(console)/console/team/page.tsx b/web/app/(console)/console/team/page.tsx
new file mode 100644
index 0000000..a489d15
--- /dev/null
+++ b/web/app/(console)/console/team/page.tsx
@@ -0,0 +1,5 @@
+export default function GeneralSettingsPage() {
+ return
+
+
+}
\ No newline at end of file
diff --git a/web/app/(console)/console/usage/page.tsx b/web/app/(console)/console/usage/page.tsx
new file mode 100644
index 0000000..ec303b6
--- /dev/null
+++ b/web/app/(console)/console/usage/page.tsx
@@ -0,0 +1,18 @@
+import BarChart from "@/components/charts/bar-chart"
+import { ChartCard } from "@/components/charts/cart-card"
+import React from "react"
+
+export default function UsagePage() {
+ return (
+
+
+
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/web/app/(console)/layout.tsx b/web/app/(console)/layout.tsx
index 7985358..6445657 100644
--- a/web/app/(console)/layout.tsx
+++ b/web/app/(console)/layout.tsx
@@ -1,11 +1,14 @@
+import Image from 'next/image'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import { Toaster } from "react-hot-toast";
-import '../globals.css'
import GoogleAnalytics from '@/components/ga';
import ChatwootWidget from "@/components/chatwoot";
import { Heading, Link, Theme } from '@radix-ui/themes';
-import { GearIcon, GitHubLogoIcon, MagnifyingGlassIcon, OpenInNewWindowIcon } from '@radix-ui/react-icons';
+import { FileTextIcon, GearIcon, GitHubLogoIcon, HomeIcon, LayersIcon, LightningBoltIcon, MagnifyingGlassIcon, OpenInNewWindowIcon, QuestionMarkCircledIcon, RocketIcon } from '@radix-ui/react-icons';
+import '../globals.console.css'
+
+
const inter = Inter({ subsets: ['latin'] })
export const metadata: Metadata = {
@@ -35,19 +38,26 @@ export default function RootLayout({
{process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS} />
) : null}
-
-
-
-
-
-
-
-
- {children}
-
+
+
+
+
+