mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 12:14:45 +02:00
files
tooltip for activity logs (#938)
* add files tooltip to activity logs * fix when "files" isn't an array
This commit is contained in:
parent
6a4963200c
commit
fef19b9fdd
@ -26,6 +26,11 @@ class ListActivities extends ListRecords
|
||||
$properties = $activityLog->wrapProperties();
|
||||
|
||||
return trans_choice('activity.'.str($state)->replace(':', '.'), array_get($properties, 'count', 1), $properties);
|
||||
})
|
||||
->tooltip(function (ActivityLog $activityLog) {
|
||||
$files = array_get($activityLog->properties, 'files', []);
|
||||
|
||||
return is_array($files) ? implode(',', $files) : null;
|
||||
}),
|
||||
TextColumn::make('user')
|
||||
->state(fn (ActivityLog $activityLog) => $activityLog->actor instanceof User ? $activityLog->actor->username : 'System')
|
||||
|
Loading…
x
Reference in New Issue
Block a user