diff --git a/ghost/admin/app/components/settings/audit-log/event-filter.hbs b/ghost/admin/app/components/settings/audit-log/event-filter.hbs index c94feb1ec1..9330236474 100644 --- a/ghost/admin/app/components/settings/audit-log/event-filter.hbs +++ b/ghost/admin/app/components/settings/audit-log/event-filter.hbs @@ -6,38 +6,57 @@ - + {{!-- NOTE: re-using ember-power-select-options styles --}} diff --git a/ghost/admin/app/components/settings/audit-log/event-filter.js b/ghost/admin/app/components/settings/audit-log/event-filter.js index 8dd493b795..f0c25cfce8 100644 --- a/ghost/admin/app/components/settings/audit-log/event-filter.js +++ b/ghost/admin/app/components/settings/audit-log/event-filter.js @@ -2,18 +2,18 @@ import Component from '@glimmer/component'; import {action} from '@ember/object'; const ALL_EVENT_TYPES = [ - {event: 'added', name: 'Added'}, - {event: 'edited', name: 'Edited'}, - {event: 'deleted', name: 'Deleted'} + {event: 'added', name: 'Added', icon: 'add'}, + {event: 'edited', name: 'Edited', icon: 'pen'}, + {event: 'deleted', name: 'Deleted', icon: 'trash'} ]; const ALL_RESOURCE_TYPES = [ - {targets: 'post', name: 'Posts'}, - {targets: 'page', name: 'Pages'}, - {targets: 'tag', name: 'Tags'}, - {targets: 'label,member', name: 'Members'}, - {targets: 'offer,product', name: 'Tiers & offers'}, - {targets: 'api_key,integration,setting,user,webhook', name: 'Settings & users'} + {targets: 'post', name: 'Posts', icon: 'posts'}, + {targets: 'page', name: 'Pages', icon: 'page'}, + {targets: 'tag', name: 'Tags', icon: 'tag'}, + {targets: 'label,member', name: 'Members', icon: 'members'}, + {targets: 'offer,product', name: 'Tiers & offers', icon: 'percentage'}, + {targets: 'api_key,integration,setting,user,webhook', name: 'Settings & users', icon: 'settings'} ]; export default class AuditLogEventFilter extends Component { @@ -26,6 +26,7 @@ export default class AuditLogEventFilter extends Component { return ALL_EVENT_TYPES.map(type => ({ event: type.event, name: type.name, + icon: type.icon, isSelected: !excludedEvents.includes(type.event) })); } @@ -36,6 +37,7 @@ export default class AuditLogEventFilter extends Component { return ALL_RESOURCE_TYPES.map(type => ({ targets: type.targets, name: type.name, + icon: type.icon, isSelected: !type.targets.split(',').every(t => excludedResources.includes(t)) })); } diff --git a/ghost/admin/app/styles/layouts/settings.css b/ghost/admin/app/styles/layouts/settings.css index b995421b6d..cad69b7de1 100644 --- a/ghost/admin/app/styles/layouts/settings.css +++ b/ghost/admin/app/styles/layouts/settings.css @@ -2867,6 +2867,50 @@ p.theme-validation-details { /* Audit log /* ---------------------------------------------------------- */ +.gh-audit-log-filter-li { + height: 32px; +} + +.gh-audit-log-filter-li svg { + margin-right: 6px; +} + +.gh-activity-log-actions { + padding-top: 12px; + padding-bottom: 12px; +} + +.gh-activity-log-actions ul { + width: 240px; +} + +.gh-activity-log-actions hr { + margin: 12px -20px; +} + +.gh-activity-log-action-switch.for-switch.small label { + display: flex; + align-items: center; + justify-content: space-between; + width: unset !important; + height: unset !important; +} + +.gh-activity-log-action-switch.for-switch.small .input-toggle-component { + position: relative; + width: 30px!important; + height: 18px!important; +} + +.gh-activity-log-action-switch.for-switch.small .input-toggle-component:before { + width: 14px !important; + height: 14px !important; +} + +.gh-activity-log-action-switch.for-switch.small input:checked+.input-toggle-component:before { + transform: translateX(12px); +} + .gh-audit-log-container { display: flex; align-items: center; @@ -2973,8 +3017,4 @@ p.theme-validation-details { font-size: 1.4rem !important; min-width: 130px; } -} - -.gh-activity-log-actions ul { - width: 240px; } \ No newline at end of file