diff --git a/app/scenes/Settings/Details.tsx b/app/scenes/Settings/Details.tsx index 7ff1bf1b6..7ffa010d6 100644 --- a/app/scenes/Settings/Details.tsx +++ b/app/scenes/Settings/Details.tsx @@ -7,7 +7,7 @@ import * as React from "react"; import { useTranslation, Trans } from "react-i18next"; import { ThemeProvider, useTheme } from "styled-components"; import { buildDarkTheme, buildLightTheme } from "@shared/styles/theme"; -import { CustomTheme } from "@shared/types"; +import { CustomTheme, TeamPreference } from "@shared/types"; import { getBaseDomain } from "@shared/utils/domains"; import Button from "~/components/Button"; import ButtonLink from "~/components/ButtonLink"; @@ -16,6 +16,7 @@ import Heading from "~/components/Heading"; import Input from "~/components/Input"; import InputColor from "~/components/InputColor"; import Scene from "~/components/Scene"; +import Switch from "~/components/Switch"; import Text from "~/components/Text"; import env from "~/env"; import useCurrentTeam from "~/hooks/useCurrentTeam"; @@ -40,6 +41,9 @@ function Details() { ); const [name, setName] = useState(team.name); const [subdomain, setSubdomain] = useState(team.subdomain); + const [publicBranding, setPublicBranding] = useState( + team.preferences?.publicBranding + ); const [defaultCollectionId, setDefaultCollectionId] = useState( team.defaultCollectionId ); @@ -65,6 +69,7 @@ function Details() { defaultCollectionId, preferences: { ...team.preferences, + publicBranding, customTheme, }, }); @@ -83,6 +88,7 @@ function Details() { subdomain, defaultCollectionId, team.preferences, + publicBranding, customTheme, showToast, t, @@ -214,6 +220,24 @@ function Details() { flex /> + {team.avatarUrl && ( + + ) => + setPublicBranding(event.target.checked) + } + /> + + )} {t("Behavior")} diff --git a/app/scenes/Settings/Features.tsx b/app/scenes/Settings/Features.tsx index 24317e4bd..fbfe4cbb4 100644 --- a/app/scenes/Settings/Features.tsx +++ b/app/scenes/Settings/Features.tsx @@ -69,22 +69,6 @@ function Features() { onChange={handlePreferenceChange} /> - {team.avatarUrl && ( - - - - )} ); } diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json index 26b36303e..db1427e06 100644 --- a/shared/i18n/locales/en_US/translation.json +++ b/shared/i18n/locales/en_US/translation.json @@ -727,6 +727,8 @@ "Reset theme": "Reset theme", "Accent color": "Accent color", "Accent text color": "Accent text color", + "Public branding": "Public branding", + "Show your team’s logo on public pages like login and shared documents.": "Show your team’s logo on public pages like login and shared documents.", "Behavior": "Behavior", "Subdomain": "Subdomain", "Your knowledge base will be accessible at": "Your knowledge base will be accessible at", @@ -742,8 +744,6 @@ "When enabled documents are always editable for team members that have permission. When disabled there is a separate editing view.": "When enabled documents are always editable for team members that have permission. When disabled there is a separate editing view.", "Commenting": "Commenting", "When enabled team members can add comments to documents.": "When enabled team members can add comments to documents.", - "Public branding": "Public branding", - "Show your team’s logo on public pages like login and shared documents.": "Show your team’s logo on public pages like login and shared documents.", "Add a Google Analytics 4 measurement ID to send document views and analytics from the workspace to your own Google Analytics account.": "Add a Google Analytics 4 measurement ID to send document views and analytics from the workspace to your own Google Analytics account.", "Measurement ID": "Measurement ID", "Create a \"Web\" stream in your Google Analytics admin dashboard and copy the measurement ID from the generated code snippet to install.": "Create a \"Web\" stream in your Google Analytics admin dashboard and copy the measurement ID from the generated code snippet to install.",