mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-02-23 05:33:07 +01:00
add welcome page
This commit is contained in:
parent
b4b3ed1696
commit
606418856b
3 changed files with 76 additions and 14 deletions
|
@ -43,10 +43,12 @@ export function PageHero({
|
|||
icon,
|
||||
title,
|
||||
subTitle,
|
||||
children,
|
||||
}: {
|
||||
icon: ReactNode;
|
||||
title: ReactNode;
|
||||
subTitle: ReactNode;
|
||||
children?: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<Box direction="Column" gap="400">
|
||||
|
@ -61,6 +63,7 @@ export function PageHero({
|
|||
{subTitle}
|
||||
</Text>
|
||||
</Box>
|
||||
{children}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -41,17 +41,12 @@ import { FeatureCheck } from './FeatureCheck';
|
|||
import { ClientLayout, ClientRoot } from './client';
|
||||
import { Home, HomeRouteRoomProvider, HomeSearch } from './client/home';
|
||||
import { Direct, DirectRouteRoomProvider } from './client/direct';
|
||||
import {
|
||||
RouteSpaceProvider,
|
||||
Space,
|
||||
SpaceIndexRedirect,
|
||||
SpaceRouteRoomProvider,
|
||||
SpaceSearch,
|
||||
} from './client/space';
|
||||
import { Explore, ExploreRedirect, FeaturedRooms, PublicRooms } from './client/explore';
|
||||
import { Notifications, Inbox, InboxRedirect, Invites } from './client/inbox';
|
||||
import { RouteSpaceProvider, Space, SpaceRouteRoomProvider, SpaceSearch } from './client/space';
|
||||
import { Explore, FeaturedRooms, PublicRooms } from './client/explore';
|
||||
import { Notifications, Inbox, Invites } from './client/inbox';
|
||||
import { setAfterLoginRedirectPath } from './afterLoginRedirectPath';
|
||||
import { Room } from '../features/room';
|
||||
import { WelcomePage } from './client/WelcomePage';
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
|
@ -92,7 +87,7 @@ const createRouter = (clientConfig: ClientConfig) => {
|
|||
>
|
||||
<Route element={<ClientLayout />}>
|
||||
<Route path={HOME_PATH} element={<Home />}>
|
||||
<Route index element={<p>welcome</p>} />
|
||||
<Route index element={<WelcomePage />} />
|
||||
<Route path={_CREATE_PATH} element={<p>create</p>} />
|
||||
<Route path={_JOIN_PATH} element={<p>join</p>} />
|
||||
<Route path={_SEARCH_PATH} element={<HomeSearch />} />
|
||||
|
@ -106,7 +101,7 @@ const createRouter = (clientConfig: ClientConfig) => {
|
|||
/>
|
||||
</Route>
|
||||
<Route path={DIRECT_PATH} element={<Direct />}>
|
||||
<Route index element={<p>welcome</p>} />
|
||||
<Route index element={<WelcomePage />} />
|
||||
<Route path={_CREATE_PATH} element={<p>create</p>} />
|
||||
<Route
|
||||
path={_ROOM_PATH}
|
||||
|
@ -119,7 +114,7 @@ const createRouter = (clientConfig: ClientConfig) => {
|
|||
</Route>
|
||||
<Route path={SPACE_PATH} element={<RouteSpaceProvider />}>
|
||||
<Route element={<Space />}>
|
||||
<Route index element={<SpaceIndexRedirect />} />
|
||||
<Route index element={<WelcomePage />} />
|
||||
<Route path={_LOBBY_PATH} element={<p>lobby</p>} />
|
||||
<Route path={_SEARCH_PATH} element={<SpaceSearch />} />
|
||||
<Route
|
||||
|
@ -133,12 +128,12 @@ const createRouter = (clientConfig: ClientConfig) => {
|
|||
</Route>
|
||||
</Route>
|
||||
<Route path={EXPLORE_PATH} element={<Explore />}>
|
||||
<Route index element={<ExploreRedirect />} />
|
||||
<Route index element={<WelcomePage />} />
|
||||
<Route path={_FEATURED_PATH} element={<FeaturedRooms />} />
|
||||
<Route path={_SERVER_PATH} element={<PublicRooms />} />
|
||||
</Route>
|
||||
<Route path={INBOX_PATH} element={<Inbox />}>
|
||||
<Route index element={<InboxRedirect />} />
|
||||
<Route index element={<WelcomePage />} />
|
||||
<Route path={_NOTIFICATIONS_PATH} element={<Notifications />} />
|
||||
<Route path={_INVITES_PATH} element={<Invites />} />
|
||||
</Route>
|
||||
|
|
64
src/app/pages/client/WelcomePage.tsx
Normal file
64
src/app/pages/client/WelcomePage.tsx
Normal file
|
@ -0,0 +1,64 @@
|
|||
import React from 'react';
|
||||
import { Box, Button, Icon, Icons, Text, config, toRem } from 'folds';
|
||||
import { Page, PageHero, PageHeroSection } from '../../components/page';
|
||||
import CinnySVG from '../../../../public/res/svg/cinny.svg';
|
||||
|
||||
export function WelcomePage() {
|
||||
return (
|
||||
<Page>
|
||||
<Box
|
||||
grow="Yes"
|
||||
style={{ padding: config.space.S400, paddingBottom: config.space.S700 }}
|
||||
alignItems="Center"
|
||||
justifyContent="Center"
|
||||
>
|
||||
<PageHeroSection>
|
||||
<PageHero
|
||||
icon={<img width="70" height="70" src={CinnySVG} alt="Cinny Logo" />}
|
||||
title="Welcome to Cinny"
|
||||
subTitle={
|
||||
<span>
|
||||
Yet anothor matrix client.{' '}
|
||||
<a
|
||||
href="https://github.com/cinnyapp/cinny/releases"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>
|
||||
v3.2.0
|
||||
</a>
|
||||
</span>
|
||||
}
|
||||
>
|
||||
<Box justifyContent="Center">
|
||||
<Box grow="Yes" style={{ maxWidth: toRem(300) }} direction="Column" gap="300">
|
||||
<Button
|
||||
as="a"
|
||||
href="https://github.com/cinnyapp/cinny"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
before={<Icon size="200" src={Icons.Code} />}
|
||||
>
|
||||
<Text as="span" size="B400" truncate>
|
||||
Source Code
|
||||
</Text>
|
||||
</Button>
|
||||
<Button
|
||||
as="a"
|
||||
href="https://cinny.in/#sponsor"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
fill="Soft"
|
||||
before={<Icon size="200" src={Icons.Heart} />}
|
||||
>
|
||||
<Text as="span" size="B400" truncate>
|
||||
Sponsor
|
||||
</Text>
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
</PageHero>
|
||||
</PageHeroSection>
|
||||
</Box>
|
||||
</Page>
|
||||
);
|
||||
}
|
Loading…
Reference in a new issue