Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -17,7 +17,6 @@
|
|||||||
"featuredCommunities": {
|
"featuredCommunities": {
|
||||||
"openAsDefault": false,
|
"openAsDefault": false,
|
||||||
"spaces": [
|
"spaces": [
|
||||||
"#cinny-space:matrix.org",
|
|
||||||
"#community:matrix.org",
|
"#community:matrix.org",
|
||||||
"#space:envs.net",
|
"#space:envs.net",
|
||||||
"#science-space:matrix.org",
|
"#science-space:matrix.org",
|
||||||
@@ -25,7 +24,6 @@
|
|||||||
"#mathematics-on:matrix.org"
|
"#mathematics-on:matrix.org"
|
||||||
],
|
],
|
||||||
"rooms": [
|
"rooms": [
|
||||||
"#cinny:matrix.org",
|
|
||||||
"#freesoftware:matrix.org",
|
"#freesoftware:matrix.org",
|
||||||
"#pcapdroid:matrix.org",
|
"#pcapdroid:matrix.org",
|
||||||
"#gentoo:matrix.org",
|
"#gentoo:matrix.org",
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<meta property="og:title" content="Paarrot" />
|
<meta property="og:title" content="Paarrot" />
|
||||||
<meta property="og:url" content="https://cinny.in" />
|
<meta property="og:url" content="https://git.ruv.wtf/litruv/cinny-desktop" />
|
||||||
<meta property="og:image" content="https://cinny.in/assets/favicon-48x48.png" />
|
<meta property="og:image" content="./public/res/android/android-chrome-192x192.png" />
|
||||||
<meta
|
<meta
|
||||||
property="og:description"
|
property="og:description"
|
||||||
content="A Matrix client where you can enjoy the conversation using simple, elegant and secure interface protected by e2ee with the power of open source."
|
content="A Matrix client where you can enjoy the conversation using simple, elegant and secure interface protected by e2ee with the power of open source."
|
||||||
|
|||||||
5487
public/res/svg/paarrot-highlight.svg
Normal file
5487
public/res/svg/paarrot-highlight.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 909 KiB |
5487
public/res/svg/paarrot-unread.svg
Normal file
5487
public/res/svg/paarrot-unread.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 909 KiB |
5634
public/res/svg/paarrot.svg
Normal file
5634
public/res/svg/paarrot.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 889 KiB |
@@ -21,7 +21,7 @@ export function SplashScreen({ children }: SplashScreenProps) {
|
|||||||
justifyContent="Center"
|
justifyContent="Center"
|
||||||
>
|
>
|
||||||
<Text size="H2" align="Center">
|
<Text size="H2" align="Center">
|
||||||
Cinny
|
Paarrot
|
||||||
</Text>
|
</Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Page, PageContent, PageHeader } from '../../../components/page';
|
|||||||
import { SequenceCard } from '../../../components/sequence-card';
|
import { SequenceCard } from '../../../components/sequence-card';
|
||||||
import { SequenceCardStyle } from '../styles.css';
|
import { SequenceCardStyle } from '../styles.css';
|
||||||
import { SettingTile } from '../../../components/setting-tile';
|
import { SettingTile } from '../../../components/setting-tile';
|
||||||
import CinnySVG from '../../../../../public/res/svg/cinny.svg';
|
import PaarrotSVG from '../../../../../public/res/svg/paarrot.svg';
|
||||||
import { clearCacheAndReload } from '../../../../client/initMatrix';
|
import { clearCacheAndReload } from '../../../../client/initMatrix';
|
||||||
import { useMatrixClient } from '../../../hooks/useMatrixClient';
|
import { useMatrixClient } from '../../../hooks/useMatrixClient';
|
||||||
|
|
||||||
@@ -38,14 +38,14 @@ export function About({ requestClose }: AboutProps) {
|
|||||||
<Box shrink="No">
|
<Box shrink="No">
|
||||||
<img
|
<img
|
||||||
style={{ width: toRem(60), height: toRem(60) }}
|
style={{ width: toRem(60), height: toRem(60) }}
|
||||||
src={CinnySVG}
|
src={PaarrotSVG}
|
||||||
alt="Cinny logo"
|
alt="Paarrot logo"
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
<Box direction="Column" gap="300">
|
<Box direction="Column" gap="300">
|
||||||
<Box direction="Column" gap="100">
|
<Box direction="Column" gap="100">
|
||||||
<Box gap="100" alignItems="End">
|
<Box gap="100" alignItems="End">
|
||||||
<Text size="H3">Cinny</Text>
|
<Text size="H3">Paarrot</Text>
|
||||||
<Text size="T200">v4.10.2</Text>
|
<Text size="T200">v4.10.2</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Text>Yet another matrix client.</Text>
|
<Text>Yet another matrix client.</Text>
|
||||||
@@ -54,7 +54,7 @@ export function About({ requestClose }: AboutProps) {
|
|||||||
<Box gap="200" wrap="Wrap">
|
<Box gap="200" wrap="Wrap">
|
||||||
<Button
|
<Button
|
||||||
as="a"
|
as="a"
|
||||||
href="https://github.com/cinnyapp/cinny"
|
href="https://git.ruv.wtf/litruv/cinny-desktop"
|
||||||
rel="noreferrer noopener"
|
rel="noreferrer noopener"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
variant="Secondary"
|
variant="Secondary"
|
||||||
@@ -65,19 +65,6 @@ export function About({ requestClose }: AboutProps) {
|
|||||||
>
|
>
|
||||||
<Text size="B300">Source Code</Text>
|
<Text size="B300">Source Code</Text>
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
|
||||||
as="a"
|
|
||||||
href="https://cinny.in/#sponsor"
|
|
||||||
rel="noreferrer noopener"
|
|
||||||
target="_blank"
|
|
||||||
variant="Critical"
|
|
||||||
fill="Soft"
|
|
||||||
size="300"
|
|
||||||
radii="300"
|
|
||||||
before={<Icon src={Icons.Heart} size="100" filled />}
|
|
||||||
>
|
|
||||||
<Text size="B300">Support</Text>
|
|
||||||
</Button>
|
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ function ExportKeys() {
|
|||||||
const blob = new Blob([encKeys], {
|
const blob = new Blob([encKeys], {
|
||||||
type: 'text/plain;charset=us-ascii',
|
type: 'text/plain;charset=us-ascii',
|
||||||
});
|
});
|
||||||
FileSaver.saveAs(blob, 'cinny-keys.txt');
|
FileSaver.saveAs(blob, 'paarrot-keys.txt');
|
||||||
},
|
},
|
||||||
[mx]
|
[mx]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ function EmailNotification() {
|
|||||||
device_display_name: email,
|
device_display_name: email,
|
||||||
lang: 'en',
|
lang: 'en',
|
||||||
data: {
|
data: {
|
||||||
brand: 'Cinny',
|
brand: 'Paarrot',
|
||||||
},
|
},
|
||||||
append: true,
|
append: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,21 +5,18 @@ import * as css from './styles.css';
|
|||||||
export function AuthFooter() {
|
export function AuthFooter() {
|
||||||
return (
|
return (
|
||||||
<Box className={css.AuthFooter} justifyContent="Center" gap="400" wrap="Wrap">
|
<Box className={css.AuthFooter} justifyContent="Center" gap="400" wrap="Wrap">
|
||||||
<Text as="a" size="T300" href="https://cinny.in" target="_blank" rel="noreferrer">
|
<Text as="a" size="T300" href="https://git.ruv.wtf/litruv/cinny-desktop" target="_blank" rel="noreferrer">
|
||||||
About
|
About
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
as="a"
|
as="a"
|
||||||
size="T300"
|
size="T300"
|
||||||
href="https://github.com/ajbura/cinny/releases"
|
href="https://git.ruv.wtf/litruv/cinny-desktop/releases"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
v4.10.2
|
v4.10.2
|
||||||
</Text>
|
</Text>
|
||||||
<Text as="a" size="T300" href="https://twitter.com/cinnyapp" target="_blank" rel="noreferrer">
|
|
||||||
Twitter
|
|
||||||
</Text>
|
|
||||||
<Text as="a" size="T300" href="https://matrix.org" target="_blank" rel="noreferrer">
|
<Text as="a" size="T300" href="https://matrix.org" target="_blank" rel="noreferrer">
|
||||||
Powered by Matrix
|
Powered by Matrix
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
} from '../../hooks/useClientConfig';
|
} from '../../hooks/useClientConfig';
|
||||||
import { AsyncStatus, useAsyncCallback } from '../../hooks/useAsyncCallback';
|
import { AsyncStatus, useAsyncCallback } from '../../hooks/useAsyncCallback';
|
||||||
import { LOGIN_PATH, REGISTER_PATH, RESET_PASSWORD_PATH } from '../paths';
|
import { LOGIN_PATH, REGISTER_PATH, RESET_PASSWORD_PATH } from '../paths';
|
||||||
import CinnySVG from '../../../../public/res/svg/cinny.svg';
|
import PaarrotSVG from '../../../../public/res/svg/paarrot.svg';
|
||||||
import { ServerPicker } from './ServerPicker';
|
import { ServerPicker } from './ServerPicker';
|
||||||
import { AutoDiscoveryAction, autoDiscovery } from '../../cs-api';
|
import { AutoDiscoveryAction, autoDiscovery } from '../../cs-api';
|
||||||
import { SpecVersionsLoader } from '../../components/SpecVersionsLoader';
|
import { SpecVersionsLoader } from '../../components/SpecVersionsLoader';
|
||||||
@@ -134,8 +134,8 @@ export function AuthLayout() {
|
|||||||
<Box direction="Column" className={css.AuthCard}>
|
<Box direction="Column" className={css.AuthCard}>
|
||||||
<Header className={css.AuthHeader} size="600" variant="Surface">
|
<Header className={css.AuthHeader} size="600" variant="Surface">
|
||||||
<Box grow="Yes" direction="Row" gap="300" alignItems="Center">
|
<Box grow="Yes" direction="Row" gap="300" alignItems="Center">
|
||||||
<img className={css.AuthLogo} src={CinnySVG} alt="Cinny Logo" />
|
<img className={css.AuthLogo} src={PaarrotSVG} alt="Paarrot Logo" />
|
||||||
<Text size="H3">Cinny</Text>
|
<Text size="H3">Paarrot</Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Header>
|
</Header>
|
||||||
<Box className={css.AuthCardContent} direction="Column">
|
<Box className={css.AuthCardContent} direction="Column">
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ export function PasswordLoginForm({ defaultUsername, defaultEmail }: PasswordLog
|
|||||||
user: username,
|
user: username,
|
||||||
},
|
},
|
||||||
password,
|
password,
|
||||||
initial_device_display_name: 'Cinny Web',
|
initial_device_display_name: 'Paarrot',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ export function PasswordLoginForm({ defaultUsername, defaultEmail }: PasswordLog
|
|||||||
user: mxIdUsername,
|
user: mxIdUsername,
|
||||||
},
|
},
|
||||||
password,
|
password,
|
||||||
initial_device_display_name: 'Cinny Web',
|
initial_device_display_name: 'Paarrot',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const handleEmailLogin = (email: string, password: string) => {
|
const handleEmailLogin = (email: string, password: string) => {
|
||||||
@@ -163,7 +163,7 @@ export function PasswordLoginForm({ defaultUsername, defaultEmail }: PasswordLog
|
|||||||
address: email,
|
address: email,
|
||||||
},
|
},
|
||||||
password,
|
password,
|
||||||
initial_device_display_name: 'Cinny Web',
|
initial_device_display_name: 'Paarrot',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export function TokenLogin({ token }: TokenLoginProps) {
|
|||||||
startLogin(baseUrl, {
|
startLogin(baseUrl, {
|
||||||
type: 'm.login.token',
|
type: 'm.login.token',
|
||||||
token,
|
token,
|
||||||
initial_device_display_name: 'Cinny Web',
|
initial_device_display_name: 'Paarrot',
|
||||||
});
|
});
|
||||||
}, [baseUrl, token, startLogin]);
|
}, [baseUrl, token, startLogin]);
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ function RegisterUIAFlow({
|
|||||||
auth: authDict,
|
auth: authDict,
|
||||||
password,
|
password,
|
||||||
username,
|
username,
|
||||||
initial_device_display_name: 'Cinny Web',
|
initial_device_display_name: 'Paarrot',
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[onRegister, formData]
|
[onRegister, formData]
|
||||||
@@ -250,7 +250,7 @@ export function PasswordRegisterForm({
|
|||||||
auth: {
|
auth: {
|
||||||
session: authData.session,
|
session: authData.session,
|
||||||
},
|
},
|
||||||
initial_device_display_name: 'Cinny Web',
|
initial_device_display_name: 'Paarrot',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import React, { ReactNode, useCallback, useEffect, useRef } from 'react';
|
|||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import { RoomEvent, RoomEventHandlerMap } from 'matrix-js-sdk';
|
import { RoomEvent, RoomEventHandlerMap } from 'matrix-js-sdk';
|
||||||
import { roomToUnreadAtom, unreadEqual, unreadInfoToUnread } from '../../state/room/roomToUnread';
|
import { roomToUnreadAtom, unreadEqual, unreadInfoToUnread } from '../../state/room/roomToUnread';
|
||||||
import LogoSVG from '../../../../public/res/svg/cinny.svg';
|
import LogoSVG from '../../../../public/res/svg/paarrot.svg';
|
||||||
import LogoUnreadSVG from '../../../../public/res/svg/cinny-unread.svg';
|
import LogoUnreadSVG from '../../../../public/res/svg/paarrot-unread.svg';
|
||||||
import LogoHighlightSVG from '../../../../public/res/svg/cinny-highlight.svg';
|
import LogoHighlightSVG from '../../../../public/res/svg/paarrot-highlight.svg';
|
||||||
import NotificationSound from '../../../../public/sound/notification.ogg';
|
import NotificationSound from '../../../../public/sound/notification.ogg';
|
||||||
import InviteSound from '../../../../public/sound/invite.ogg';
|
import InviteSound from '../../../../public/sound/invite.ogg';
|
||||||
import { notificationPermission, setFavicon } from '../../utils/dom';
|
import { notificationPermission, setFavicon } from '../../utils/dom';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Box, Button, Icon, Icons, Text, config, toRem } from 'folds';
|
import { Box, Button, Icon, Icons, Text, config, toRem } from 'folds';
|
||||||
import { Page, PageHero, PageHeroSection } from '../../components/page';
|
import { Page, PageHero, PageHeroSection } from '../../components/page';
|
||||||
import CinnySVG from '../../../../public/res/svg/cinny.svg';
|
import PaarrotSVG from '../../../../public/res/svg/paarrot.svg';
|
||||||
|
|
||||||
export function WelcomePage() {
|
export function WelcomePage() {
|
||||||
return (
|
return (
|
||||||
@@ -14,13 +14,13 @@ export function WelcomePage() {
|
|||||||
>
|
>
|
||||||
<PageHeroSection>
|
<PageHeroSection>
|
||||||
<PageHero
|
<PageHero
|
||||||
icon={<img width="70" height="70" src={CinnySVG} alt="Cinny Logo" />}
|
icon={<img width="70" height="70" src={PaarrotSVG} alt="Paarrot Logo" />}
|
||||||
title="Welcome to Cinny"
|
title="Welcome to Paarrot"
|
||||||
subTitle={
|
subTitle={
|
||||||
<span>
|
<span>
|
||||||
Yet another matrix client.{' '}
|
Yet another matrix client.{' '}
|
||||||
<a
|
<a
|
||||||
href="https://github.com/cinnyapp/cinny/releases"
|
href="https://git.ruv.wtf/litruv/cinny-desktop/releases"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer noopener"
|
rel="noreferrer noopener"
|
||||||
>
|
>
|
||||||
@@ -33,7 +33,7 @@ export function WelcomePage() {
|
|||||||
<Box grow="Yes" style={{ maxWidth: toRem(300) }} direction="Column" gap="300">
|
<Box grow="Yes" style={{ maxWidth: toRem(300) }} direction="Column" gap="300">
|
||||||
<Button
|
<Button
|
||||||
as="a"
|
as="a"
|
||||||
href="https://github.com/cinnyapp/cinny"
|
href="https://git.ruv.wtf/litruv/cinny-desktop"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer noopener"
|
rel="noreferrer noopener"
|
||||||
before={<Icon size="200" src={Icons.Code} />}
|
before={<Icon size="200" src={Icons.Code} />}
|
||||||
@@ -42,18 +42,6 @@ export function WelcomePage() {
|
|||||||
Source Code
|
Source Code
|
||||||
</Text>
|
</Text>
|
||||||
</Button>
|
</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>
|
|
||||||
Support
|
|
||||||
</Text>
|
|
||||||
</Button>
|
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</PageHero>
|
</PageHero>
|
||||||
|
|||||||
Reference in New Issue
Block a user