Skip to content

Commit

Permalink
Protect: Update Scan History extension types (#40548)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmyta authored and nateweller committed Dec 18, 2024
1 parent a5aad57 commit 32e9291
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 32 deletions.
4 changes: 4 additions & 0 deletions projects/plugins/protect/src/class-scan-history.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ private static function normalize_api_data( $scan_data ) {
}

foreach ( $scan_data->threats as $source_threat ) {
if ( ! empty( $source_threat->extension ) && in_array( $source_threat->extension->type, array( 'plugin', 'theme' ), true ) ) {
$source_threat->extension->type .= 's';
}

$history->threats[] = new Threat_Model( $source_threat );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const ShareData = () => {
<div className={ styles[ 'share-data' ] }>
<Title mb={ 0 }>{ __( 'Share data with Jetpack', 'jetpack-protect' ) }</Title>
<ToggleControl
className={ styles[ 'share-data-toggle' ] }
checked={ !! jetpackWafShareData }
onChange={ handleShareDataChange }
disabled={ isUpdating }
Expand All @@ -81,7 +80,6 @@ const ShareData = () => {
) }
/>
<ToggleControl
className={ styles[ 'share-data-toggle' ] }
checked={ !! jetpackWafShareDebugData }
onChange={ handleShareDebugDataChange }
disabled={ isUpdating }
Expand Down
30 changes: 0 additions & 30 deletions projects/plugins/protect/src/js/routes/firewall/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -171,36 +171,6 @@
white-space: nowrap;
}

@media ( max-width: 1115px ) {
.stat-card-wrapper {
margin-top: calc( var( --spacing-base ) * 3 ); // 24px
}
}

@media ( max-width: 599px ) {
.stat-card-wrapper {
margin-top: calc( var( --spacing-base ) * 3 ); // 24px

>:first-child {
margin-right: 0;
margin-bottom: var( --spacing-base ); // 8px
}
}

.stat-card-icon {
margin-bottom: 0;
}
}

.share-data-section {
display: flex;

.share-data-toggle {
margin-top: calc( var( --spacing-base ) / 2 ); // 4px
margin-right: var( --spacing-base ); // 8px
}
}

.icon-tooltip {
max-height: 20px;
margin-left: calc( var( --spacing-base ) / 2 ); // 4px
Expand Down

0 comments on commit 32e9291

Please sign in to comment.