chore: Remove all avatar/logo references (#14532)
* chore: Remove all avatar/logo references * Updated user profile to only use avatarUrl * fix: minor style issue * chore: Remove redundant includeTeamLogo * fix: Use right avatar default in event type list * fix: placeholder avatar team profile, target * chore: Add logoUrl/avatarUrl to JWT * fix: Bunch of org avatar issues, fix members list * Fix logoUrl on org pages * More type fixes * Hopefully final type fixes * Another round of type fixes * fix: UserForm ts * fix: Handle as return types, not input types * fix: Remove profile and add avatarUrl * fix: notFound as const * fix: Seeder avatarUrl params * revert: Migration changes for easier recovery * fix: Add explicit type to builder as avatar is now set * Add logoUrl to unpublished entity * Avatar test out of scope here * fix: Use the new avatarUrl after save * chore: Removed getOrgAvatarUrl/getTeamAvatarUrl * fix: Update sidebar image immediately after change * Unable to safe unnamed user, so default * fix: Unpublished page, add organization test * Add more tests
This commit is contained in:
1 parent
5695ba7c13
commit
d25c043046
73 files changed
+644
-770
No files matched your search
@@ -7,6 +7,7 @@ import { getAppFromSlug } from "@calcom/app-store/utils";
|
||||
import { getBookingFieldsWithSystemFields } from "@calcom/features/bookings/lib/getBookingFields";
|
||||
import { getSlugOrRequestedSlug } from "@calcom/features/ee/organizations/lib/orgDomains";
|
||||
import { isRecurringEvent, parseRecurringEvent } from "@calcom/lib";
|
||||
import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage";
|
||||
import { getDefaultEvent, getUsernameList } from "@calcom/lib/defaultEvents";
|
||||
import { getUserAvatarUrl } from "@calcom/lib/getAvatarUrl";
|
||||
import { getBookerBaseUrlSync } from "@calcom/lib/getBookerUrl/client";
|
||||
@@ -177,8 +178,7 @@ export const getPublicEvent = async (
|
||||
name: users[0].name,
|
||||
weekStart: users[0].weekStart,
|
||||
image: getUserAvatarUrl({
|
||||
...users[0],
|
||||
profile: users[0].profile,
|
||||
avatarUrl: users[0].avatarUrl,
|
||||
}),
|
||||
brandColor: users[0].brandColor,
|
||||
darkBrandColor: users[0].darkBrandColor,
|
||||
@@ -336,21 +336,10 @@ function getProfileFromEvent(event: Event) {
|
||||
weekStart,
|
||||
image: team
|
||||
? undefined
|
||||
: // TODO: There must be a better way to do this, maybe a prisma middleware?
|
||||
// This should come pre-proccessed from the database IMO instead of replacing everywhere
|
||||
getUserAvatarUrl({
|
||||
username: username || "",
|
||||
profile: {
|
||||
id: nonTeamprofile?.id || null,
|
||||
username: username || null,
|
||||
organizationId: nonTeamprofile?.organization?.id || null,
|
||||
organization: nonTeamprofile?.organization
|
||||
? { ...nonTeamprofile?.organization, requestedSlug: null }
|
||||
: null,
|
||||
},
|
||||
: getUserAvatarUrl({
|
||||
avatarUrl: nonTeamprofile?.avatarUrl,
|
||||
}),
|
||||
logo: !team ? undefined : team.logoUrl,
|
||||
logo: !team ? undefined : getPlaceholderAvatar(team.logoUrl, team.name),
|
||||
brandColor: profile.brandColor,
|
||||
darkBrandColor: profile.darkBrandColor,
|
||||
theme: profile.theme,
|
||||
|
||||
Reference in new issue
Block a user