Skip to content

Commit

Permalink
Merge pull request #35 from material-components/fix/13-dialog-styles
Browse files Browse the repository at this point in the history
Fix/13 dialog styles
  • Loading branch information
ravichdev committed Apr 8, 2021
2 parents fe355a3 + d371453 commit 3168e21
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions plugin/assets/css/src/settings/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

@import "@material/dialog/dist/mdc.dialog.css";
@import "./base.css";
@import "./updater.css";
@import "./switch.css";
Expand Down
1 change: 0 additions & 1 deletion plugin/assets/src/common/components/dialog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
import classNames from 'classnames';
import { MDCDialog } from '@material/dialog';
import '@material/dialog/dist/mdc.dialog.css';

/**
* WordPress dependencies
Expand Down
10 changes: 9 additions & 1 deletion plugin/assets/src/settings/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const ACTIONS = {
SET_UPDATED: 'SET_UPDATED',
};

export const UPDATERS = {
const ASSET_UPDATES = {
FONTS: {
title: __( 'Google Fonts', 'material-design' ),
type: 'FONTS',
Expand All @@ -51,6 +51,9 @@ export const UPDATERS = {
updateAvailable: 'update' === getConfig( 'iconsUpdateStatus' ),
autoUpdates: parseInt( getConfig( 'iconsAutoUpdate' ), 10 ),
},
};

const CORE_UPDATES = {
PLUGIN: {
title: __( 'Material Design Plugin', 'material-design' ),
type: 'PLUGIN',
Expand All @@ -73,4 +76,9 @@ export const UPDATERS = {
},
};

export const UPDATERS = {
...ASSET_UPDATES,
...( getConfig( 'coreUpdatesEnabled' ) ? CORE_UPDATES : {} ),
};

export const KEY_PLACEHOLDER = '•••••••••••••••••••••••••••••';
1 change: 1 addition & 0 deletions plugin/php/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ public function enqueue_assets() {
'themeAutoUpdate' => in_array( Plugin::THEME_SLUG, get_site_option( 'auto_update_themes', [] ), true ),
'pluginUpdateStatus' => $plugin_status,
'themeUpdateStatus' => $theme_status,
'coreUpdatesEnabled' => version_compare( get_bloginfo( 'version' ), '5.5', '>=' ),
'coreUpdateUrl' => admin_url( 'update-core.php' ),
'autoUpdateNonce' => wp_create_nonce( 'updates' ),
'autoUpdateUrl' => admin_url( 'admin-ajax.php' ),
Expand Down

0 comments on commit 3168e21

Please sign in to comment.