lbry-desktop/ui/page/help/view.jsx
infinite-persistence d70f0f1d6d
Add "What's New" button in the Help Page
This allows user to re-access the modal if they accidentally dismissed it, never got it (bug?), or simply just want to see it again.
2022-05-20 00:04:07 +08:00

86 lines
2.7 KiB
JavaScript

// @flow
import { SITE_NAME, SITE_HELP_EMAIL } from 'config';
import * as ICONS from 'constants/icons';
import * as React from 'react';
import Button from 'component/button';
import Page from 'component/page';
import Card from 'component/common/card';
import I18nMessage from 'component/i18nMessage';
import * as MODALS from 'constants/modal_types';
type Props = {
announcement: string,
doOpenModal: (string, ?{}) => void,
};
export default function HelpPage(props: Props) {
const { announcement, doOpenModal } = props;
return (
<Page className="card-stack">
{announcement && (
<Card
title={__("What's New")}
subtitle={__('See what are the latest features and changes in Odysee.')}
actions={
<div className="section__actions">
<Button
label={__("What's New")}
icon={ICONS.FEEDBACK}
button="secondary"
onClick={() => doOpenModal(MODALS.ANNOUNCEMENTS)}
/>
</div>
}
/>
)}
<Card
title={__('Visit the %SITE_NAME% Help Hub', { SITE_NAME })}
subtitle={__('Our support posts answer many common questions.')}
actions={
<div className="section__actions">
<Button
href="https://odysee.com/@OdyseeHelp:b"
label={__('View %SITE_NAME% Help Hub', { SITE_NAME })}
icon={ICONS.HELP}
button="secondary"
/>
</div>
}
/>
<Card
title={__('Find assistance')}
subtitle={
<I18nMessage tokens={{ channel: <strong>#support</strong>, help_email: SITE_HELP_EMAIL }}>
Live help is available most hours in the %channel% channel of our Discord chat room. Or you can always email
us at %help_email%.
</I18nMessage>
}
actions={
<div className="section__actions">
<Button
button="secondary"
label={__('Join our Discord')}
icon={ICONS.CHAT}
href="https://chat.odysee.com"
/>
<Button button="secondary" label={__('Email Us')} icon={ICONS.WEB} href={`mailto:${SITE_HELP_EMAIL}`} />
</div>
}
/>
<Card
title={__('Report a bug or suggest something')}
subtitle={__('Did you find something wrong? Think Odysee could add something useful and cool?')}
actions={
<div className="section__actions">
<Button navigate="/$/report" label={__('Submit Feedback')} icon={ICONS.FEEDBACK} button="secondary" />
</div>
}
/>
</Page>
);
}