diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index db1f66368c..bfdd92d690 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -239,7 +239,7 @@ "all_done": "All done!", "all_apps": "All", "all": "All", - "yours":"Yours", + "yours": "Yours", "available_apps": "Available Apps", "check_email_reset_password": "Check your email. We sent you a link to reset your password.", "finish": "Finish", @@ -250,8 +250,8 @@ "set_availability": "Set your availability", "continue_without_calendar": "Continue without calendar", "connect_your_calendar": "Connect your calendar", - "connect_your_video_app":"Connect your video apps", - "connect_your_video_app_instructions":"Connect your video apps to use them on your event types.", + "connect_your_video_app": "Connect your video apps", + "connect_your_video_app_instructions": "Connect your video apps to use them on your event types.", "connect_your_calendar_instructions": "Connect your calendar to automatically check for busy times and new events as they’re scheduled.", "set_up_later": "Set up later", "current_time": "Current time", @@ -392,10 +392,10 @@ "create_webhook": "Create Webhook", "booking_cancelled": "Booking Cancelled", "booking_rescheduled": "Booking Rescheduled", - "recording_ready":"Recording Download Link Ready", + "recording_ready": "Recording Download Link Ready", "booking_created": "Booking Created", - "booking_rejected":"Booking Rejected", - "booking_requested":"Booking Requested", + "booking_rejected": "Booking Rejected", + "booking_requested": "Booking Requested", "meeting_ended": "Meeting Ended", "form_submitted": "Form Submitted", "event_triggers": "Event Triggers", @@ -926,7 +926,7 @@ "duplicate": "Duplicate", "offer_seats": "Offer seats", "offer_seats_description": "Offer seats for booking. This automatically disables guest & opt-in bookings.", - "seats_available_one":"Seat available", + "seats_available_one": "Seat available", "seats_available_other": "Seats available", "number_of_seats": "Number of seats per booking", "enter_number_of_seats": "Enter number of seats", @@ -1290,7 +1290,7 @@ "download_responses_description": "Download all responses to your form in CSV format.", "download": "Download", "download_recording": "Download Recording", - "recording_from_your_recent_call":"A recording from your recent call on {{appName}} is ready for download", + "recording_from_your_recent_call": "A recording from your recent call on {{appName}} is ready for download", "create_your_first_form": "Create your first form", "create_your_first_form_description": "With Routing Forms you can ask qualifying questions and route to the correct person or event type.", "create_your_first_webhook": "Create your first Webhook", @@ -1478,7 +1478,7 @@ "fixed_round_robin": "Fixed round robin", "add_one_fixed_attendee": "Add one fixed attendee and round robin through a number of attendees.", "calcom_is_better_with_team": "{{appName}} is better with teams", - "the_calcom_team":"The {{companyName}} team", + "the_calcom_team": "The {{companyName}} team", "add_your_team_members": "Add your team members to your event types. Use collective scheduling to include everyone or find the most suitable person with round robin scheduling.", "booking_limit_reached": "Booking Limit for this event type has been reached", "duration_limit_reached": "Duration Limit for this event type has been reached", @@ -1663,7 +1663,7 @@ "booking_confirmation_failed": "Booking confirmation failed", "not_enough_seats": "Not enough seats", "form_builder_field_already_exists": "A field with this name already exists", - "show_on_booking_page":"Show on booking page", + "show_on_booking_page": "Show on booking page", "get_started_zapier_templates": "Get started with Zapier templates", "team_is_unpublished": "{{team}} is unpublished", "team_is_unpublished_description": "This {{entity}} link is currently not available. Please contact the {{entity}} owner or ask them publish it.", @@ -1828,9 +1828,9 @@ "disable_host_confirmation_emails": "Disable default confirmation emails for host", "disable_host_confirmation_emails_description": "At least one workflow is active on this event type that sends an email to the host when the event is booked.", "add_an_override": "Add an override", - "import_from_google_workspace":"Import users from Google Workspace", - "connect_google_workspace":"Connect Google Workspace", - "google_workspace_admin_tooltip":"You must be a Workspace Admin to use this feature", + "import_from_google_workspace": "Import users from Google Workspace", + "connect_google_workspace": "Connect Google Workspace", + "google_workspace_admin_tooltip": "You must be a Workspace Admin to use this feature", "first_event_type_webhook_description": "Create your first webhook for this event type", "create_for": "Create for", "setup_organization": "Setup an Organization", @@ -1873,6 +1873,8 @@ "set_up": "Set up", "set_up_your_profile": "Set up your profile", "set_up_your_profile_description": "Let people know who you are within {{orgName}}, and when they engage with your public link.", + "my_profile": "My Profile", + "my_settings": "My Settings", "sender_id_info": "Name or number shown as the sender of an SMS (some countries do not allow alphanumeric sender IDs)", "ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑" } diff --git a/packages/features/kbar/Kbar.tsx b/packages/features/kbar/Kbar.tsx index eefd47307a..65c76e2018 100644 --- a/packages/features/kbar/Kbar.tsx +++ b/packages/features/kbar/Kbar.tsx @@ -273,7 +273,7 @@ export const KBarTrigger = () => { diff --git a/packages/features/shell/Shell.tsx b/packages/features/shell/Shell.tsx index dcece219db..547ab32d9a 100644 --- a/packages/features/shell/Shell.tsx +++ b/packages/features/shell/Shell.tsx @@ -1,4 +1,4 @@ -import type { User } from "@prisma/client"; +import type { User as UserAuth } from "next-auth"; import { signOut, useSession } from "next-auth/react"; import dynamic from "next/dynamic"; import Link from "next/link"; @@ -26,6 +26,7 @@ import getBrandColours from "@calcom/lib/getBrandColours"; import { useIsomorphicLayoutEffect } from "@calcom/lib/hooks/useIsomorphicLayoutEffect"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { isKeyInObject } from "@calcom/lib/isKeyInObject"; +import type { User } from "@calcom/prisma/client"; import { trpc } from "@calcom/trpc/react"; import useAvatarQuery from "@calcom/trpc/react/hooks/useAvatarQuery"; import useEmailVerifyCheck from "@calcom/trpc/react/hooks/useEmailVerifyCheck"; @@ -49,6 +50,7 @@ import { Tooltip, showToast, useCalcomTheme, + ButtonOrLink, } from "@calcom/ui"; import { ArrowLeft, @@ -66,11 +68,13 @@ import { Map, Moon, MoreHorizontal, - MoreVertical, + ChevronDown, + Copy, Settings, Slack, Users, Zap, + User as UserIcon, } from "@calcom/ui/components/icon"; import FreshChatProvider from "../ee/support/lib/freshchat/FreshChatProvider"; @@ -287,12 +291,14 @@ export default function Shell(props: LayoutProps) { ); } -function UserDropdown({ small }: { small?: boolean }) { +interface UserDropdownProps { + small?: boolean; +} + +function UserDropdown({ small }: UserDropdownProps) { const { t } = useLocale(); const { data: user } = useMeQuery(); const { data: avatar } = useAvatarQuery(); - const orgBranding = useOrgBrandingValues(); - useEffect(() => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment //@ts-ignore @@ -329,43 +335,36 @@ function UserDropdown({ small }: { small?: boolean }) {
setMenuOpen((menuOpen) => !menuOpen)}> - + {!!orgBranding && ( +
+ +
+ )}
@@ -847,14 +893,45 @@ function SideBar({ bannersHeight }: SideBarProps) {
-
- - - - - - -
+ {bottomNavItems.map(({ icon: Icon, ...item }) => ( + + + {!!Icon && ( + + + ))}
diff --git a/packages/lib/server/queries/teams/index.ts b/packages/lib/server/queries/teams/index.ts index 937d9b6579..3a252509ed 100644 --- a/packages/lib/server/queries/teams/index.ts +++ b/packages/lib/server/queries/teams/index.ts @@ -2,7 +2,7 @@ import { Prisma } from "@prisma/client"; import prisma, { baseEventTypeSelect } from "@calcom/prisma"; import { SchedulingType } from "@calcom/prisma/enums"; -import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils"; +import { EventTypeMetaDataSchema, teamMetadataSchema } from "@calcom/prisma/zod-utils"; import { WEBAPP_URL } from "../../../constants"; @@ -111,7 +111,7 @@ export async function getTeamWithMembers(id?: number, slug?: string, userId?: nu ...eventType, metadata: EventTypeMetaDataSchema.parse(eventType.metadata), })); - return { ...team, eventTypes, members }; + return { ...team, metadata: teamMetadataSchema.parse(team.metadata), eventTypes, members }; } // also returns team diff --git a/packages/ui/components/avatar/Avatar.tsx b/packages/ui/components/avatar/Avatar.tsx index d7ecfb9bbe..2b2495eff0 100644 --- a/packages/ui/components/avatar/Avatar.tsx +++ b/packages/ui/components/avatar/Avatar.tsx @@ -24,12 +24,12 @@ export type AvatarProps = { }; const sizesPropsBySize = { - xs: "w-4 h-4", // 16px - sm: "w-6 h-6", // 24px - md: "w-8 h-8", // 32px - mdLg: "w-10 h-10", //40px - lg: "w-16 h-16", // 64px - xl: "w-24 h-24", // 96px + xs: "w-4 h-4 min-w-4 min-h-4", // 16px + sm: "w-6 h-6 min-w-6 min-h-6", // 24px + md: "w-8 h-8 min-w-8 min-h-8", // 32px + mdLg: "w-10 h-10 min-w-10 min-h-10", //40px + lg: "w-16 h-16 min-w-16 min-h-16", // 64px + xl: "w-24 h-24 min-w-24 min-h-24", // 96px } as const; export function Avatar(props: AvatarProps) { @@ -48,7 +48,7 @@ export function Avatar(props: AvatarProps) { alt={alt} className={classNames("aspect-square rounded-full", sizesPropsBySize[size])} /> - + <> {props.fallback && !gravatarFallbackMd5 && props.fallback} {gravatarFallbackMd5 && (