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.
This commit is contained in:
infinite-persistence 2022-05-18 17:14:28 +08:00
parent 3719a73c81
commit d70f0f1d6d
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0
3 changed files with 41 additions and 2 deletions

View file

@ -2259,6 +2259,8 @@
"Still Valid Until": "Still Valid Until", "Still Valid Until": "Still Valid Until",
"Active channel": "Active channel", "Active channel": "Active channel",
"Select your default active channel": "Select your default active channel", "Select your default active channel": "Select your default active channel",
"What's New": "What's New",
"See what are the latest features and changes in Odysee.": "See what are the latest features and changes in Odysee.",
"This account has livestreaming disabled, please reach out to hello@odysee.com for assistance.": "This account has livestreaming disabled, please reach out to hello@odysee.com for assistance.", "This account has livestreaming disabled, please reach out to hello@odysee.com for assistance.": "This account has livestreaming disabled, please reach out to hello@odysee.com for assistance.",
"Attach images by pasting or drag-and-drop.": "Attach images by pasting or drag-and-drop.", "Attach images by pasting or drag-and-drop.": "Attach images by pasting or drag-and-drop.",
"There was a network error, but the publish may have been completed. Wait a few minutes, then check your Uploads or Wallet page to confirm.": "There was a network error, but the publish may have been completed. Wait a few minutes, then check your Uploads or Wallet page to confirm.", "There was a network error, but the publish may have been completed. Wait a few minutes, then check your Uploads or Wallet page to confirm.": "There was a network error, but the publish may have been completed. Wait a few minutes, then check your Uploads or Wallet page to confirm.",

View file

@ -1,3 +1,14 @@
import HelpPage from './view'; import HelpPage from './view';
import { connect } from 'react-redux';
import { doOpenModal } from 'redux/actions/app';
import { selectHomepageAnnouncement } from 'redux/selectors/settings';
export default HelpPage; const select = (state) => ({
announcement: selectHomepageAnnouncement(state),
});
const perform = {
doOpenModal,
};
export default connect(select, perform)(HelpPage);

View file

@ -7,9 +7,35 @@ import Page from 'component/page';
import Card from 'component/common/card'; import Card from 'component/common/card';
import I18nMessage from 'component/i18nMessage'; import I18nMessage from 'component/i18nMessage';
export default function HelpPage() { 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 ( return (
<Page className="card-stack"> <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 <Card
title={__('Visit the %SITE_NAME% Help Hub', { SITE_NAME })} title={__('Visit the %SITE_NAME% Help Hub', { SITE_NAME })}
subtitle={__('Our support posts answer many common questions.')} subtitle={__('Our support posts answer many common questions.')}