mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
fix minor issues in activity items (#9479)
This fixes two minor issues for activity items: 1. The value for DEFAULT_GRAVATAR_URL was a transparent square, this uses the same image we use as the fallback for all other avatars. 2. Added a whitespace for MDM activities.
This commit is contained in:
parent
0b2a511b26
commit
c5884ae553
@ -4,6 +4,7 @@ import { intlFormat, formatDistanceToNowStrict } from "date-fns";
|
||||
|
||||
import { ActivityType, IActivity, IActivityDetails } from "interfaces/activity";
|
||||
import { addGravatarUrlToResource } from "utilities/helpers";
|
||||
import { DEFAULT_GRAVATAR_LINK } from "utilities/constants";
|
||||
import Avatar from "components/Avatar";
|
||||
import Button from "components/buttons/Button";
|
||||
import Icon from "components/Icon";
|
||||
@ -11,9 +12,6 @@ import ReactTooltip from "react-tooltip";
|
||||
|
||||
const baseClass = "activity-item";
|
||||
|
||||
const DEFAULT_GRAVATAR_URL =
|
||||
"https://www.gravatar.com/avatar/00000000000000000000000000000000?d=blank&size=200";
|
||||
|
||||
const TAGGED_TEMPLATES = {
|
||||
liveQueryActivityTemplate: (
|
||||
activity: IActivity,
|
||||
@ -153,7 +151,7 @@ const TAGGED_TEMPLATES = {
|
||||
mdmEnrolled: (activity: IActivity) => {
|
||||
return (
|
||||
<>
|
||||
An end user turned on MDM features for a host with serial number
|
||||
An end user turned on MDM features for a host with serial number{" "}
|
||||
<b>
|
||||
{activity.details?.host_serial} (
|
||||
{activity.details?.installed_from_dep ? "automatic" : "manual"})
|
||||
@ -275,7 +273,7 @@ const ActivityItem = ({
|
||||
const { actor_email } = activity;
|
||||
const { gravatarURL } = actor_email
|
||||
? addGravatarUrlToResource({ email: actor_email })
|
||||
: { gravatarURL: DEFAULT_GRAVATAR_URL };
|
||||
: { gravatarURL: DEFAULT_GRAVATAR_LINK };
|
||||
|
||||
const activityCreatedAt = new Date(activity.created_at);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user