2018-06-10 00:33:23 +02:00
|
|
|
// @flow
|
2022-01-19 13:47:43 +01:00
|
|
|
import { SITE_NAME, SITE_HELP_EMAIL } from 'config';
|
2020-06-22 15:48:35 +02:00
|
|
|
import * as ICONS from 'constants/icons';
|
2018-06-10 00:33:23 +02:00
|
|
|
import * as React from 'react';
|
2018-03-26 23:32:43 +02:00
|
|
|
import Button from 'component/button';
|
|
|
|
import Page from 'component/page';
|
2019-09-27 22:03:05 +02:00
|
|
|
import Card from 'component/common/card';
|
2019-10-01 06:53:33 +02:00
|
|
|
import I18nMessage from 'component/i18nMessage';
|
2022-06-22 18:32:17 +02:00
|
|
|
import { getAuthToken } from 'util/saved-passwords';
|
|
|
|
import CopyableText from 'component/copyableText';
|
2016-04-24 11:00:13 +02:00
|
|
|
|
2022-05-18 11:14:28 +02:00
|
|
|
import * as MODALS from 'constants/modal_types';
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
announcement: string,
|
|
|
|
doOpenModal: (string, ?{}) => void,
|
2022-06-22 18:32:17 +02:00
|
|
|
user: any,
|
2022-05-18 11:14:28 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export default function HelpPage(props: Props) {
|
2022-06-22 18:32:17 +02:00
|
|
|
const { announcement, doOpenModal, user } = props;
|
|
|
|
|
|
|
|
const canViewToken = process.env.ENABLE_WIP_FEATURES || (user && user.internal_feature);
|
|
|
|
|
|
|
|
const authToken = canViewToken && getAuthToken();
|
2022-05-18 11:14:28 +02:00
|
|
|
|
2022-01-19 13:47:43 +01:00
|
|
|
return (
|
|
|
|
<Page className="card-stack">
|
2022-05-18 11:14:28 +02:00
|
|
|
{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>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
|
2022-01-19 13:47:43 +01:00
|
|
|
<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"
|
2021-03-24 17:58:19 +01:00
|
|
|
/>
|
2022-01-19 13:47:43 +01:00
|
|
|
</div>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Card
|
|
|
|
title={__('Find assistance')}
|
|
|
|
subtitle={
|
2022-02-07 16:17:13 +01:00
|
|
|
<I18nMessage tokens={{ channel: <strong>#support</strong>, help_email: SITE_HELP_EMAIL }}>
|
2022-01-19 13:47:43 +01:00
|
|
|
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>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
|
2022-06-06 22:53:36 +02:00
|
|
|
<Card
|
|
|
|
title={__('Email change and account deletion')}
|
|
|
|
subtitle={
|
|
|
|
<I18nMessage tokens={{ channel: <strong>#support</strong>, help_email: SITE_HELP_EMAIL }}>
|
|
|
|
Email address changes and account removal are processed manually on request via email. Email must come from
|
|
|
|
the original email being changed, or we'll need need to verify ownership another way.
|
|
|
|
</I18nMessage>
|
|
|
|
}
|
|
|
|
actions={
|
|
|
|
<Button button="secondary" label={__('Email Us')} icon={ICONS.WEB} href={`mailto:${SITE_HELP_EMAIL}`} />
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
|
2022-01-19 13:47:43 +01:00
|
|
|
<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>
|
|
|
|
}
|
|
|
|
/>
|
2022-06-22 18:32:17 +02:00
|
|
|
|
|
|
|
{canViewToken && authToken && (
|
|
|
|
<Card
|
|
|
|
className="section"
|
|
|
|
title={__('Your Access Token')}
|
|
|
|
actions={
|
|
|
|
<>
|
|
|
|
<CopyableText
|
|
|
|
primaryButton
|
|
|
|
enableInputMask
|
|
|
|
name="access-token"
|
|
|
|
label={__('Authentication Token - do not share, this works like a password!')}
|
|
|
|
copyable={authToken}
|
|
|
|
snackMessage={__('Copied token')}
|
|
|
|
/>
|
|
|
|
</>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
)}
|
2022-01-19 13:47:43 +01:00
|
|
|
</Page>
|
|
|
|
);
|
2017-05-17 10:10:25 +02:00
|
|
|
}
|