Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new navigation #1659

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions apps/console/src/app/[entity]/catalog/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import { useRouter } from "next/navigation";

import {
AppTopbar,
CatalogMainView,
NamespaceSwitch,
PageBase,
SidebarNav,
TopNavbar,
} from "@instill-ai/toolkit";

import { useAppAccessToken } from "~/lib/use-app-access-token";
Expand All @@ -21,8 +22,11 @@ export const KnowladgeBasePageRender = () => {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Sidebar>
<SidebarNav namespaceSwitch={<NamespaceSwitch />} />
</PageBase.Sidebar>
<PageBase.Content contentPadding="!p-0">
<CatalogMainView
accessToken={accessToken.isSuccess ? accessToken.data : null}
Expand Down
9 changes: 2 additions & 7 deletions apps/console/src/app/[entity]/chat/render.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
"use client";

import {
AppTopbar,
ChatView,
NamespaceSwitch,
PageBase,
} from "@instill-ai/toolkit";
import { ChatView, PageBase, TopNavbar } from "@instill-ai/toolkit";

import { useAppAccessToken } from "~/lib/use-app-access-token";
import { useAppTrackToken } from "~/lib/useAppTrackToken";
Expand All @@ -16,7 +11,7 @@ export function ChatPageRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Content contentPadding="p-8">
<ChatView />
Expand Down
8 changes: 6 additions & 2 deletions apps/console/src/app/[entity]/dashboard/activity/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import * as React from "react";

import {
AppTopbar,
DashboardActivityPageMainView,
NamespaceSwitch,
PageBase,
SidebarNav,
TopNavbar,
} from "@instill-ai/toolkit";

import { useAppAccessToken } from "~/lib/use-app-access-token";
Expand All @@ -18,8 +19,11 @@ export default function ActivityRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Sidebar>
<SidebarNav namespaceSwitch={<NamespaceSwitch />} />
</PageBase.Sidebar>
<PageBase.Content contentPadding="p-8">
<DashboardActivityPageMainView />
</PageBase.Content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import * as React from "react";

import {
AppTopbar,
DashboardCostModelPageMainView,
NamespaceSwitch,
PageBase,
SidebarNav,
TopNavbar,
} from "@instill-ai/toolkit";

import { useAppAccessToken } from "~/lib/use-app-access-token";
Expand All @@ -18,8 +19,11 @@ export default function CostModelRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Sidebar>
<SidebarNav namespaceSwitch={<NamespaceSwitch />} />
</PageBase.Sidebar>
<PageBase.Content contentPadding="p-8">
<DashboardCostModelPageMainView />
</PageBase.Content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import * as React from "react";

import {
AppTopbar,
DashboardCostPipelinePageMainView,
NamespaceSwitch,
PageBase,
SidebarNav,
TopNavbar,
} from "@instill-ai/toolkit";

import { useAppAccessToken } from "~/lib/use-app-access-token";
Expand All @@ -18,8 +19,11 @@ export default function CostPipelineRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Sidebar>
<SidebarNav namespaceSwitch={<NamespaceSwitch />} />
</PageBase.Sidebar>
<PageBase.Content contentPadding="p-8">
<DashboardCostPipelinePageMainView />
</PageBase.Content>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
"use client";

import {
AppTopbar,
DashboardPipelineDetailsPageMainView,
NamespaceSwitch,
PageBase,
SidebarNav,
TopNavbar,
} from "@instill-ai/toolkit";

import { useAppAccessToken } from "~/lib/use-app-access-token";
Expand All @@ -16,8 +17,11 @@ export function PipelineDashboardPageRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Sidebar>
<SidebarNav namespaceSwitch={<NamespaceSwitch />} />
</PageBase.Sidebar>
<PageBase.Content contentPadding="p-8">
<DashboardPipelineDetailsPageMainView />
</PageBase.Content>
Expand Down
8 changes: 6 additions & 2 deletions apps/console/src/app/[entity]/dashboard/pipeline/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import { useRouter } from "next/navigation";

import {
AppTopbar,
DashboardContainer,
DashboardPipelineListPageMainView,
NamespaceSwitch,
PageBase,
SidebarNav,
TopNavbar,
} from "@instill-ai/toolkit";

import { useAppAccessToken } from "~/lib/use-app-access-token";
Expand All @@ -21,8 +22,11 @@ export function DashboardPageRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Sidebar>
<SidebarNav namespaceSwitch={<NamespaceSwitch />} />
</PageBase.Sidebar>
<PageBase.Content contentPadding="p-8">
<DashboardContainer>
<DashboardPipelineListPageMainView
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
"use client";

import {
AppTopbar,
ModelHubSettingPageMainView,
NamespaceSwitch,
PageBase,
SidebarNav,
TopNavbar,
} from "@instill-ai/toolkit";

import { useAppAccessToken } from "~/lib/use-app-access-token";
Expand All @@ -16,8 +17,11 @@ export function ModelViewPageRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Sidebar>
<SidebarNav namespaceSwitch={<NamespaceSwitch />} />
</PageBase.Sidebar>
<PageBase.Content contentPadding="p-8">
<ModelHubSettingPageMainView />
</PageBase.Content>
Expand Down
8 changes: 6 additions & 2 deletions apps/console/src/app/[entity]/models/create/render.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
"use client";

import {
AppTopbar,
ModelHubCreatePageMainView,
NamespaceSwitch,
PageBase,
SidebarNav,
TopNavbar,
} from "@instill-ai/toolkit";

import { useAppAccessToken } from "~/lib/use-app-access-token";
Expand All @@ -16,8 +17,11 @@ export function CreateModelPageRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Sidebar>
<SidebarNav namespaceSwitch={<NamespaceSwitch />} />
</PageBase.Sidebar>
<PageBase.Content contentPadding="p-8">
<ModelHubCreatePageMainView />
</PageBase.Content>
Expand Down
8 changes: 6 additions & 2 deletions apps/console/src/app/[entity]/models/render.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
"use client";

import {
AppTopbar,
ModelHubListPageMainView,
NamespaceSwitch,
PageBase,
SidebarNav,
TopNavbar,
} from "@instill-ai/toolkit";

import { useAppAccessToken } from "~/lib/use-app-access-token";
Expand All @@ -16,8 +17,11 @@ export function ModelsPageRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Sidebar>
<SidebarNav namespaceSwitch={<NamespaceSwitch />} />
</PageBase.Sidebar>
<PageBase.Content contentPadding="p-8">
<ModelHubListPageMainView />
</PageBase.Content>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"use client";

import {
AppTopbar,
NamespaceSwitch,
PageBase,
SidebarNav,
TopNavbar,
ViewPipeline,
} from "@instill-ai/toolkit";

Expand All @@ -19,8 +20,11 @@ export function PipelineOverviewPageRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Sidebar>
<SidebarNav namespaceSwitch={<NamespaceSwitch />} />
</PageBase.Sidebar>
<PageBase.Content contentPadding="p-8">
<ViewPipeline />
</PageBase.Content>
Expand Down
8 changes: 6 additions & 2 deletions apps/console/src/app/[entity]/pipelines/render.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"use client";

import {
AppTopbar,
NamespaceSwitch,
PageBase,
SidebarNav,
TopNavbar,
ViewPipelines,
} from "@instill-ai/toolkit";

Expand All @@ -16,8 +17,11 @@ export const PipelinesViewPageRender = () => {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Sidebar>
<SidebarNav namespaceSwitch={<NamespaceSwitch />} />
</PageBase.Sidebar>
<PageBase.Content contentPadding="p-8">
<ViewPipelines />
</PageBase.Content>
Expand Down
5 changes: 2 additions & 3 deletions apps/console/src/app/settings/account/render.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"use client";

import {
AppTopbar,
NamespaceSwitch,
PageBase,
Setting,
SETTING_PAGE_CONTENT_PADDING,
TopNavbar,
UserAccountTab,
UserSidebar,
} from "@instill-ai/toolkit";
Expand All @@ -17,7 +16,7 @@ export function AccountSettingPageRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Content contentPadding={SETTING_PAGE_CONTENT_PADDING}>
<Setting.Root
Expand Down
5 changes: 2 additions & 3 deletions apps/console/src/app/settings/api-tokens/render.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"use client";

import {
AppTopbar,
NamespaceSwitch,
PageBase,
Setting,
SETTING_PAGE_CONTENT_PADDING,
TopNavbar,
UserAPITokenTab,
UserSidebar,
} from "@instill-ai/toolkit";
Expand All @@ -17,7 +16,7 @@ export function ApiTokenSettingsPageRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Content contentPadding={SETTING_PAGE_CONTENT_PADDING}>
<Setting.Root
Expand Down
5 changes: 2 additions & 3 deletions apps/console/src/app/settings/integrations/render.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"use client";

import {
AppTopbar,
NamespaceSwitch,
PageBase,
Setting,
SETTING_PAGE_CONTENT_PADDING,
TopNavbar,
UserIntegrationsTab,
UserSidebar,
} from "@instill-ai/toolkit";
Expand All @@ -17,7 +16,7 @@ export function IntegrationsSettingsPageRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Content contentPadding={SETTING_PAGE_CONTENT_PADDING}>
<Setting.Root
Expand Down
5 changes: 2 additions & 3 deletions apps/console/src/app/settings/profile/rendex.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"use client";

import {
AppTopbar,
NamespaceSwitch,
PageBase,
Setting,
SETTING_PAGE_CONTENT_PADDING,
TopNavbar,
UserProfileTab,
UserSidebar,
} from "@instill-ai/toolkit";
Expand All @@ -17,7 +16,7 @@ export function ProfileSettingPageRender() {

return (
<PageBase>
<AppTopbar namespaceSwitch={<NamespaceSwitch />} />
<TopNavbar />
<PageBase.Container>
<PageBase.Content contentPadding={SETTING_PAGE_CONTENT_PADDING}>
<Setting.Root
Expand Down
Loading
Loading