signal-desktop/ts/components/About.tsx

67 lines
1.7 KiB
TypeScript
Raw Normal View History

2023-01-03 19:55:46 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
2021-09-17 22:24:21 +00:00
import React from 'react';
2023-03-14 15:55:31 +00:00
import type { ExecuteMenuRoleType } from './TitleBarContainer';
import type { LocalizerType } from '../types/Util';
2023-03-14 15:55:31 +00:00
import { TitleBarContainer } from './TitleBarContainer';
2021-09-17 22:24:21 +00:00
import { useEscapeHandling } from '../hooks/useEscapeHandling';
import { useTheme } from '../hooks/useTheme';
export type PropsType = {
closeAbout: () => unknown;
environment: string;
2023-03-14 15:55:31 +00:00
executeMenuRole: ExecuteMenuRoleType;
hasCustomTitleBar: boolean;
i18n: LocalizerType;
version: string;
};
2022-11-18 00:45:19 +00:00
export function About({
closeAbout,
environment,
executeMenuRole,
2023-03-14 15:55:31 +00:00
hasCustomTitleBar,
i18n,
version,
2022-11-18 00:45:19 +00:00
}: PropsType): JSX.Element {
2021-09-17 22:24:21 +00:00
useEscapeHandling(closeAbout);
const theme = useTheme();
return (
<TitleBarContainer
2022-07-05 16:44:53 +00:00
hasCustomTitleBar={hasCustomTitleBar}
theme={theme}
executeMenuRole={executeMenuRole}
>
<div className="About">
<div className="module-splash-screen">
<div className="module-splash-screen__logo module-img--150" />
<div className="version">{version}</div>
<div className="environment">{environment}</div>
<div>
<a href="https://signal.org">signal.org</a>
</div>
<br />
<div>
<a
className="acknowledgments"
href="https://github.com/signalapp/Signal-Desktop/blob/main/ACKNOWLEDGMENTS.md"
>
2023-03-30 00:03:25 +00:00
{i18n('icu:softwareAcknowledgments')}
</a>
</div>
<div>
<a className="privacy" href="https://signal.org/legal">
2023-03-30 00:03:25 +00:00
{i18n('icu:privacyPolicy')}
</a>
</div>
</div>
</div>
</TitleBarContainer>
);
2022-11-18 00:45:19 +00:00
}