diff --git a/apps/client/src/App.tsx b/apps/client/src/App.tsx index 789b4860..accc5cd7 100644 --- a/apps/client/src/App.tsx +++ b/apps/client/src/App.tsx @@ -17,39 +17,17 @@ import Layout from "@/components/layouts/global/layout.tsx"; import InviteSignup from "@/pages/auth/invite-signup.tsx"; import ForgotPassword from "@/pages/auth/forgot-password.tsx"; import PasswordReset from "./pages/auth/password-reset"; -import Billing from "@/ee/billing/pages/billing.tsx"; -import CloudLogin from "@/ee/pages/cloud-login.tsx"; -import CreateWorkspace from "@/ee/pages/create-workspace.tsx"; -import { isCloud } from "@/lib/config.ts"; -import { useTranslation } from "react-i18next"; -import Security from "@/ee/security/pages/security.tsx"; -import License from "@/ee/licence/pages/license.tsx"; -import { useRedirectToCloudSelect } from "@/ee/hooks/use-redirect-to-cloud-select.tsx"; import SharedPage from "@/pages/share/shared-page.tsx"; -import PdfRenderPage from "@/ee/pdf-export/pdf-render-page.tsx"; import Shares from "@/pages/settings/shares/shares.tsx"; import ShareLayout from "@/features/share/components/share-layout.tsx"; import ShareRedirect from "@/pages/share/share-redirect.tsx"; import { useTrackOrigin } from "@/hooks/use-track-origin"; import SpacesPage from "@/pages/spaces/spaces.tsx"; -import { MfaChallengePage } from "@/ee/mfa/pages/mfa-challenge-page"; -import { MfaSetupRequiredPage } from "@/ee/mfa/pages/mfa-setup-required-page"; import SpaceTrash from "@/pages/space/space-trash.tsx"; -import UserApiKeys from "@/ee/api-key/pages/user-api-keys"; -import WorkspaceApiKeys from "@/ee/api-key/pages/workspace-api-keys"; -import AiSettings from "@/ee/ai/pages/ai-settings.tsx"; -import AuditLogs from "@/ee/audit/pages/audit-logs.tsx"; -import VerifiedPages from "@/ee/page-verification/pages/verified-pages.tsx"; -import TemplateList from "@/ee/template/pages/template-list"; -import TemplateEditor from "@/ee/template/pages/template-editor"; import FavoritesPage from "@/pages/favorites/favorites-page"; -import AiChat from "@/ee/ai-chat/pages/ai-chat.tsx"; -import VerifyEmail from "@/ee/pages/verify-email.tsx"; import LabelPage from "@/pages/label/label-page"; export default function App() { - const { t } = useTranslation(); - useRedirectToCloudSelect(); useTrackOrigin(); return ( @@ -60,20 +38,8 @@ export default function App() { } /> } /> } /> - } /> - } /> - {!isCloud() && ( - } /> - )} - - {isCloud() && ( - <> - } /> - } /> - } /> - - )} + } /> }> } /> - } /> } /> } /> }> } /> - } /> - } /> } /> } /> } /> - } /> - } - /> } /> } /> } /> - } /> } /> } /> - } /> } /> } /> } /> } /> - } /> - } /> - } /> - } /> - } /> - {!isCloud() && } />} - {isCloud() && } />} diff --git a/apps/client/src/components/layouts/global/app-header.tsx b/apps/client/src/components/layouts/global/app-header.tsx index 97a464fd..196c8837 100644 --- a/apps/client/src/components/layouts/global/app-header.tsx +++ b/apps/client/src/components/layouts/global/app-header.tsx @@ -1,18 +1,12 @@ import { - ActionIcon, - Badge, Box, Group, Text, Tooltip, - UnstyledButton, } from "@mantine/core"; import classes from "./app-header.module.css"; -import React from "react"; import TopMenu from "@/components/layouts/global/top-menu.tsx"; -import { Link, useLocation } from "react-router-dom"; -import { IconSparkles } from "@tabler/icons-react"; -import useToggleAside from "@/hooks/use-toggle-aside.tsx"; +import { Link } from "react-router-dom"; import APP_ROUTE from "@/lib/app-route.ts"; import { useAtom } from "jotai"; import { @@ -22,18 +16,14 @@ import { import { useToggleSidebar } from "@/components/layouts/global/hooks/hooks/use-toggle-sidebar.ts"; import SidebarToggle from "@/components/ui/sidebar-toggle-button.tsx"; import { useTranslation } from "react-i18next"; -import useTrial from "@/ee/hooks/use-trial.tsx"; -import { isCloud } from "@/lib/config.ts"; import { SearchControl, SearchMobileControl, } from "@/features/search/components/search-control.tsx"; import { searchSpotlight, - shareSearchSpotlight, } from "@/features/search/constants.ts"; import { NotificationPopover } from "@/features/notification/components/notification-popover.tsx"; -import { workspaceAtom } from "@/features/user/atoms/current-user-atom.ts"; const links = [ { link: APP_ROUTE.HOME, label: "Home" }, @@ -46,13 +36,6 @@ export function AppHeader() { const [desktopOpened] = useAtom(desktopSidebarAtom); const toggleDesktop = useToggleSidebar(desktopSidebarAtom); - const { isTrial, trialDaysLeft } = useTrial(); - const location = useLocation(); - const toggleAside = useToggleAside(); - const [workspace] = useAtom(workspaceAtom); - const aiChatEnabled = workspace?.settings?.ai?.chat === true; - - const isPageRoute = location.pathname.includes("/p/"); const items = links.map((link) => ( @@ -118,63 +101,7 @@ export function AppHeader() { - {aiChatEnabled && ( - <> - { - if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) { - return; - } - if (isPageRoute) { - e.preventDefault(); - toggleAside("chat"); - } - }} - > - {t("AI Chat")} - - - { - if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) { - return; - } - if (isPageRoute) { - e.preventDefault(); - toggleAside("chat"); - } - }} - > - - - - - )} - {isCloud() && isTrial && trialDaysLeft !== 0 && ( - - {trialDaysLeft === 1 - ? "1 day left" - : `${trialDaysLeft} days left`} - - )} diff --git a/apps/client/src/components/layouts/global/aside.tsx b/apps/client/src/components/layouts/global/aside.tsx index 556adbf1..6faf853a 100644 --- a/apps/client/src/components/layouts/global/aside.tsx +++ b/apps/client/src/components/layouts/global/aside.tsx @@ -8,7 +8,6 @@ import { useTranslation } from "react-i18next"; import { TableOfContents } from "@/features/editor/components/table-of-contents/table-of-contents.tsx"; import { useAtomValue } from "jotai"; import { pageEditorAtom } from "@/features/editor/atoms/editor-atoms.ts"; -import AsideChatPanel from "@/ee/ai-chat/components/aside-chat-panel"; import { PageDetailsAside } from "@/features/page-details/components/page-details-aside.tsx"; import { ASIDE_PANEL_ID } from "@/hooks/use-toggle-aside.tsx"; @@ -35,10 +34,6 @@ export default function Aside() { component = ; title = "Table of contents"; break; - case "chat": - component = ; - title = "AI Chat"; - break; case "details": component = ; title = "Details"; @@ -52,23 +47,21 @@ export default function Aside() { {component && ( <> - {tab !== "chat" && ( - - {t(title)} - - - - - - - )} + + {t(title)} + + + + + + - {tab === "comments" || tab === "chat" ? ( + {tab === "comments" ? ( component ) : ( @@ -116,9 +112,7 @@ export default function GlobalAppShell({ ? t("Space navigation") : isSettingsRoute ? t("Settings navigation") - : isAiRoute - ? t("AI navigation") - : t("Main navigation") + : t("Main navigation") } > {isSpaceRoute && ( @@ -126,7 +120,6 @@ export default function GlobalAppShell({ )} {isSpaceRoute && } {isSettingsRoute && } - {isAiRoute && } {showGlobalSidebar && } @@ -151,11 +144,9 @@ export default function GlobalAppShell({ ? t("Comments") : asideTab === "toc" ? t("Table of contents") - : asideTab === "chat" - ? t("AI Chat") - : asideTab === "details" - ? t("Details") - : undefined + : asideTab === "details" + ? t("Details") + : undefined } >