Skip to content

Commit

Permalink
Add Change Theme link to My Home's Quick Links
Browse files Browse the repository at this point in the history
  • Loading branch information
taipeicoder committed Dec 26, 2024
1 parent cf23ccd commit d47dc87
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
23 changes: 12 additions & 11 deletions client/my-sites/customer-home/cards/actions/quick-links/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import './style.scss';
export const QuickLinks = ( {
canEditPages,
canCustomize,
canSwitchThemes,
canManageSite,
canModerateComments,
customizeUrl,
Expand Down Expand Up @@ -178,15 +177,6 @@ export const QuickLinks = ( {
/>
</>
) }
{ canSwitchThemes && (
<ActionBox
href={ `/themes/${ siteSlug }` }
hideLinkIndicator
onClick={ trackChangeThemeAction }
label={ translate( 'Change theme' ) }
materialIcon="view_quilt"
/>
) }
{ canManageSite && ! isWpcomStagingSite && (
<>
{ canAddEmail ? (
Expand Down Expand Up @@ -227,6 +217,18 @@ export const QuickLinks = ( {
) }
{ canManageSite && (
<>
<ActionBox
href={ usesWpAdminInterface ? `${ siteAdminUrl }themes.php` : `/themes/${ siteSlug }` }
hideLinkIndicator
onClick={ trackChangeThemeAction }
label={ translate( 'Change theme' ) }
iconComponent={
<span
className="quick-links__action-box-icon dashicons dashicons-admin-appearance"
aria-hidden
/>
}
/>
<ActionBox
href={
usesWpAdminInterface ? `${ siteAdminUrl }plugins.php` : `/plugins/${ siteSlug }`
Expand Down Expand Up @@ -479,7 +481,6 @@ const mapStateToProps = ( state ) => {
siteId,
canEditPages: canCurrentUser( state, siteId, 'edit_pages' ),
canCustomize: canCurrentUser( state, siteId, 'customize' ),
canSwitchThemes: canCurrentUser( state, siteId, 'switch_themes' ),
canManageSite: canCurrentUser( state, siteId, 'manage_options' ),
canModerateComments: canCurrentUser( state, siteId, 'moderate_comments' ),
customizeUrl: getCustomizerUrl( state, siteId ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@

&.dashicons {
color: var(--color-neutral-80);

&.dashicons-admin-appearance {
color: var(--color-neutral-60);
line-height: 24px;
}
}
}

Expand Down

0 comments on commit d47dc87

Please sign in to comment.