- client: 2152 Do not show dashboard buttons on mobile screen, fix buttons on DNS block/allow lists pages

#2152

* commit '72ab51bce0dd0b892acc797689f0cd32d779fd9f':
  - client: 2152 Do not show dashboard buttons on mobile screen, fix buttons on DNS block/allow lists pages
This commit is contained in:
Artem Baskal 2020-10-09 19:19:14 +03:00
commit 20226edbe3
2 changed files with 12 additions and 24 deletions

View File

@ -71,9 +71,3 @@ body {
.button-action--active { .button-action--active {
visibility: visible; visibility: visible;
} }
@media (max-width: 500px) {
.dashboard .button-action {
visibility: visible;
}
}

View File

@ -4,29 +4,23 @@ import { withTranslation, Trans } from 'react-i18next';
const Actions = ({ const Actions = ({
handleAdd, handleRefresh, processingRefreshFilters, whitelist, handleAdd, handleRefresh, processingRefreshFilters, whitelist,
}) => ( }) => <div className="card-actions">
<div className="card-actions"> <button
<button className="btn btn-success btn-standard mr-2 btn-large mb-2"
className="btn btn-success btn-standard mr-2 btn-large"
type="submit" type="submit"
onClick={handleAdd} onClick={handleAdd}
> >
{whitelist ? ( {whitelist ? <Trans>add_allowlist</Trans> : <Trans>add_blocklist</Trans>}
<Trans>add_allowlist</Trans> </button>
) : ( <button
<Trans>add_blocklist</Trans> className="btn btn-primary btn-standard mb-2"
)}
</button>
<button
className="btn btn-primary btn-standard"
type="submit" type="submit"
onClick={handleRefresh} onClick={handleRefresh}
disabled={processingRefreshFilters} disabled={processingRefreshFilters}
> >
<Trans>check_updates_btn</Trans> <Trans>check_updates_btn</Trans>
</button> </button>
</div> </div>;
);
Actions.propTypes = { Actions.propTypes = {
handleAdd: PropTypes.func.isRequired, handleAdd: PropTypes.func.isRequired,