From 122ba1011456f71aaf10460d2cbec68c4aff3165 Mon Sep 17 00:00:00 2001 From: Peter Zimon Date: Mon, 22 Aug 2022 19:14:17 +0200 Subject: [PATCH] Updated Activity log list design refs. https://github.com/TryGhost/Toolbox/issues/356 - The Audit log list had a temporary (POC) design, it needed refinements --- .../components/settings/audit-log/table.hbs | 47 +++++++++++-------- .../app/helpers/parse-audit-log-event.js | 6 +-- ghost/admin/app/routes/settings/audit-log.js | 2 +- ghost/admin/app/styles/components/lists.css | 2 + .../app/styles/layouts/member-activity.css | 18 ++++++- ghost/admin/app/styles/layouts/settings.css | 47 +++++++++++++++++++ .../app/templates/settings/audit-log.hbs | 2 - 7 files changed, 97 insertions(+), 27 deletions(-) diff --git a/ghost/admin/app/components/settings/audit-log/table.hbs b/ghost/admin/app/components/settings/audit-log/table.hbs index 1313ca263e..c19c63ff82 100644 --- a/ghost/admin/app/components/settings/audit-log/table.hbs +++ b/ghost/admin/app/components/settings/audit-log/table.hbs @@ -1,9 +1,10 @@ - +
- + + @@ -15,31 +16,37 @@ -

{{ev.actor.name}}

+

{{ev.actor.name}}

-
-
-
{{svg-jar ev.actionIcon}}
-
- +
+
+
{{svg-jar ev.actionIcon}}
+
+ {{capitalize-first-letter ev.action}} - {{#if (or ev.resource.title ev.resource.name)}} - {{#if ev.linkable}} - - {{or ev.resource.title ev.resource.name}} - - {{else}} - {{or ev.resource.title ev.resource.name}} - {{/if}} - {{else}} - (unknown) - {{/if}}
-
{{moment-format ev.original.created_at "DD MMM YYYY HH:mm:ss"}}
+
+
+ {{#if (or ev.resource.title ev.resource.name)}} + {{#if ev.linkable}} + + {{or ev.resource.title ev.resource.name}} + + {{else}} + + {{or ev.resource.title ev.resource.name}} + + {{/if}} + {{else}} + (unknown) + {{/if}} +
+
+
{{moment-format ev.original.created_at "DD MMM YYYY HH:mm:ss"}}
{{/let}} {{/each}} diff --git a/ghost/admin/app/helpers/parse-audit-log-event.js b/ghost/admin/app/helpers/parse-audit-log-event.js index d47d8793e9..554ef9b815 100644 --- a/ghost/admin/app/helpers/parse-audit-log-event.js +++ b/ghost/admin/app/helpers/parse-audit-log-event.js @@ -29,11 +29,11 @@ export default class ParseAuditLogEvent extends Helper { function getActionIcon(ev) { switch (ev.event) { case 'added': - return 'add-stroke'; + return 'add'; case 'edited': - return 'content'; + return 'pen'; case 'deleted': - return 'cross-circle'; + return 'trash'; } return 'info'; diff --git a/ghost/admin/app/routes/settings/audit-log.js b/ghost/admin/app/routes/settings/audit-log.js index 838134d580..ab29d7ac9e 100644 --- a/ghost/admin/app/routes/settings/audit-log.js +++ b/ghost/admin/app/routes/settings/audit-log.js @@ -13,7 +13,7 @@ export default class AuditLogRoute extends AdminRoute { buildRouteInfoMetadata() { return { - titleToken: 'Settings - Audit log' + titleToken: 'Audit log' }; } } diff --git a/ghost/admin/app/styles/components/lists.css b/ghost/admin/app/styles/components/lists.css index 77378d1dd6..560200bd84 100644 --- a/ghost/admin/app/styles/components/lists.css +++ b/ghost/admin/app/styles/components/lists.css @@ -154,8 +154,10 @@ ul.nostyle li { width: 33%; } +.gh-list-cellwidth-1 { width: 1%; } .gh-list-cellwidth-10 { width: 10%; } .gh-list-cellwidth-20 { width: 20%; } +.gh-list-cellwidth-25 { width: 25%; } .gh-list-cellwidth-30 { width: 30%; } .gh-list-cellwidth-40 { width: 40%; } .gh-list-cellwidth-50 { width: 50%; } diff --git a/ghost/admin/app/styles/layouts/member-activity.css b/ghost/admin/app/styles/layouts/member-activity.css index 347f3726b0..bd135f30da 100644 --- a/ghost/admin/app/styles/layouts/member-activity.css +++ b/ghost/admin/app/styles/layouts/member-activity.css @@ -195,10 +195,22 @@ .gh-member-activity-actions-menu { top: auto; left: auto; - padding: 2rem; + padding: 0; margin-top: 8px; } +.gh-member-activity-actions-menu ul li { + margin: 0 2rem; +} + +.gh-member-activity-actions-menu ul li:first-of-type { + margin-top: 2rem; +} + +.gh-member-activity-actions-menu ul li:last-of-type { + margin-bottom: 2rem; +} + .gh-member-activity-actions-menu h3 { margin-bottom: 0.75rem; } @@ -268,6 +280,10 @@ width: 16px; } +.gh-member-activity-actions-menu hr { + margin: 12px -20px; +} + .gh-member-filter-search-trigger { width: 240px; } diff --git a/ghost/admin/app/styles/layouts/settings.css b/ghost/admin/app/styles/layouts/settings.css index 93cff7ee7d..591ad53ec9 100644 --- a/ghost/admin/app/styles/layouts/settings.css +++ b/ghost/admin/app/styles/layouts/settings.css @@ -2852,3 +2852,50 @@ p.theme-validation-details { margin: 8px 0 0; color: var(--midgrey); } + +/* Audit log +/* ---------------------------------------------------------- */ +.gh-audit-log-container { + display: flex; + align-items: center; + padding: 7px 0; +} + +.gh-audit-log-action { + padding-right: 6px; +} + +.gh-audit-log-object { + padding-left: 6px; +} + +.gh-audit-log-dash { + padding-left: 0; + padding-right: 0; + color: var(--lightgrey); +} + +.gh-audit-log-icon { + width: 16px; + height: 16px; + margin-right: 8px; +} + +.gh-audit-log-icon svg path { + fill: var(--middarkgrey); +} + +.gh-audit-log-description { + font-size: 1.3rem; + color: var(--middarkgrey); + white-space: nowrap; +} + +.gh-audit-log-table .user-list-item-figure { + height: 30px; + width: 30px; +} + +.gh-audit-log-name { + margin-bottom: 0 !important; +} \ No newline at end of file diff --git a/ghost/admin/app/templates/settings/audit-log.hbs b/ghost/admin/app/templates/settings/audit-log.hbs index 3d6492c6ce..cfb12ec762 100644 --- a/ghost/admin/app/templates/settings/audit-log.hbs +++ b/ghost/admin/app/templates/settings/audit-log.hbs @@ -1,8 +1,6 @@

- Settings - {{svg-jar "arrow-right"}} Audit log {{#if this.userRecord}} {{svg-jar "arrow-right"}}

User ActionWhenTime