mirror of
https://github.com/docmost/docmost.git
synced 2026-08-15 07:21:37 +10:00
fix: browser tab showing url instead of page title (#2382)
This commit is contained in:
@@ -0,0 +1,45 @@
|
|||||||
|
import { describe, expect, it, beforeEach } from "vitest";
|
||||||
|
import { render } from "@testing-library/react";
|
||||||
|
import { HelmetProvider } from "react-helmet-async";
|
||||||
|
import { DocumentTitle } from "./document-title.tsx";
|
||||||
|
|
||||||
|
const renderTitle = (ui: React.ReactNode) =>
|
||||||
|
render(<HelmetProvider>{ui}</HelmetProvider>);
|
||||||
|
|
||||||
|
describe("DocumentTitle", () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
document.head.innerHTML = "<title>Docmost</title>";
|
||||||
|
});
|
||||||
|
|
||||||
|
it("appends the app name", () => {
|
||||||
|
renderTitle(<DocumentTitle title="Home" />);
|
||||||
|
expect(document.title).toBe("Home - Docmost");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("omits the app name when asked", () => {
|
||||||
|
renderTitle(<DocumentTitle title="My page" withAppName={false} />);
|
||||||
|
expect(document.title).toBe("My page");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("falls back to the app name without a title", () => {
|
||||||
|
renderTitle(<DocumentTitle />);
|
||||||
|
expect(document.title).toBe("Docmost");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("never renders an empty title", () => {
|
||||||
|
renderTitle(<DocumentTitle title="Spaces" />);
|
||||||
|
const titles = Array.from(document.querySelectorAll("head > title"));
|
||||||
|
expect(titles.every((node) => node.textContent !== "")).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("renders extra head children", () => {
|
||||||
|
renderTitle(
|
||||||
|
<DocumentTitle title="Shared">
|
||||||
|
<meta name="robots" content="noindex" />
|
||||||
|
</DocumentTitle>,
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
document.querySelector('head > meta[name="robots"]')?.getAttribute("content"),
|
||||||
|
).toBe("noindex");
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { Helmet } from "react-helmet-async";
|
||||||
|
import { getAppName } from "@/lib/config.ts";
|
||||||
|
|
||||||
|
type DocumentTitleProps = {
|
||||||
|
title?: string;
|
||||||
|
withAppName?: boolean;
|
||||||
|
children?: React.ReactNode;
|
||||||
|
};
|
||||||
|
|
||||||
|
export function DocumentTitle({
|
||||||
|
title,
|
||||||
|
withAppName = true,
|
||||||
|
children,
|
||||||
|
}: DocumentTitleProps) {
|
||||||
|
const appName = getAppName();
|
||||||
|
|
||||||
|
let documentTitle = appName;
|
||||||
|
if (title) {
|
||||||
|
documentTitle = withAppName ? `${title} - ${appName}` : title;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Helmet>
|
||||||
|
<title>{documentTitle}</title>
|
||||||
|
{children}
|
||||||
|
</Helmet>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,17 +1,15 @@
|
|||||||
import { Title, Text, Button, Container, Group } from "@mantine/core";
|
import { Title, Text, Button, Container, Group } from "@mantine/core";
|
||||||
import classes from "./error-404.module.css";
|
import classes from "./error-404.module.css";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export function Error404() {
|
export function Error404() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("404 page not found")} />
|
||||||
<title>{t("404 page not found")} - Docmost</title>
|
|
||||||
</Helmet>
|
|
||||||
<Container className={classes.root}>
|
<Container className={classes.root}>
|
||||||
<Title className={classes.title}>{t("404 page not found")}</Title>
|
<Title className={classes.title}>{t("404 page not found")}</Title>
|
||||||
<Text c="dimmed" size="lg" ta="center" className={classes.description}>
|
<Text c="dimmed" size="lg" ta="center" className={classes.description}>
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import useUserRole from "@/hooks/use-user-role.tsx";
|
import useUserRole from "@/hooks/use-user-role.tsx";
|
||||||
@@ -15,6 +13,7 @@ import { Feature } from "@/ee/features";
|
|||||||
import { useUpgradeLabel } from "@/ee/hooks/use-upgrade-label";
|
import { useUpgradeLabel } from "@/ee/hooks/use-upgrade-label";
|
||||||
import { isCloud } from "@/lib/config.ts";
|
import { isCloud } from "@/lib/config.ts";
|
||||||
import { useLocation, useNavigate } from "react-router-dom";
|
import { useLocation, useNavigate } from "react-router-dom";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function AiSettings() {
|
export default function AiSettings() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -40,9 +39,7 @@ export default function AiSettings() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title="AI settings" />
|
||||||
<title>AI settings - {getAppName()}</title>
|
|
||||||
</Helmet>
|
|
||||||
<SettingsTitle title={t("AI settings")} />
|
<SettingsTitle title={t("AI settings")} />
|
||||||
|
|
||||||
<Tabs color="dark" value={activeTab} onChange={handleTabChange}>
|
<Tabs color="dark" value={activeTab} onChange={handleTabChange}>
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Anchor, Alert, Button, Group, Space, Text } from "@mantine/core";
|
import { Anchor, Alert, Button, Group, Space, Text } from "@mantine/core";
|
||||||
import { IconInfoCircle } from "@tabler/icons-react";
|
import { IconInfoCircle } from "@tabler/icons-react";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { Trans, useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import SettingsTitle from "@/components/settings/settings-title";
|
import SettingsTitle from "@/components/settings/settings-title";
|
||||||
import { getAppName, getAppUrl } from "@/lib/config";
|
import { getAppUrl } from "@/lib/config";
|
||||||
import { ApiKeyTable } from "@/ee/api-key/components/api-key-table";
|
import { ApiKeyTable } from "@/ee/api-key/components/api-key-table";
|
||||||
import { CreateApiKeyModal } from "@/ee/api-key/components/create-api-key-modal";
|
import { CreateApiKeyModal } from "@/ee/api-key/components/create-api-key-modal";
|
||||||
import { ApiKeyCreatedModal } from "@/ee/api-key/components/api-key-created-modal";
|
import { ApiKeyCreatedModal } from "@/ee/api-key/components/api-key-created-modal";
|
||||||
@@ -17,6 +16,7 @@ import { IApiKey } from "@/ee/api-key";
|
|||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import { workspaceAtom } from "@/features/user/atoms/current-user-atom.ts";
|
import { workspaceAtom } from "@/features/user/atoms/current-user-atom.ts";
|
||||||
import useUserRole from "@/hooks/use-user-role.tsx";
|
import useUserRole from "@/hooks/use-user-role.tsx";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function UserApiKeys() {
|
export default function UserApiKeys() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -49,11 +49,7 @@ export default function UserApiKeys() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("API keys")} />
|
||||||
<title>
|
|
||||||
{t("API keys")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
|
|
||||||
<SettingsTitle title={t("API keys")} />
|
<SettingsTitle title={t("API keys")} />
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Anchor, Button, Divider, Group, Space, Text } from "@mantine/core";
|
import { Anchor, Button, Divider, Group, Space, Text } from "@mantine/core";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { Trans, useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import SettingsTitle from "@/components/settings/settings-title";
|
import SettingsTitle from "@/components/settings/settings-title";
|
||||||
import { getAppName } from "@/lib/config";
|
|
||||||
import { ApiKeyTable } from "@/ee/api-key/components/api-key-table";
|
import { ApiKeyTable } from "@/ee/api-key/components/api-key-table";
|
||||||
import { CreateApiKeyModal } from "@/ee/api-key/components/create-api-key-modal";
|
import { CreateApiKeyModal } from "@/ee/api-key/components/create-api-key-modal";
|
||||||
import { ApiKeyCreatedModal } from "@/ee/api-key/components/api-key-created-modal";
|
import { ApiKeyCreatedModal } from "@/ee/api-key/components/api-key-created-modal";
|
||||||
@@ -15,6 +13,7 @@ import { useGetApiKeysQuery } from "@/ee/api-key/queries/api-key-query.ts";
|
|||||||
import { IApiKey } from "@/ee/api-key";
|
import { IApiKey } from "@/ee/api-key";
|
||||||
import useUserRole from '@/hooks/use-user-role.tsx';
|
import useUserRole from '@/hooks/use-user-role.tsx';
|
||||||
import RestrictApiToAdmins from "@/ee/api-key/components/restrict-api-to-admins";
|
import RestrictApiToAdmins from "@/ee/api-key/components/restrict-api-to-admins";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function WorkspaceApiKeys() {
|
export default function WorkspaceApiKeys() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -47,11 +46,7 @@ export default function WorkspaceApiKeys() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("API management")} />
|
||||||
<title>
|
|
||||||
{t("API management")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
|
|
||||||
<SettingsTitle title={t("API management")} />
|
<SettingsTitle title={t("API management")} />
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,9 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { IconSettings } from "@tabler/icons-react";
|
import { IconSettings } from "@tabler/icons-react";
|
||||||
import SettingsTitle from "@/components/settings/settings-title";
|
import SettingsTitle from "@/components/settings/settings-title";
|
||||||
import { getAppName } from "@/lib/config";
|
|
||||||
import Paginate from "@/components/common/paginate";
|
import Paginate from "@/components/common/paginate";
|
||||||
import { useCursorPaginate } from "@/hooks/use-cursor-paginate";
|
import { useCursorPaginate } from "@/hooks/use-cursor-paginate";
|
||||||
import {
|
import {
|
||||||
@@ -26,6 +24,7 @@ import { IAuditLogParams } from "@/ee/audit/types/audit.types";
|
|||||||
import { eventFilterOptions } from "@/ee/audit/lib/audit-event-labels";
|
import { eventFilterOptions } from "@/ee/audit/lib/audit-event-labels";
|
||||||
import AuditLogsTable from "@/ee/audit/components/audit-logs-table";
|
import AuditLogsTable from "@/ee/audit/components/audit-logs-table";
|
||||||
import useUserRole from "@/hooks/use-user-role";
|
import useUserRole from "@/hooks/use-user-role";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
type RetentionUnit = "days" | "months" | "years";
|
type RetentionUnit = "days" | "months" | "years";
|
||||||
|
|
||||||
@@ -97,11 +96,7 @@ export default function AuditLogs() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Audit log")} />
|
||||||
<title>
|
|
||||||
{t("Audit log")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
|
|
||||||
<SettingsTitle title={t("Audit log")} />
|
<SettingsTitle title={t("Audit log")} />
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
||||||
import BillingPlans from "@/ee/billing/components/billing-plans.tsx";
|
import BillingPlans from "@/ee/billing/components/billing-plans.tsx";
|
||||||
import BillingTrial from "@/ee/billing/components/billing-trial.tsx";
|
import BillingTrial from "@/ee/billing/components/billing-trial.tsx";
|
||||||
@@ -9,6 +7,7 @@ import React from "react";
|
|||||||
import BillingDetails from "@/ee/billing/components/billing-details.tsx";
|
import BillingDetails from "@/ee/billing/components/billing-details.tsx";
|
||||||
import { useBillingQuery } from "@/ee/billing/queries/billing-query.ts";
|
import { useBillingQuery } from "@/ee/billing/queries/billing-query.ts";
|
||||||
import useUserRole from "@/hooks/use-user-role.tsx";
|
import useUserRole from "@/hooks/use-user-role.tsx";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function Billing() {
|
export default function Billing() {
|
||||||
const { data: billing, isError: isBillingError } = useBillingQuery();
|
const { data: billing, isError: isBillingError } = useBillingQuery();
|
||||||
@@ -20,9 +19,7 @@ export default function Billing() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title="Billing" />
|
||||||
<title>Billing - {getAppName()}</title>
|
|
||||||
</Helmet>
|
|
||||||
<SettingsTitle title="Billing" />
|
<SettingsTitle title="Billing" />
|
||||||
|
|
||||||
<BillingTrial />
|
<BillingTrial />
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import useUserRole from "@/hooks/use-user-role.tsx";
|
import useUserRole from "@/hooks/use-user-role.tsx";
|
||||||
@@ -9,6 +7,7 @@ import InstallationDetails from "@/ee/licence/components/installation-details.ts
|
|||||||
import OssDetails from "@/ee/licence/components/oss-details.tsx";
|
import OssDetails from "@/ee/licence/components/oss-details.tsx";
|
||||||
import { useAtom } from "jotai/index";
|
import { useAtom } from "jotai/index";
|
||||||
import { entitlementAtom } from "@/ee/entitlement/entitlement-atom";
|
import { entitlementAtom } from "@/ee/entitlement/entitlement-atom";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function License() {
|
export default function License() {
|
||||||
const [entitlements] = useAtom(entitlementAtom);
|
const [entitlements] = useAtom(entitlementAtom);
|
||||||
@@ -21,9 +20,7 @@ export default function License() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title="License" />
|
||||||
<title>License - {getAppName()}</title>
|
|
||||||
</Helmet>
|
|
||||||
<SettingsTitle title="License" />
|
<SettingsTitle title="License" />
|
||||||
|
|
||||||
<ActivateLicenseForm />
|
<ActivateLicenseForm />
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
import { useState, useMemo } from "react";
|
import { useState, useMemo } from "react";
|
||||||
import { Group, MultiSelect, Select, Space, TextInput } from "@mantine/core";
|
import { Group, MultiSelect, Select, Space, TextInput } from "@mantine/core";
|
||||||
import { useDebouncedValue } from "@mantine/hooks";
|
import { useDebouncedValue } from "@mantine/hooks";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { IconSearch } from "@tabler/icons-react";
|
import { IconSearch } from "@tabler/icons-react";
|
||||||
import SettingsTitle from "@/components/settings/settings-title";
|
import SettingsTitle from "@/components/settings/settings-title";
|
||||||
import { getAppName } from "@/lib/config";
|
|
||||||
import Paginate from "@/components/common/paginate";
|
import Paginate from "@/components/common/paginate";
|
||||||
import { useCursorPaginate } from "@/hooks/use-cursor-paginate";
|
import { useCursorPaginate } from "@/hooks/use-cursor-paginate";
|
||||||
import { useVerificationListQuery } from "@/ee/page-verification/queries/page-verification-query";
|
import { useVerificationListQuery } from "@/ee/page-verification/queries/page-verification-query";
|
||||||
import { IVerificationListParams } from "@/ee/page-verification/types/page-verification.types";
|
import { IVerificationListParams } from "@/ee/page-verification/types/page-verification.types";
|
||||||
import VerificationListTable from "@/ee/page-verification/components/verification-list-table";
|
import VerificationListTable from "@/ee/page-verification/components/verification-list-table";
|
||||||
import { useGetSpacesQuery } from "@/features/space/queries/space-query";
|
import { useGetSpacesQuery } from "@/features/space/queries/space-query";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function VerifiedPages() {
|
export default function VerifiedPages() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -68,11 +67,7 @@ export default function VerifiedPages() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Verified pages")} />
|
||||||
<title>
|
|
||||||
{t("Verified pages")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
|
|
||||||
<SettingsTitle title={t("Verified pages")} />
|
<SettingsTitle title={t("Verified pages")} />
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import { CloudLoginForm } from "@/ee/components/cloud-login-form.tsx";
|
import { CloudLoginForm } from "@/ee/components/cloud-login-form.tsx";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function CloudLogin() {
|
export default function CloudLogin() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Login")} />
|
||||||
<title>
|
|
||||||
{t("Login")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
|
|
||||||
<CloudLoginForm />
|
<CloudLoginForm />
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
import { SetupWorkspaceForm } from "@/features/auth/components/setup-workspace-form.tsx";
|
import { SetupWorkspaceForm } from "@/features/auth/components/setup-workspace-form.tsx";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { getAppName } from "@/lib/config.ts";
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function CreateWorkspace() {
|
export default function CreateWorkspace() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title="Create Workspace" />
|
||||||
<title>Create Workspace - {getAppName()}</title>
|
|
||||||
</Helmet>
|
|
||||||
<SetupWorkspaceForm />
|
<SetupWorkspaceForm />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { Helmet } from "react-helmet-async";
|
import { isCloud } from "@/lib/config.ts";
|
||||||
import { getAppName, isCloud } from "@/lib/config.ts";
|
|
||||||
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
@@ -37,6 +36,7 @@ import EnableScim from "@/ee/scim/components/enable-scim";
|
|||||||
import { useCursorPaginate } from "@/hooks/use-cursor-paginate";
|
import { useCursorPaginate } from "@/hooks/use-cursor-paginate";
|
||||||
import Paginate from "@/components/common/paginate";
|
import Paginate from "@/components/common/paginate";
|
||||||
import { IScimToken } from "@/ee/scim/types/scim-token.types";
|
import { IScimToken } from "@/ee/scim/types/scim-token.types";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
const SCIM_TOKEN_LIMIT = 5;
|
const SCIM_TOKEN_LIMIT = 5;
|
||||||
|
|
||||||
@@ -64,9 +64,7 @@ export default function Security() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title="Security" />
|
||||||
<title>Security - {getAppName()}</title>
|
|
||||||
</Helmet>
|
|
||||||
<SettingsTitle title={t("Security")} />
|
<SettingsTitle title={t("Security")} />
|
||||||
|
|
||||||
<EnforceMfa />
|
<EnforceMfa />
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { useDisclosure, useWindowEvent } from "@mantine/hooks";
|
import { useDisclosure, useWindowEvent } from "@mantine/hooks";
|
||||||
import { notifications } from "@mantine/notifications";
|
import { notifications } from "@mantine/notifications";
|
||||||
import { Link, useParams } from "react-router-dom";
|
import { Link, useParams } from "react-router-dom";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { getAppName } from "@/lib/config";
|
|
||||||
import { useEditor, EditorContent } from "@tiptap/react";
|
import { useEditor, EditorContent } from "@tiptap/react";
|
||||||
import { templateExtensions } from "@/features/editor/extensions/extensions";
|
import { templateExtensions } from "@/features/editor/extensions/extensions";
|
||||||
import {
|
import {
|
||||||
@@ -44,6 +42,7 @@ import CalloutMenu from "@/features/editor/components/callout/callout-menu.tsx";
|
|||||||
import ColumnsMenu from "@/features/editor/components/columns/columns-menu.tsx";
|
import ColumnsMenu from "@/features/editor/components/columns/columns-menu.tsx";
|
||||||
|
|
||||||
import classes from "./template-editor.module.css";
|
import classes from "./template-editor.module.css";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function TemplateEditor() {
|
export default function TemplateEditor() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -247,11 +246,7 @@ export default function TemplateEditor() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Edit template")} />
|
||||||
<title>
|
|
||||||
{t("Edit template")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
|
|
||||||
{editorToolbarEnabled && editor && (
|
{editorToolbarEnabled && editor && (
|
||||||
<FixedToolbar editor={editor} templateMode />
|
<FixedToolbar editor={editor} templateMode />
|
||||||
|
|||||||
@@ -13,11 +13,9 @@ import {
|
|||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { modals } from "@mantine/modals";
|
import { modals } from "@mantine/modals";
|
||||||
import { IconPlus } from "@tabler/icons-react";
|
import { IconPlus } from "@tabler/icons-react";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { useDisclosure } from "@mantine/hooks";
|
import { useDisclosure } from "@mantine/hooks";
|
||||||
import { getAppName } from "@/lib/config";
|
|
||||||
import {
|
import {
|
||||||
useGetTemplatesQuery,
|
useGetTemplatesQuery,
|
||||||
useDeleteTemplateMutation,
|
useDeleteTemplateMutation,
|
||||||
@@ -31,6 +29,7 @@ import useUserRole from "@/hooks/use-user-role";
|
|||||||
import CreateTemplateModal from "@/ee/template/components/create-template-modal";
|
import CreateTemplateModal from "@/ee/template/components/create-template-modal";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { workspaceAtom } from "@/features/user/atoms/current-user-atom";
|
import { workspaceAtom } from "@/features/user/atoms/current-user-atom";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function TemplateList() {
|
export default function TemplateList() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -102,11 +101,7 @@ export default function TemplateList() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Templates")} />
|
||||||
<title>
|
|
||||||
{t("Templates")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
|
|
||||||
<Container size="900" pt="xl">
|
<Container size="900" pt="xl">
|
||||||
<Group justify="space-between" mb="xl">
|
<Group justify="space-between" mb="xl">
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
import { ForgotPasswordForm } from "@/features/auth/components/forgot-password-form";
|
import { ForgotPasswordForm } from "@/features/auth/components/forgot-password-form";
|
||||||
import { getAppName } from "@/lib/config";
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
|
|
||||||
export default function ForgotPassword() {
|
export default function ForgotPassword() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title="Forgot Password" />
|
||||||
<title>Forgot Password - {getAppName()}</title>
|
|
||||||
</Helmet>
|
|
||||||
<ForgotPasswordForm />
|
<ForgotPasswordForm />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { InviteSignUpForm } from "@/features/auth/components/invite-sign-up-form.tsx";
|
import { InviteSignUpForm } from "@/features/auth/components/invite-sign-up-form.tsx";
|
||||||
import {getAppName} from "@/lib/config.ts";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function InviteSignup() {
|
export default function InviteSignup() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Invitation Signup")} />
|
||||||
<title>{t("Invitation Signup")} - {getAppName()}</title>
|
|
||||||
</Helmet>
|
|
||||||
<InviteSignUpForm />
|
<InviteSignUpForm />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
import { LoginForm } from "@/features/auth/components/login-form";
|
import { LoginForm } from "@/features/auth/components/login-form";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function LoginPage() {
|
export default function LoginPage() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Login")} />
|
||||||
<title>
|
|
||||||
{t("Login")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
<LoginForm />
|
<LoginForm />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { PasswordResetForm } from "@/features/auth/components/password-reset-form";
|
import { PasswordResetForm } from "@/features/auth/components/password-reset-form";
|
||||||
import { Link, useSearchParams } from "react-router-dom";
|
import { Link, useSearchParams } from "react-router-dom";
|
||||||
import { useVerifyUserTokenQuery } from "@/features/auth/queries/auth-query";
|
import { useVerifyUserTokenQuery } from "@/features/auth/queries/auth-query";
|
||||||
import { Button, Container, Group, Text } from "@mantine/core";
|
import { Button, Container, Group, Text } from "@mantine/core";
|
||||||
import APP_ROUTE from "@/lib/app-route";
|
import APP_ROUTE from "@/lib/app-route";
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function PasswordReset() {
|
export default function PasswordReset() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -23,11 +22,7 @@ export default function PasswordReset() {
|
|||||||
if (isError || !resetToken) {
|
if (isError || !resetToken) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Password Reset")} />
|
||||||
<title>
|
|
||||||
{t("Password Reset")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
<Container my={40}>
|
<Container my={40}>
|
||||||
<Text size="lg" ta="center">
|
<Text size="lg" ta="center">
|
||||||
{t("Invalid or expired password reset link")}
|
{t("Invalid or expired password reset link")}
|
||||||
@@ -49,11 +44,7 @@ export default function PasswordReset() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Password Reset")} />
|
||||||
<title>
|
|
||||||
{t("Password Reset")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
<PasswordResetForm resetToken={resetToken} />
|
<PasswordResetForm resetToken={resetToken} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import { useWorkspacePublicDataQuery } from "@/features/workspace/queries/workspace-query.ts";
|
import { useWorkspacePublicDataQuery } from "@/features/workspace/queries/workspace-query.ts";
|
||||||
import { SetupWorkspaceForm } from "@/features/auth/components/setup-workspace-form.tsx";
|
import { SetupWorkspaceForm } from "@/features/auth/components/setup-workspace-form.tsx";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import APP_ROUTE from "@/lib/app-route.ts";
|
import APP_ROUTE from "@/lib/app-route.ts";
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function SetupWorkspace() {
|
export default function SetupWorkspace() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -35,11 +34,7 @@ export default function SetupWorkspace() {
|
|||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Setup Workspace")} />
|
||||||
<title>
|
|
||||||
{t("Setup Workspace")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
<SetupWorkspaceForm />
|
<SetupWorkspaceForm />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,20 +2,15 @@ import { Container, Space } from "@mantine/core";
|
|||||||
import HomeTabs from "@/features/home/components/home-tabs";
|
import HomeTabs from "@/features/home/components/home-tabs";
|
||||||
import HomeAiPrompt from "@/features/home/components/home-ai-prompt";
|
import HomeAiPrompt from "@/features/home/components/home-ai-prompt";
|
||||||
import SpaceCarousel from "@/features/space/components/space-carousel.tsx";
|
import SpaceCarousel from "@/features/space/components/space-carousel.tsx";
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Home")} />
|
||||||
<title>
|
|
||||||
{t("Home")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
<Container size={"900"} pt="xl">
|
<Container size={"900"} pt="xl">
|
||||||
<HomeAiPrompt />
|
<HomeAiPrompt />
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,7 @@ import {
|
|||||||
} from "@tabler/icons-react";
|
} from "@tabler/icons-react";
|
||||||
import { Link, useParams } from "react-router-dom";
|
import { Link, useParams } from "react-router-dom";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { useDebouncedValue } from "@mantine/hooks";
|
import { useDebouncedValue } from "@mantine/hooks";
|
||||||
import { getAppName } from "@/lib/config";
|
|
||||||
import { useLabelPagesQuery } from "@/features/label/queries/label-query.ts";
|
import { useLabelPagesQuery } from "@/features/label/queries/label-query.ts";
|
||||||
import { useGetSpacesQuery } from "@/features/space/queries/space-query.ts";
|
import { useGetSpacesQuery } from "@/features/space/queries/space-query.ts";
|
||||||
import { getLabelColor } from "@/features/label/utils/label-colors.ts";
|
import { getLabelColor } from "@/features/label/utils/label-colors.ts";
|
||||||
@@ -29,6 +27,7 @@ import { normalizeLabelName } from "@/features/label/utils/normalize-label.ts";
|
|||||||
import { SpaceFilterMenu } from "@/features/space/components/space-filter-menu.tsx";
|
import { SpaceFilterMenu } from "@/features/space/components/space-filter-menu.tsx";
|
||||||
import { EmptyState } from "@/components/ui/empty-state";
|
import { EmptyState } from "@/components/ui/empty-state";
|
||||||
import classes from "@/features/label/label.module.css";
|
import classes from "@/features/label/label.module.css";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function LabelPage() {
|
export default function LabelPage() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -82,11 +81,7 @@ export default function LabelPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={labelName} />
|
||||||
<title>
|
|
||||||
{labelName} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
|
|
||||||
<Container size={820} py="xl">
|
<Container size={820} py="xl">
|
||||||
<Stack gap="lg">
|
<Stack gap="lg">
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { usePageQuery } from "@/features/page/queries/page-query";
|
|||||||
import { FullEditor } from "@/features/editor/full-editor";
|
import { FullEditor } from "@/features/editor/full-editor";
|
||||||
import { TitleEditor } from "@/features/editor/title-editor";
|
import { TitleEditor } from "@/features/editor/title-editor";
|
||||||
import HistoryModal from "@/features/page-history/components/history-modal";
|
import HistoryModal from "@/features/page-history/components/history-modal";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import PageHeader from "@/features/page/components/header/page-header.tsx";
|
import PageHeader from "@/features/page/components/header/page-header.tsx";
|
||||||
import { extractPageSlugId } from "@/lib";
|
import { extractPageSlugId } from "@/lib";
|
||||||
import { useGetSpaceBySlugQuery } from "@/features/space/queries/space-query.ts";
|
import { useGetSpaceBySlugQuery } from "@/features/space/queries/space-query.ts";
|
||||||
@@ -18,6 +17,7 @@ import { BaseView } from "@/ee/base/components/base-view";
|
|||||||
import { useHasFeature } from "@/ee/hooks/use-feature";
|
import { useHasFeature } from "@/ee/hooks/use-feature";
|
||||||
import { Feature } from "@/ee/features";
|
import { Feature } from "@/ee/features";
|
||||||
import { getPageTitle } from "@/features/page/page.utils";
|
import { getPageTitle } from "@/features/page/page.utils";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
const MemoizedFullEditor = React.memo(FullEditor);
|
const MemoizedFullEditor = React.memo(FullEditor);
|
||||||
const MemoizedTitleEditor = React.memo(TitleEditor);
|
const MemoizedTitleEditor = React.memo(TitleEditor);
|
||||||
const MemoizedPageHeader = React.memo(PageHeader);
|
const MemoizedPageHeader = React.memo(PageHeader);
|
||||||
@@ -110,9 +110,10 @@ function PageContent({ pageSlug }: { pageSlug: string | undefined }) {
|
|||||||
paddingTop: "calc(var(--page-header-height) + 6px)",
|
paddingTop: "calc(var(--page-header-height) + 6px)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Helmet>
|
<DocumentTitle
|
||||||
<title>{`${page?.icon || ""} ${getPageTitle(page?.title, page?.isBase, t)}`}</title>
|
title={`${page?.icon || ""} ${getPageTitle(page?.title, page?.isBase, t)}`}
|
||||||
</Helmet>
|
withAppName={false}
|
||||||
|
/>
|
||||||
<MemoizedPageHeader readOnly={!canEdit} />
|
<MemoizedPageHeader readOnly={!canEdit} />
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@@ -159,9 +160,10 @@ function PageContent({ pageSlug }: { pageSlug: string | undefined }) {
|
|||||||
return (
|
return (
|
||||||
page && (
|
page && (
|
||||||
<div>
|
<div>
|
||||||
<Helmet>
|
<DocumentTitle
|
||||||
<title>{`${page?.icon || ""} ${getPageTitle(page?.title, page?.isBase, t)}`}</title>
|
title={`${page?.icon || ""} ${getPageTitle(page?.title, page?.isBase, t)}`}
|
||||||
</Helmet>
|
withAppName={false}
|
||||||
|
/>
|
||||||
|
|
||||||
<MemoizedPageHeader readOnly={!canEdit} />
|
<MemoizedPageHeader readOnly={!canEdit} />
|
||||||
|
|
||||||
|
|||||||
@@ -5,21 +5,16 @@ import PageWidthPref from "@/features/user/components/page-width-pref.tsx";
|
|||||||
import PageEditPref from "@/features/user/components/page-state-pref";
|
import PageEditPref from "@/features/user/components/page-state-pref";
|
||||||
import FixedToolbarPref from "@/features/user/components/fixed-toolbar-pref";
|
import FixedToolbarPref from "@/features/user/components/fixed-toolbar-pref";
|
||||||
import NotificationPref from "@/features/user/components/notification-pref";
|
import NotificationPref from "@/features/user/components/notification-pref";
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import { Divider } from "@mantine/core";
|
import { Divider } from "@mantine/core";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function AccountPreferences() {
|
export default function AccountPreferences() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Preferences")} />
|
||||||
<title>
|
|
||||||
{t("Preferences")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
<SettingsTitle title={t("Preferences")} />
|
<SettingsTitle title={t("Preferences")} />
|
||||||
|
|
||||||
<AccountTheme />
|
<AccountTheme />
|
||||||
|
|||||||
@@ -4,22 +4,17 @@ import ChangePassword from "@/features/user/components/change-password";
|
|||||||
import { Divider } from "@mantine/core";
|
import { Divider } from "@mantine/core";
|
||||||
import AccountAvatar from "@/features/user/components/account-avatar";
|
import AccountAvatar from "@/features/user/components/account-avatar";
|
||||||
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { AccountMfaSection } from "@/features/user/components/account-mfa-section";
|
import { AccountMfaSection } from "@/features/user/components/account-mfa-section";
|
||||||
import SessionList from "@/features/session/components/session-list";
|
import SessionList from "@/features/session/components/session-list";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function AccountSettings() {
|
export default function AccountSettings() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("My Profile")} />
|
||||||
<title>
|
|
||||||
{t("My Profile")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
<SettingsTitle title={t("My Profile")} />
|
<SettingsTitle title={t("My Profile")} />
|
||||||
|
|
||||||
<AccountAvatar />
|
<AccountAvatar />
|
||||||
|
|||||||
@@ -1,20 +1,15 @@
|
|||||||
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
||||||
import GroupMembersList from "@/features/group/components/group-members";
|
import GroupMembersList from "@/features/group/components/group-members";
|
||||||
import GroupDetails from "@/features/group/components/group-details";
|
import GroupDetails from "@/features/group/components/group-details";
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function GroupInfo() {
|
export default function GroupInfo() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Manage Group")} />
|
||||||
<title>
|
|
||||||
{t("Manage Group")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
<SettingsTitle title={t("Manage Group")} />
|
<SettingsTitle title={t("Manage Group")} />
|
||||||
<GroupDetails />
|
<GroupDetails />
|
||||||
<GroupMembersList />
|
<GroupMembersList />
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import SettingsTitle from "@/components/settings/settings-title.tsx";
|
|||||||
import { Group } from "@mantine/core";
|
import { Group } from "@mantine/core";
|
||||||
import CreateGroupModal from "@/features/group/components/create-group-modal";
|
import CreateGroupModal from "@/features/group/components/create-group-modal";
|
||||||
import useUserRole from "@/hooks/use-user-role.tsx";
|
import useUserRole from "@/hooks/use-user-role.tsx";
|
||||||
import {getAppName} from "@/lib/config.ts";
|
|
||||||
import {Helmet} from "react-helmet-async";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function Groups() {
|
export default function Groups() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -13,9 +12,7 @@ export default function Groups() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Groups")} />
|
||||||
<title>{t("Groups")} - {getAppName()}</title>
|
|
||||||
</Helmet>
|
|
||||||
<SettingsTitle title={t("Groups")} />
|
<SettingsTitle title={t("Groups")} />
|
||||||
|
|
||||||
<Group my="md" justify="flex-end">
|
<Group my="md" justify="flex-end">
|
||||||
|
|||||||
@@ -1,22 +1,17 @@
|
|||||||
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
import SettingsTitle from "@/components/settings/settings-title.tsx";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import ShareList from "@/features/share/components/share-list.tsx";
|
import ShareList from "@/features/share/components/share-list.tsx";
|
||||||
import { Alert, Text } from "@mantine/core";
|
import { Alert, Text } from "@mantine/core";
|
||||||
import { IconInfoCircle } from "@tabler/icons-react";
|
import { IconInfoCircle } from "@tabler/icons-react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function Shares() {
|
export default function Shares() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Public sharing")} />
|
||||||
<title>
|
|
||||||
{t("Public sharing")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
<SettingsTitle title={t("Public sharing")} />
|
<SettingsTitle title={t("Public sharing")} />
|
||||||
|
|
||||||
<Alert variant="light" color="blue" icon={<IconInfoCircle />}>
|
<Alert variant="light" color="blue" icon={<IconInfoCircle />}>
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import SpaceList from "@/features/space/components/space-list.tsx";
|
|||||||
import useUserRole from "@/hooks/use-user-role.tsx";
|
import useUserRole from "@/hooks/use-user-role.tsx";
|
||||||
import { Group } from "@mantine/core";
|
import { Group } from "@mantine/core";
|
||||||
import CreateSpaceModal from "@/features/space/components/create-space-modal.tsx";
|
import CreateSpaceModal from "@/features/space/components/create-space-modal.tsx";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function Spaces() {
|
export default function Spaces() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -13,11 +12,7 @@ export default function Spaces() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Spaces")} />
|
||||||
<title>
|
|
||||||
{t("Spaces")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
<SettingsTitle title={t("Spaces")} />
|
<SettingsTitle title={t("Spaces")} />
|
||||||
|
|
||||||
<Group my="md" justify="flex-end">
|
<Group my="md" justify="flex-end">
|
||||||
|
|||||||
@@ -6,11 +6,10 @@ import { useEffect, useState } from "react";
|
|||||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||||
import WorkspaceInvitesTable from "@/features/workspace/components/members/components/workspace-invites-table.tsx";
|
import WorkspaceInvitesTable from "@/features/workspace/components/members/components/workspace-invites-table.tsx";
|
||||||
import useUserRole from "@/hooks/use-user-role.tsx";
|
import useUserRole from "@/hooks/use-user-role.tsx";
|
||||||
import { getAppName } from "@/lib/config.ts";
|
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import { workspaceAtom } from "@/features/user/atoms/current-user-atom.ts";
|
import { workspaceAtom } from "@/features/user/atoms/current-user-atom.ts";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function WorkspaceMembers() {
|
export default function WorkspaceMembers() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -38,11 +37,7 @@ export default function WorkspaceMembers() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Members")} />
|
||||||
<title>
|
|
||||||
{t("Members")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
<SettingsTitle title={t("Members")} />
|
<SettingsTitle title={t("Members")} />
|
||||||
|
|
||||||
{/* <WorkspaceInviteSection /> */}
|
{/* <WorkspaceInviteSection /> */}
|
||||||
|
|||||||
@@ -2,21 +2,19 @@ import SettingsTitle from "@/components/settings/settings-title.tsx";
|
|||||||
import WorkspaceNameForm from "@/features/workspace/components/settings/components/workspace-name-form";
|
import WorkspaceNameForm from "@/features/workspace/components/settings/components/workspace-name-form";
|
||||||
import WorkspaceIcon from "@/features/workspace/components/settings/components/workspace-icon.tsx";
|
import WorkspaceIcon from "@/features/workspace/components/settings/components/workspace-icon.tsx";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { getAppName, isCloud } from "@/lib/config.ts";
|
import { isCloud } from "@/lib/config.ts";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import ManageHostname from "@/ee/components/manage-hostname.tsx";
|
import ManageHostname from "@/ee/components/manage-hostname.tsx";
|
||||||
import { Divider } from "@mantine/core";
|
import { Divider } from "@mantine/core";
|
||||||
import AllowMemberTemplates from "@/ee/security/components/allow-member-templates.tsx";
|
import AllowMemberTemplates from "@/ee/security/components/allow-member-templates.tsx";
|
||||||
import WorkspaceDefaultPageEditMode from "@/features/workspace/components/settings/components/workspace-default-page-edit-mode.tsx";
|
import WorkspaceDefaultPageEditMode from "@/features/workspace/components/settings/components/workspace-default-page-edit-mode.tsx";
|
||||||
import PersonalSpacesSetting from "@/ee/personal-space/components/personal-spaces-setting.tsx";
|
import PersonalSpacesSetting from "@/ee/personal-space/components/personal-spaces-setting.tsx";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function WorkspaceSettings() {
|
export default function WorkspaceSettings() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title="Workspace Settings" />
|
||||||
<title>Workspace Settings - {getAppName()}</title>
|
|
||||||
</Helmet>
|
|
||||||
<SettingsTitle title={t("General")} />
|
<SettingsTitle title={t("General")} />
|
||||||
<WorkspaceIcon />
|
<WorkspaceIcon />
|
||||||
<WorkspaceNameForm />
|
<WorkspaceNameForm />
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { useNavigate, useParams } from "react-router-dom";
|
import { useNavigate, useParams } from "react-router-dom";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useSharePageQuery } from "@/features/share/queries/share-query.ts";
|
import { useSharePageQuery } from "@/features/share/queries/share-query.ts";
|
||||||
import { Container } from "@mantine/core";
|
import { Container } from "@mantine/core";
|
||||||
@@ -14,6 +13,7 @@ import {
|
|||||||
sharedTreeDataAtom,
|
sharedTreeDataAtom,
|
||||||
} from "@/features/share/atoms/shared-page-atom.ts";
|
} from "@/features/share/atoms/shared-page-atom.ts";
|
||||||
import { isPageInTree } from "@/features/share/utils.ts";
|
import { isPageInTree } from "@/features/share/utils.ts";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function SharedPage() {
|
export default function SharedPage() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -56,12 +56,14 @@ export default function SharedPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Helmet>
|
<DocumentTitle
|
||||||
<title>{`${data?.page?.title || t("untitled")}`}</title>
|
title={data?.page?.title || t("untitled")}
|
||||||
|
withAppName={false}
|
||||||
|
>
|
||||||
{!data?.share.searchIndexing && (
|
{!data?.share.searchIndexing && (
|
||||||
<meta name="robots" content="noindex" />
|
<meta name="robots" content="noindex" />
|
||||||
)}
|
)}
|
||||||
</Helmet>
|
</DocumentTitle>
|
||||||
|
|
||||||
<Container fluid={fullWidth} size={fullWidth ? undefined : 900} p={0}>
|
<Container fluid={fullWidth} size={fullWidth ? undefined : 900} p={0}>
|
||||||
<ReadonlyPageEditor
|
<ReadonlyPageEditor
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ import {Container} from "@mantine/core";
|
|||||||
import SpaceHomeTabs from "@/features/space/components/space-home-tabs.tsx";
|
import SpaceHomeTabs from "@/features/space/components/space-home-tabs.tsx";
|
||||||
import {useParams} from "react-router-dom";
|
import {useParams} from "react-router-dom";
|
||||||
import {useGetSpaceBySlugQuery} from "@/features/space/queries/space-query.ts";
|
import {useGetSpaceBySlugQuery} from "@/features/space/queries/space-query.ts";
|
||||||
import {getAppName} from "@/lib/config.ts";
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
import {Helmet} from "react-helmet-async";
|
|
||||||
|
|
||||||
export default function SpaceHome() {
|
export default function SpaceHome() {
|
||||||
const {spaceSlug} = useParams();
|
const {spaceSlug} = useParams();
|
||||||
@@ -11,9 +10,7 @@ export default function SpaceHome() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={space?.name || 'Overview'} />
|
||||||
<title>{space?.name || 'Overview'} - {getAppName()}</title>
|
|
||||||
</Helmet>
|
|
||||||
<Container size={"900"} pt="xl">
|
<Container size={"900"} pt="xl">
|
||||||
{space && <SpaceHomeTabs/>}
|
{space && <SpaceHomeTabs/>}
|
||||||
</Container>
|
</Container>
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
import { Container, Title, Text, Group, Box } from "@mantine/core";
|
import { Container, Title, Text, Group, Box } from "@mantine/core";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Helmet } from "react-helmet-async";
|
|
||||||
import { getAppName } from "@/lib/config";
|
|
||||||
import { useGetSpacesQuery } from "@/features/space/queries/space-query";
|
import { useGetSpacesQuery } from "@/features/space/queries/space-query";
|
||||||
import CreateSpaceModal from "@/features/space/components/create-space-modal";
|
import CreateSpaceModal from "@/features/space/components/create-space-modal";
|
||||||
import { AllSpacesList } from "@/features/space/components/spaces-page";
|
import { AllSpacesList } from "@/features/space/components/spaces-page";
|
||||||
import FavoriteSpacesGrid from "@/features/space/components/spaces-page/favorite-spaces-grid";
|
import FavoriteSpacesGrid from "@/features/space/components/spaces-page/favorite-spaces-grid";
|
||||||
import { usePaginateAndSearch } from "@/hooks/use-paginate-and-search";
|
import { usePaginateAndSearch } from "@/hooks/use-paginate-and-search";
|
||||||
import useUserRole from "@/hooks/use-user-role";
|
import useUserRole from "@/hooks/use-user-role";
|
||||||
|
import { DocumentTitle } from "@/components/ui/document-title.tsx";
|
||||||
|
|
||||||
export default function Spaces() {
|
export default function Spaces() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -22,11 +21,7 @@ export default function Spaces() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Helmet>
|
<DocumentTitle title={t("Spaces")} />
|
||||||
<title>
|
|
||||||
{t("Spaces")} - {getAppName()}
|
|
||||||
</title>
|
|
||||||
</Helmet>
|
|
||||||
|
|
||||||
<Container size={"800"} pt="xl">
|
<Container size={"800"} pt="xl">
|
||||||
<Group justify="space-between" mb="xl">
|
<Group justify="space-between" mb="xl">
|
||||||
|
|||||||
Reference in New Issue
Block a user