mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-25 02:31:59 -05:00
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
This commit is contained in:
parent
18186f9ba6
commit
122ba10114
7 changed files with 97 additions and 27 deletions
|
@ -1,9 +1,10 @@
|
||||||
<table class="gh-list">
|
<table class="gh-list gh-audit-log-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>User</th>
|
<th>User</th>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
<th>When</th>
|
<th></th>
|
||||||
|
<th>Time</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -15,31 +16,37 @@
|
||||||
<span class="user-list-item-figure" style={{background-image-style (or ev.actor.profileImageUrl ev.actor.iconImage)}}>
|
<span class="user-list-item-figure" style={{background-image-style (or ev.actor.profileImageUrl ev.actor.iconImage)}}>
|
||||||
<span class="hidden">Photo of {{ev.actor.name}}</span>
|
<span class="hidden">Photo of {{ev.actor.name}}</span>
|
||||||
</span>
|
</span>
|
||||||
<h3 class="ma0 pa0 gh-members-list-name">{{ev.actor.name}}</h3>
|
<h3 class="ma0 pa0 gh-audit-log-name">{{ev.actor.name}}</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gh-list-data gh-list-cellwidth-50">
|
<div class="gh-list-data gh-list-cellwidth-10 gh-audit-log-action">
|
||||||
<div class="gh-members-activity-container">
|
<div class="gh-audit-log-container">
|
||||||
<div class="gh-members-activity-icon">{{svg-jar ev.actionIcon}}</div>
|
<div class="gh-audit-log-icon">{{svg-jar ev.actionIcon}}</div>
|
||||||
<div class="gh-members-activity-event">
|
<div class="gh-audit-log-event">
|
||||||
<span class="gh-members-activity-description">
|
<span class="gh-audit-log-description">
|
||||||
{{capitalize-first-letter ev.action}}
|
{{capitalize-first-letter ev.action}}
|
||||||
{{#if (or ev.resource.title ev.resource.name)}}
|
|
||||||
{{#if ev.linkable}}
|
|
||||||
<LinkTo @route="editor.edit" @models={{array ev.resource.displayName ev.resource.id}} class="permalink">
|
|
||||||
<strong>{{or ev.resource.title ev.resource.name}}</strong>
|
|
||||||
</LinkTo>
|
|
||||||
{{else}}
|
|
||||||
<strong>{{or ev.resource.title ev.resource.name}}</strong>
|
|
||||||
{{/if}}
|
|
||||||
{{else}}
|
|
||||||
<small>(unknown)</small>
|
|
||||||
{{/if}}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gh-list-data">{{moment-format ev.original.created_at "DD MMM YYYY HH:mm:ss"}}</div>
|
<div class="gh-list-data gh-audit-log-object">
|
||||||
|
<div class="gh-audit-log-container">
|
||||||
|
{{#if (or ev.resource.title ev.resource.name)}}
|
||||||
|
{{#if ev.linkable}}
|
||||||
|
<LinkTo @route="editor.edit" @models={{array ev.resource.displayName ev.resource.id}} class="permalink">
|
||||||
|
<strong>{{or ev.resource.title ev.resource.name}}</strong>
|
||||||
|
</LinkTo>
|
||||||
|
{{else}}
|
||||||
|
<span class="midgrey">
|
||||||
|
<strong>{{or ev.resource.title ev.resource.name}}</strong>
|
||||||
|
</span>
|
||||||
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
<span class="midlightgrey">(unknown)</span>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="gh-list-data midgrey">{{moment-format ev.original.created_at "DD MMM YYYY HH:mm:ss"}}</div>
|
||||||
</tr>
|
</tr>
|
||||||
{{/let}}
|
{{/let}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
@ -29,11 +29,11 @@ export default class ParseAuditLogEvent extends Helper {
|
||||||
function getActionIcon(ev) {
|
function getActionIcon(ev) {
|
||||||
switch (ev.event) {
|
switch (ev.event) {
|
||||||
case 'added':
|
case 'added':
|
||||||
return 'add-stroke';
|
return 'add';
|
||||||
case 'edited':
|
case 'edited':
|
||||||
return 'content';
|
return 'pen';
|
||||||
case 'deleted':
|
case 'deleted':
|
||||||
return 'cross-circle';
|
return 'trash';
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'info';
|
return 'info';
|
||||||
|
|
|
@ -13,7 +13,7 @@ export default class AuditLogRoute extends AdminRoute {
|
||||||
|
|
||||||
buildRouteInfoMetadata() {
|
buildRouteInfoMetadata() {
|
||||||
return {
|
return {
|
||||||
titleToken: 'Settings - Audit log'
|
titleToken: 'Audit log'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,8 +154,10 @@ ul.nostyle li {
|
||||||
width: 33%;
|
width: 33%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gh-list-cellwidth-1 { width: 1%; }
|
||||||
.gh-list-cellwidth-10 { width: 10%; }
|
.gh-list-cellwidth-10 { width: 10%; }
|
||||||
.gh-list-cellwidth-20 { width: 20%; }
|
.gh-list-cellwidth-20 { width: 20%; }
|
||||||
|
.gh-list-cellwidth-25 { width: 25%; }
|
||||||
.gh-list-cellwidth-30 { width: 30%; }
|
.gh-list-cellwidth-30 { width: 30%; }
|
||||||
.gh-list-cellwidth-40 { width: 40%; }
|
.gh-list-cellwidth-40 { width: 40%; }
|
||||||
.gh-list-cellwidth-50 { width: 50%; }
|
.gh-list-cellwidth-50 { width: 50%; }
|
||||||
|
|
|
@ -195,10 +195,22 @@
|
||||||
.gh-member-activity-actions-menu {
|
.gh-member-activity-actions-menu {
|
||||||
top: auto;
|
top: auto;
|
||||||
left: auto;
|
left: auto;
|
||||||
padding: 2rem;
|
padding: 0;
|
||||||
margin-top: 8px;
|
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 {
|
.gh-member-activity-actions-menu h3 {
|
||||||
margin-bottom: 0.75rem;
|
margin-bottom: 0.75rem;
|
||||||
}
|
}
|
||||||
|
@ -268,6 +280,10 @@
|
||||||
width: 16px;
|
width: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gh-member-activity-actions-menu hr {
|
||||||
|
margin: 12px -20px;
|
||||||
|
}
|
||||||
|
|
||||||
.gh-member-filter-search-trigger {
|
.gh-member-filter-search-trigger {
|
||||||
width: 240px;
|
width: 240px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2852,3 +2852,50 @@ p.theme-validation-details {
|
||||||
margin: 8px 0 0;
|
margin: 8px 0 0;
|
||||||
color: var(--midgrey);
|
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;
|
||||||
|
}
|
|
@ -1,8 +1,6 @@
|
||||||
<section class="gh-canvas gh-members-activity">
|
<section class="gh-canvas gh-members-activity">
|
||||||
<GhCanvasHeader class="gh-canvas-header">
|
<GhCanvasHeader class="gh-canvas-header">
|
||||||
<h2 class="gh-canvas-title" data-test-screen-title>
|
<h2 class="gh-canvas-title" data-test-screen-title>
|
||||||
<LinkTo @route="settings">Settings</LinkTo>
|
|
||||||
<span>{{svg-jar "arrow-right"}}</span>
|
|
||||||
<LinkTo @route="settings.audit-log" data-test-link="audit-log-back">Audit log</LinkTo>
|
<LinkTo @route="settings.audit-log" data-test-link="audit-log-back">Audit log</LinkTo>
|
||||||
{{#if this.userRecord}}
|
{{#if this.userRecord}}
|
||||||
<span>{{svg-jar "arrow-right"}}</span>
|
<span>{{svg-jar "arrow-right"}}</span>
|
||||||
|
|
Loading…
Add table
Reference in a new issue