Delete ColumnBackButtonSlim, fix runtime warnings
This commit is contained in:
parent
a8dfe1262b
commit
ef809a8d59
|
@ -1,11 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import ColumnBackButtonSlim from '../column_back_button_slim';
|
|
||||||
import { createComponent } from 'soapbox/test_helpers';
|
|
||||||
|
|
||||||
describe('<ColumnBackButtonSlim />', () => {
|
|
||||||
it('renders correctly', () => {
|
|
||||||
const component = createComponent(<ColumnBackButtonSlim />);
|
|
||||||
const tree = component.toJSON();
|
|
||||||
expect(tree).toMatchSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,19 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import { FormattedMessage } from 'react-intl';
|
|
||||||
import ColumnBackButton from './column_back_button';
|
|
||||||
import Icon from 'soapbox/components/icon';
|
|
||||||
|
|
||||||
export default class ColumnBackButtonSlim extends ColumnBackButton {
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div className='column-back-button--slim'>
|
|
||||||
<div role='button' tabIndex='0' onClick={this.handleClick} onKeyUp={this.handleKeyUp} className='column-back-button column-back-button--slim-button'>
|
|
||||||
<Icon id='chevron-left' className='column-back-button__icon' fixedWidth />
|
|
||||||
<FormattedMessage id='column_back_button.label' defaultMessage='Back' />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -79,7 +79,7 @@ export default class SubNavigation extends React.PureComponent {
|
||||||
onKeyUp={this.handleBackKeyUp}
|
onKeyUp={this.handleBackKeyUp}
|
||||||
>
|
>
|
||||||
<Icon src={require('@tabler/icons/icons/arrow-back.svg')} />
|
<Icon src={require('@tabler/icons/icons/arrow-back.svg')} />
|
||||||
<FormattedMessage id='sub_navigation.back' defaultMessage='Back' />
|
<FormattedMessage id='column_back_button.label' defaultMessage='Back' />
|
||||||
</button>
|
</button>
|
||||||
{message && (
|
{message && (
|
||||||
<div className='sub-navigation__message'>
|
<div className='sub-navigation__message'>
|
||||||
|
|
|
@ -44,7 +44,7 @@ class AwaitingApproval extends ImmutablePureComponent {
|
||||||
const showLoading = isLoading && accountIds.count() === 0;
|
const showLoading = isLoading && accountIds.count() === 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='user' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='user' heading={intl.formatMessage(messages.heading)}>
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
showLoading={showLoading}
|
showLoading={showLoading}
|
||||||
|
|
|
@ -80,7 +80,7 @@ class Dashboard extends ImmutablePureComponent {
|
||||||
if (!account) return null;
|
if (!account) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='tachometer-alt' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='tachometer-alt' heading={intl.formatMessage(messages.heading)}>
|
||||||
<div className='dashcounters'>
|
<div className='dashcounters'>
|
||||||
{mau && <div className='dashcounter'>
|
{mau && <div className='dashcounter'>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -60,7 +60,7 @@ class ModerationLog extends ImmutablePureComponent {
|
||||||
const showLoading = isLoading && items.count() === 0;
|
const showLoading = isLoading && items.count() === 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='balance-scale' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='balance-scale' heading={intl.formatMessage(messages.heading)}>
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
showLoading={showLoading}
|
showLoading={showLoading}
|
||||||
|
|
|
@ -52,7 +52,7 @@ class Aliases extends ImmutablePureComponent {
|
||||||
const emptyMessage = <FormattedMessage id='empty_column.aliases' defaultMessage="You haven't created any account alias yet." />;
|
const emptyMessage = <FormattedMessage id='empty_column.aliases' defaultMessage="You haven't created any account alias yet." />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column className='aliases-settings-panel' icon='suitcase' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column className='aliases-settings-panel' icon='suitcase' heading={intl.formatMessage(messages.heading)}>
|
||||||
<ColumnSubheading text={intl.formatMessage(messages.subheading_add_new)} />
|
<ColumnSubheading text={intl.formatMessage(messages.subheading_add_new)} />
|
||||||
<Search />
|
<Search />
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,7 +54,7 @@ class Blocks extends ImmutablePureComponent {
|
||||||
const emptyMessage = <FormattedMessage id='empty_column.blocks' defaultMessage="You haven't blocked any users yet." />;
|
const emptyMessage = <FormattedMessage id='empty_column.blocks' defaultMessage="You haven't blocked any users yet." />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='ban' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='ban' heading={intl.formatMessage(messages.heading)}>
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='blocks'
|
scrollKey='blocks'
|
||||||
onLoadMore={this.handleLoadMore}
|
onLoadMore={this.handleLoadMore}
|
||||||
|
|
|
@ -36,7 +36,7 @@ class CryptoDonate extends ImmutablePureComponent {
|
||||||
const { explanationBoxExpanded } = this.state;
|
const { explanationBoxExpanded } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='bitcoin' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='bitcoin' heading={intl.formatMessage(messages.heading)}>
|
||||||
<div className='crypto-donate'>
|
<div className='crypto-donate'>
|
||||||
<div className='explanation-box'>
|
<div className='explanation-box'>
|
||||||
<Accordion
|
<Accordion
|
||||||
|
|
|
@ -55,7 +55,7 @@ class Blocks extends ImmutablePureComponent {
|
||||||
const emptyMessage = <FormattedMessage id='empty_column.domain_blocks' defaultMessage='There are no hidden domains yet.' />;
|
const emptyMessage = <FormattedMessage id='empty_column.domain_blocks' defaultMessage='There are no hidden domains yet.' />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='minus-circle' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='minus-circle' heading={intl.formatMessage(messages.heading)}>
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='domain_blocks'
|
scrollKey='domain_blocks'
|
||||||
onLoadMore={this.handleLoadMore}
|
onLoadMore={this.handleLoadMore}
|
||||||
|
|
|
@ -230,7 +230,7 @@ class EditProfile extends ImmutablePureComponent {
|
||||||
const canEditName = verifiedCanEditName || !verified;
|
const canEditName = verifiedCanEditName || !verified;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='user' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='user' heading={intl.formatMessage(messages.heading)}>
|
||||||
<SimpleForm onSubmit={this.handleSubmit}>
|
<SimpleForm onSubmit={this.handleSubmit}>
|
||||||
<fieldset disabled={this.state.isLoading}>
|
<fieldset disabled={this.state.isLoading}>
|
||||||
<FieldsGroup>
|
<FieldsGroup>
|
||||||
|
|
|
@ -52,7 +52,7 @@ class ExportData extends ImmutablePureComponent {
|
||||||
const { intl } = this.props;
|
const { intl } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='cloud-download-alt' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='cloud-download-alt' heading={intl.formatMessage(messages.heading)}>
|
||||||
<CSVExporter action={exportFollows} messages={followMessages} />
|
<CSVExporter action={exportFollows} messages={followMessages} />
|
||||||
<CSVExporter action={exportBlocks} messages={blockMessages} />
|
<CSVExporter action={exportBlocks} messages={blockMessages} />
|
||||||
<CSVExporter action={exportMutes} messages={muteMessages} />
|
<CSVExporter action={exportMutes} messages={muteMessages} />
|
||||||
|
|
|
@ -50,7 +50,7 @@ class FederationRestrictions extends ImmutablePureComponent {
|
||||||
const emptyMessage = disclosed ? messages.emptyMessage : messages.notDisclosed;
|
const emptyMessage = disclosed ? messages.emptyMessage : messages.notDisclosed;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='gavel' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='gavel' heading={intl.formatMessage(messages.heading)}>
|
||||||
<div className='explanation-box'>
|
<div className='explanation-box'>
|
||||||
<Accordion
|
<Accordion
|
||||||
headline={intl.formatMessage(messages.boxTitle)}
|
headline={intl.formatMessage(messages.boxTitle)}
|
||||||
|
|
|
@ -133,7 +133,7 @@ class Filters extends ImmutablePureComponent {
|
||||||
const emptyMessage = <FormattedMessage id='empty_column.filters' defaultMessage="You haven't created any muted words yet." />;
|
const emptyMessage = <FormattedMessage id='empty_column.filters' defaultMessage="You haven't created any muted words yet." />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column className='filter-settings-panel' icon='filter' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column className='filter-settings-panel' icon='filter' heading={intl.formatMessage(messages.heading)}>
|
||||||
<ColumnSubheading text={intl.formatMessage(messages.subheading_add_new)} />
|
<ColumnSubheading text={intl.formatMessage(messages.subheading_add_new)} />
|
||||||
<SimpleForm>
|
<SimpleForm>
|
||||||
<div className='filter-settings-panel'>
|
<div className='filter-settings-panel'>
|
||||||
|
|
|
@ -54,7 +54,7 @@ class FollowRequests extends ImmutablePureComponent {
|
||||||
const emptyMessage = <FormattedMessage id='empty_column.follow_requests' defaultMessage="You don't have any follow requests yet. When you receive one, it will show up here." />;
|
const emptyMessage = <FormattedMessage id='empty_column.follow_requests' defaultMessage="You don't have any follow requests yet. When you receive one, it will show up here." />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='user-plus' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='user-plus' heading={intl.formatMessage(messages.heading)}>
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='follow_requests'
|
scrollKey='follow_requests'
|
||||||
onLoadMore={this.handleLoadMore}
|
onLoadMore={this.handleLoadMore}
|
||||||
|
|
|
@ -52,7 +52,7 @@ class ImportData extends ImmutablePureComponent {
|
||||||
const { intl, features } = this.props;
|
const { intl, features } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='cloud-upload-alt' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='cloud-upload-alt' heading={intl.formatMessage(messages.heading)}>
|
||||||
<CSVImporter action={importFollows} messages={followMessages} />
|
<CSVImporter action={importFollows} messages={followMessages} />
|
||||||
<CSVImporter action={importBlocks} messages={blockMessages} />
|
<CSVImporter action={importBlocks} messages={blockMessages} />
|
||||||
{features.importMutes && <CSVImporter action={importMutes} messages={muteMessages} />}
|
{features.importMutes && <CSVImporter action={importMutes} messages={muteMessages} />}
|
||||||
|
|
|
@ -60,7 +60,7 @@ class Lists extends ImmutablePureComponent {
|
||||||
const emptyMessage = <FormattedMessage id='empty_column.lists' defaultMessage="You don't have any lists yet. When you create one, it will show up here." />;
|
const emptyMessage = <FormattedMessage id='empty_column.lists' defaultMessage="You don't have any lists yet. When you create one, it will show up here." />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='list-ul' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='list-ul' heading={intl.formatMessage(messages.heading)}>
|
||||||
<br />
|
<br />
|
||||||
<ColumnSubheading text={intl.formatMessage(messages.add)} />
|
<ColumnSubheading text={intl.formatMessage(messages.add)} />
|
||||||
<NewListForm />
|
<NewListForm />
|
||||||
|
|
|
@ -54,7 +54,7 @@ class Mutes extends ImmutablePureComponent {
|
||||||
const emptyMessage = <FormattedMessage id='empty_column.mutes' defaultMessage="You haven't muted any users yet." />;
|
const emptyMessage = <FormattedMessage id='empty_column.mutes' defaultMessage="You haven't muted any users yet." />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='volume-off' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='volume-off' heading={intl.formatMessage(messages.heading)}>
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='mutes'
|
scrollKey='mutes'
|
||||||
onLoadMore={this.handleLoadMore}
|
onLoadMore={this.handleLoadMore}
|
||||||
|
|
|
@ -131,7 +131,7 @@ class Preferences extends ImmutablePureComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='cog' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='cog' heading={intl.formatMessage(messages.heading)}>
|
||||||
<SimpleForm>
|
<SimpleForm>
|
||||||
<FieldsGroup>
|
<FieldsGroup>
|
||||||
<SelectDropdown
|
<SelectDropdown
|
||||||
|
|
|
@ -51,7 +51,7 @@ class ScheduledStatuses extends ImmutablePureComponent {
|
||||||
const emptyMessage = <FormattedMessage id='empty_column.scheduled_statuses' defaultMessage="You don't have any scheduled statuses yet. When you add one, it will show up here." />;
|
const emptyMessage = <FormattedMessage id='empty_column.scheduled_statuses' defaultMessage="You don't have any scheduled statuses yet. When you add one, it will show up here." />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='calendar' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='calendar' heading={intl.formatMessage(messages.heading)}>
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='scheduled_statuses'
|
scrollKey='scheduled_statuses'
|
||||||
emptyMessage={emptyMessage}
|
emptyMessage={emptyMessage}
|
||||||
|
|
|
@ -79,7 +79,7 @@ class SecurityForm extends ImmutablePureComponent {
|
||||||
const { intl } = this.props;
|
const { intl } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='lock' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='lock' heading={intl.formatMessage(messages.heading)}>
|
||||||
<ChangeEmailForm />
|
<ChangeEmailForm />
|
||||||
<ChangePasswordForm />
|
<ChangePasswordForm />
|
||||||
<SetUpMfa />
|
<SetUpMfa />
|
||||||
|
|
|
@ -88,7 +88,7 @@ class MfaForm extends ImmutablePureComponent {
|
||||||
const { displayOtpForm } = this.state;
|
const { displayOtpForm } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='lock' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='lock' heading={intl.formatMessage(messages.heading)}>
|
||||||
<ColumnSubheading text={intl.formatMessage(messages.subheading)} />
|
<ColumnSubheading text={intl.formatMessage(messages.subheading)} />
|
||||||
{ settings.get('otpEnabled') === true && <DisableOtpForm />}
|
{ settings.get('otpEnabled') === true && <DisableOtpForm />}
|
||||||
{ settings.get('otpEnabled') === false && <EnableOtpForm handleSetupProceedClick={this.handleSetupProceedClick} />}
|
{ settings.get('otpEnabled') === false && <EnableOtpForm handleSetupProceedClick={this.handleSetupProceedClick} />}
|
||||||
|
|
|
@ -27,7 +27,7 @@ class ServerInfo extends ImmutablePureComponent {
|
||||||
const { intl, instance } = this.props;
|
const { intl, instance } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='info' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='info' heading={intl.formatMessage(messages.heading)}>
|
||||||
<div className='info_column_area'>
|
<div className='info_column_area'>
|
||||||
<div className='info__brand'>
|
<div className='info__brand'>
|
||||||
<div className='brand'>
|
<div className='brand'>
|
||||||
|
|
|
@ -219,7 +219,7 @@ class SoapboxConfig extends ImmutablePureComponent {
|
||||||
const soapbox = this.getSoapboxConfig();
|
const soapbox = this.getSoapboxConfig();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column icon='cog' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
<Column icon='cog' heading={intl.formatMessage(messages.heading)}>
|
||||||
<SimpleForm onSubmit={this.handleSubmit}>
|
<SimpleForm onSubmit={this.handleSubmit}>
|
||||||
<fieldset disabled={this.state.isLoading}>
|
<fieldset disabled={this.state.isLoading}>
|
||||||
<SitePreview soapbox={soapbox} />
|
<SitePreview soapbox={soapbox} />
|
||||||
|
|
|
@ -170,7 +170,7 @@ class ProfileInfoPanel extends ImmutablePureComponent {
|
||||||
|
|
||||||
{fields.map((pair, i) =>
|
{fields.map((pair, i) =>
|
||||||
isTicker(pair.get('name', '')) ? (
|
isTicker(pair.get('name', '')) ? (
|
||||||
<BundleContainer fetchComponent={CryptoAddress}>
|
<BundleContainer fetchComponent={CryptoAddress} key={i}>
|
||||||
{Component => (
|
{Component => (
|
||||||
<Component
|
<Component
|
||||||
key={i}
|
key={i}
|
||||||
|
|
Loading…
Reference in New Issue