Skip to content

Commit

Permalink
Jetpack Dashboard: disable VideoPress card in offline mode (#34465)
Browse files Browse the repository at this point in the history
Fully disable VideoPress card on Jetpack Dashboard in Offline Mode.
  • Loading branch information
sergeymitr authored Dec 6, 2023
1 parent 4c36d83 commit 9fd15c7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
6 changes: 5 additions & 1 deletion projects/plugins/jetpack/_inc/client/at-a-glance/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
padding: 0;
}
}

.jp-dash-item__content .jp-support-info {
top: auto;
}
}

.jp-dash-section-header.jp-dash-section-header-stats {
Expand Down Expand Up @@ -672,7 +676,7 @@ a.jp-dash-item__manage-in-wpcom,
display: flex;
flex-direction: row;
}

.dash-backup-undo__activity-log-user-meta-avatar {
display: flex;
margin-right: 8px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class DashVideoPress extends Component {
/* dummy arg to avoid bad minification */ 0
);

if ( this.props.getOptionValue( 'videopress' ) && hasConnectedOwner ) {
if ( this.props.getOptionValue( 'videopress' ) && hasConnectedOwner && ! isOffline ) {
return (
<DashItem
className="jp-dash-item__videopress"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,17 @@ export class DashItem extends Component {
if ( '' !== this.props.module ) {
toggle =
( includes(
[ 'monitor', 'protect', 'photon', 'vaultpress', 'scan', 'backups', 'akismet', 'search' ],
[
'monitor',
'protect',
'photon',
'vaultpress',
'scan',
'backups',
'akismet',
'search',
'videopress',
],
this.props.module
) &&
this.props.isOfflineMode ) ||
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: bugfix

Dashboard: disable VideoPress card in offline mode.

0 comments on commit 9fd15c7

Please sign in to comment.