Files
cinny/src/app/pages/client/WelcomePage.tsx
T
f2c356f288
CI / Build & Quality Checks (push) Successful in 10m37s
CI / Trigger Desktop Build (push) Canceled after 0s
refactor(assets): build logo/favicon URLs via withOriginBaseUrl helper
Swap the logo/favicon URL constants from the inline
`${trimTrailingSlash(import.meta.env.BASE_URL)}/public/res/...` form to the
repo's existing `withOriginBaseUrl(getOriginBaseUrl(), '/public/res/...')`
helper (already used here for the OIDC callback URL). Functionally equivalent —
same /public/res/ target, resolves in dev and the static-copied prod build — and
it keeps the logo URL absolute and consistent with clientUri for the OIDC
logoUri. No build-config change (publicDir stays false).

Co-authored-by: Nathan Vititoe <nathanvititoe@gmail.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-02 20:22:58 -04:00

76 lines
2.4 KiB
TypeScript

import React from 'react';
import { Box, Button, Icon, Icons, Text, config, toRem } from 'folds';
import { Page, PageHero, PageHeroSection } from '../../components/page';
import { getOriginBaseUrl, withOriginBaseUrl } from '../pathUtils';
import pkg from '../../../../package.json';
const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/public/res/Lotus.png');
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={LotusLogo}
alt="Lotus Chat"
style={{ objectFit: 'contain' }}
/>
}
title="Welcome to Lotus Chat"
subTitle={
<span>
A Matrix client for Lotus Guild.{' '}
<a
href="https://code.lotusguild.org/LotusGuild/cinny/releases"
target="_blank"
rel="noreferrer noopener"
>
v{pkg.version}
</a>
</span>
}
>
<Box justifyContent="Center">
<Box grow="Yes" style={{ maxWidth: toRem(300) }} direction="Column" gap="300">
<Button
as="a"
href="https://code.lotusguild.org/LotusGuild/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://matrix.lotusguild.org"
target="_blank"
rel="noreferrer noopener"
fill="Soft"
before={<Icon size="200" src={Icons.Heart} />}
>
<Text as="span" size="B400" truncate>
Lotus Matrix Guide
</Text>
</Button>
</Box>
</Box>
</PageHero>
</PageHeroSection>
</Box>
</Page>
);
}