0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Added support for integration actors in Audit Log UI

refs https://github.com/TryGhost/Toolbox/issues/356

- this enables showing when an integration is the actor doing something
- still need to add a fallback for missing icons
This commit is contained in:
Daniel Lockyer 2022-08-18 16:58:42 +02:00
parent e0602b8159
commit 7b160493db
No known key found for this signature in database
GPG key ID: D21186F0B47295AD
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ export default class ParseAuditLogEvent extends Helper {
compute([ev]) {
const action = getAction(ev);
const actionIcon = getActionIcon(ev);
const getActor = () => this.store.findRecord('user', ev.actor_id, {reload: false});
const getActor = () => this.store.findRecord(ev.actor_type, ev.actor_id, {reload: false});
const getResource = () => this.store.findRecord(ev.resource_type, ev.resource_id, {reload: false});
return {

View file

@ -24,7 +24,7 @@
<tr>
<div class="gh-list-data gh-list-cellwidth-30">
<div class="flex items-center">
<span class="user-list-item-figure" style={{background-image-style ev.actor.profileImageUrl}}>
<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>
<h3 class="ma0 pa0 gh-members-list-name">{{ev.actor.name}}</h3>