diff --git a/apps/web/app/[locale]/page-component.tsx b/apps/web/app/[locale]/page-component.tsx index fca662406..2a2e1a857 100644 --- a/apps/web/app/[locale]/page-component.tsx +++ b/apps/web/app/[locale]/page-component.tsx @@ -30,7 +30,7 @@ import ChatwootWidget from 'lib/features/integrations/chatwoot'; import 'react-loading-skeleton/dist/skeleton.css'; import '../../styles/globals.css'; -import { useRecoilState, useRecoilValue } from 'recoil'; +import { useRecoilState } from 'recoil'; import { fullWidthState } from '@app/stores/fullWidth'; import { ChevronDown } from 'lucide-react'; import HeaderTabs from '@components/pages/main/header-tabs'; @@ -41,7 +41,7 @@ import { PeoplesIcon } from 'assets/svg'; function MainPage() { const t = useTranslations(); const { isTeamMember, isTrackingEnabled, activeTeam } = useOrganizationTeams(); - const fullWidth = useRecoilValue(fullWidthState); + const [fullWidth, setFullWidth] = useRecoilState(fullWidthState); const [view, setView] = useRecoilState(headerTabs); const path = usePathname(); const breadcrumb = [ @@ -56,6 +56,12 @@ function MainPage() { } // eslint-disable-next-line react-hooks/exhaustive-deps }, [path, setView]); + + React.useEffect(() => { + window && window?.localStorage.getItem('conf-fullWidth-mode'); + setFullWidth(JSON.parse(window?.localStorage.getItem('conf-fullWidth-mode') || 'true')); + }, [fullWidth, setFullWidth]); + if (!online) { return ; } diff --git a/apps/web/app/[locale]/settings/layout.tsx b/apps/web/app/[locale]/settings/layout.tsx index b38a32b6a..0e13abf00 100644 --- a/apps/web/app/[locale]/settings/layout.tsx +++ b/apps/web/app/[locale]/settings/layout.tsx @@ -10,6 +10,7 @@ import { useTranslations } from 'next-intl'; import Link from 'next/link'; import React from 'react'; import { useRecoilState, useRecoilValue } from 'recoil'; +import { clsxm } from '@app/utils'; const SettingsLayout = ({ children }: { children: JSX.Element }) => { const t = useTranslations(); @@ -28,25 +29,28 @@ const SettingsLayout = ({ children }: { children: JSX.Element }) => { className="items-start pb-1 overflow-hidden w-full" childrenClassName="h-[calc(100vh-_300px)] overflow-hidden w-full" > -
-
- -
- - - +
+ + {/*
*/} + + + - -
-
-
+ + {/*
*/} +
+
+
-
+
{children}
-
+
); } diff --git a/apps/web/lib/components/container.tsx b/apps/web/lib/components/container.tsx index 40c8c34fa..b1b09c4f2 100644 --- a/apps/web/lib/components/container.tsx +++ b/apps/web/lib/components/container.tsx @@ -1,7 +1,23 @@ import { IClassName } from '@app/interfaces'; import { clsxm } from '@app/utils'; +import { Transition } from '@headlessui/react'; import { PropsWithChildren } from 'react'; export function Container({ children, className, fullWidth }: PropsWithChildren) { - return
{children}
; + return ( + +
+ {children} +
+
+ ); } diff --git a/apps/web/lib/components/toggler.tsx b/apps/web/lib/components/toggler.tsx index f5665af62..6fe058b74 100644 --- a/apps/web/lib/components/toggler.tsx +++ b/apps/web/lib/components/toggler.tsx @@ -12,11 +12,12 @@ import { TimerStopIcon } from 'assets/svg'; import { Text } from './typography'; -import { Cross2Icon, LightningBoltIcon, UpdateIcon } from '@radix-ui/react-icons'; +import { AllSidesIcon, Cross2Icon, LightningBoltIcon, UpdateIcon } from '@radix-ui/react-icons'; import { useRecoilState } from 'recoil'; import { dataSyncModeState, isDataSyncState } from '@app/stores/data-sync'; import { useModal } from '@app/hooks'; import { RealTimePopup } from 'lib/settings/sync.zone'; +import { fullWidthState } from '@app/stores/fullWidth'; type Props = { className?: string; @@ -207,3 +208,40 @@ export function CommonToggle({
); } + +export function FullWidthToggler({ className }: IClassName) { + const [fullWidth, setFullWidth] = useRecoilState(fullWidthState); + + React.useEffect(() => { + window && window.localStorage.setItem('conf-fullWidth-mode', JSON.stringify(fullWidth)); + }, [fullWidth]); + + return ( +
+ + + +
+ ); +} diff --git a/apps/web/lib/features/task/task-card.tsx b/apps/web/lib/features/task/task-card.tsx index 1d0021a97..73087c029 100644 --- a/apps/web/lib/features/task/task-card.tsx +++ b/apps/web/lib/features/task/task-card.tsx @@ -118,7 +118,7 @@ export function TaskCard(props: Props) { -
+
{/* Task information */}