Skip to content

Commit

Permalink
Merge pull request #95 from xi-effect/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
unknownproperty authored Jul 23, 2024
2 parents 58fe58f + 0ef25df commit 6aa9332
Show file tree
Hide file tree
Showing 77 changed files with 4,613 additions and 4,615 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ const WhiteBoard = dynamic(() => import('pkg.module.whiteboard').then((mod) => m

export default function WhiteBoardPage() {
return (
<div className="w-full md:w-[calc(100vw-350px)] md:min-h-screen md:h-screen md:overflow-auto bg-gray-0">
<div
id="whiteboard-container"
className="w-full md:w-[calc(100vw-350px)] md:min-h-screen md:h-screen md:overflow-auto bg-gray-0"
>
<WhiteBoard />
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
export default function Chats() {
return (
<div className="w-full md:w-[calc(100vw-350px)] md:min-h-screen md:h-screen md:overflow-auto bg-gray-0">
chats
chat
</div>
);
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use client';

import React from 'react';
import dynamic from 'next/dynamic';

const Post = dynamic(() => import('pkg.module.posts').then((mod) => mod.Post));

export default function PostPage() {
return (
<Post />
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react';
import dynamic from 'next/dynamic';
import { ScrollArea } from '@xipkg/scrollarea';

const Posts = dynamic(() => import('pkg.module.posts').then((mod) => mod.Announces));
const Posts = dynamic(() => import('pkg.module.posts').then((mod) => mod.Posts));

export default function AnnouncesPage() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use client';

import React from 'react';
import dynamic from 'next/dynamic';

const TasksAdmin = dynamic(() => import('pkg.module.tasks-admin').then((mod) => mod.TasksAdmin));

export default function TasksAdminPage() {
return <TasksAdmin />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'use client';

import React from 'react';
import dynamic from 'next/dynamic';
import { ScrollArea } from '@xipkg/scrollarea';

const Task = dynamic(() =>
import('pkg.module.tasks').then((mod) => mod.Task),
);

export default function TaskPage() {
return (
<ScrollArea>
<div className="flex flex-col h-[calc(100dvh-80px)] md:h-screen p-8 max-xs:p-4">
<Task />
</div>
</ScrollArea>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

import React from 'react';
import dynamic from 'next/dynamic';
import { ScrollArea } from '@xipkg/scrollarea';

const Tasks = dynamic(() => import('pkg.module.tasks').then((mod) => mod.Tasks));

export default function TasksPage() {
return <Tasks />;
return (
<ScrollArea>
<div className="flex flex-col h-[calc(100dvh-80px)] md:h-screen p-8 max-xs:p-4">
<Tasks />
</div>
</ScrollArea>
);
}
16 changes: 15 additions & 1 deletion apps/xi.front/app/(protected)/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@ const ProtectedProvider = ({ children }: ProtectedProviderPropsT) => {
});
}

const pathnameArr = pathname.split('/');
if (pathnameArr.includes('channels') && community.id) {
const betweenChannels = pathname.split('channels');

return router.push(`/communities/${community.id}/channels${betweenChannels[1]}`);
}

if (community.id) router.push(`/communities/${community.id}/home`);

return null;
},
);
});
Expand Down Expand Up @@ -81,7 +90,12 @@ const ProtectedProvider = ({ children }: ProtectedProviderPropsT) => {

useEffect(() => {
console.log('onboardingStage', onboardingStage);
if (onboardingStage && onboardingStage !== null && onboardingStage !== 'completed' && !pathname.includes('/welcome/')) {
if (
onboardingStage &&
onboardingStage !== null &&
onboardingStage !== 'completed' &&
!pathname.includes('/welcome/')
) {
redirect('/welcome/user-info');
}
}, [isLogin]);
Expand Down
9 changes: 8 additions & 1 deletion apps/xi.front/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ import { Metadata } from 'next';
import { Inter } from 'next/font/google';
import React, { ReactNode, Suspense } from 'react';
import Script from 'next/script';
import localFont from 'next/font/local';
import { Providers } from './providers';
import YandexMetrika from './metrika';

const markerHand = localFont({
src: '../public/fonts/MarkerHand-Regular.woff2',
display: 'swap',
variable: '--font-marker-hand',
});

const inter = Inter({
weight: ['400', '500', '600', '700'],
style: ['normal'],
Expand Down Expand Up @@ -44,7 +51,7 @@ export const metadata: Metadata = {

export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en" suppressHydrationWarning className={`${inter.variable} text-[16px]`}>
<html lang="en" suppressHydrationWarning className={`${inter.variable} ${markerHand.variable} text-[16px]`}>
<body className="overflow-hidden bg-gray-0">
{process.env.NODE_ENV === 'production' &&
<>
Expand Down
5 changes: 3 additions & 2 deletions apps/xi.front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@xipkg/label": "0.0.9",
"@xipkg/link": "^0.3.0",
"@xipkg/scrollarea": "0.1.0",
"@xipkg/tailwind": "0.4.0",
"@xipkg/tailwind": "0.5.0",
"@xipkg/userprofile": "2.3.0",
"crypto-js": "^4.1.1",
"driver.js": "^1.3.1",
Expand All @@ -44,6 +44,7 @@
"pkg.models": "*",
"pkg.module.posts": "*",
"pkg.module.tasks": "*",
"pkg.module.tasks-admin": "*",
"pkg.module.editor": "*",
"pkg.module.videoconference": "*",
"pkg.module.whiteboard": "*",
Expand Down Expand Up @@ -83,4 +84,4 @@
"not dead",
"not op_mini all"
]
}
}
Binary file not shown.
2 changes: 1 addition & 1 deletion apps/xi.front/public/sw.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions apps/xi.front/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,12 @@ module.exports = {
'../../packages/**/*.{js,ts,jsx,tsx,mdx}',
'../../node_modules/@xipkg/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {
fontFamily: {
'marker-hand': ['var(--font-marker-hand)'],
},
},
},
presets: [require('@xipkg/tailwind/design-system-preset.js')],
};
Loading

0 comments on commit 6aa9332

Please sign in to comment.