diff --git a/apps/web/pages/auth/verify.tsx b/apps/web/pages/auth/verify.tsx index e4ee54f77e..0488aa360d 100644 --- a/apps/web/pages/auth/verify.tsx +++ b/apps/web/pages/auth/verify.tsx @@ -6,7 +6,7 @@ import * as React from "react"; import { useEffect, useState, useRef } from "react"; import z from "zod"; -import { WEBAPP_URL } from "@calcom/lib/constants"; +import { APP_NAME, WEBAPP_URL } from "@calcom/lib/constants"; import { trpc } from "@calcom/trpc/react"; import { Button, showToast } from "@calcom/ui"; @@ -110,7 +110,7 @@ export default function Verify() { ? "Your payment failed" : sessionId ? "Payment successful!" - : "Verify your email" + " | Cal.com"} + : "Verify your email" + " | " + APP_NAME}
diff --git a/apps/web/pages/video/[uid].tsx b/apps/web/pages/video/[uid].tsx index b622a6f675..773fa80901 100644 --- a/apps/web/pages/video/[uid].tsx +++ b/apps/web/pages/video/[uid].tsx @@ -4,7 +4,7 @@ import { getSession } from "next-auth/react"; import Head from "next/head"; import { useEffect } from "react"; -import { SEO_IMG_OGIMG_VIDEO, WEBSITE_URL } from "@calcom/lib/constants"; +import { APP_NAME, SEO_IMG_OGIMG_VIDEO, WEBSITE_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import prisma, { bookingMinimalSelect } from "@calcom/prisma"; import { inferSSRProps } from "@calcom/types/inferSSRProps"; @@ -48,18 +48,18 @@ export default function JoinCall(props: JoinCallPageProps) { return ( <> - Cal.com Video - + {APP_NAME} Video + - + - +
diff --git a/apps/web/public/static/locales/de/common.json b/apps/web/public/static/locales/de/common.json index 03534ba307..67f71b1054 100644 --- a/apps/web/public/static/locales/de/common.json +++ b/apps/web/public/static/locales/de/common.json @@ -109,7 +109,7 @@ "upgrade_to_per_seat": "Upgrade auf Pro-Mitglied lizensierung", "team_upgrade_seats_details": "Von den {{memberCount}} Mitgliedern in Ihrem Team sind {{unpaidCount}} Sitze(n) unbezahlt. Bei ${{seatPrice}}/m pro Sitzplatz betragen die geschätzten Gesamtkosten Ihrer Mitgliedschaft ${{totalCost}}/m.", "team_upgrade_banner_description": "Vielen Dank, dass Sie unseren neuen Teamplan getestet haben. Wir haben festgestellt, dass Ihr Team „{{teamName}}“ aktualisiert werden muss.", - "team_upgrade_banner_action": "Hier aufrüsten", + "team_upgrade_banner_action": "Klicke zum aktualisiert", "team_upgraded_successfully": "Das Update für Ihr Team war erfolgreich!", "use_link_to_reset_password": "Benutzen Sie den Link, um Ihr Passwort zurückzusetzen", "hey_there": "Hallo,", diff --git a/packages/emails/templates/attendee-request-email.ts b/packages/emails/templates/attendee-request-email.ts index b4f10f9687..3b77853f71 100644 --- a/packages/emails/templates/attendee-request-email.ts +++ b/packages/emails/templates/attendee-request-email.ts @@ -1,3 +1,5 @@ +import { APP_NAME } from "@calcom/lib/constants"; + import { renderEmail } from "../"; import AttendeeScheduledEmail from "./attendee-scheduled-email"; @@ -14,7 +16,7 @@ export default class AttendeeRequestEmail extends AttendeeScheduledEmail { } return { - from: `Cal.com <${this.getMailerOptions().from}>`, + from: `${APP_NAME} <${this.getMailerOptions().from}>`, to: toAddresses.join(","), subject: `${this.calEvent.attendees[0].language.translate("booking_submitted_subject", { eventType: this.calEvent.type, diff --git a/packages/emails/templates/attendee-was-requested-to-reschedule-email.ts b/packages/emails/templates/attendee-was-requested-to-reschedule-email.ts index f8366c6d4e..cfeb6c3d66 100644 --- a/packages/emails/templates/attendee-was-requested-to-reschedule-email.ts +++ b/packages/emails/templates/attendee-was-requested-to-reschedule-email.ts @@ -2,6 +2,7 @@ import { createEvent, DateArray, Person } from "ics"; import dayjs from "@calcom/dayjs"; import { getManageLink } from "@calcom/lib/CalEventParser"; +import { APP_NAME } from "@calcom/lib/constants"; import type { CalendarEvent } from "@calcom/types/Calendar"; import { renderEmail } from ".."; @@ -21,7 +22,7 @@ export default class AttendeeWasRequestedToRescheduleEmail extends OrganizerSche filename: "event.ics", content: this.getiCalEventAsString(), }, - from: `Cal.com <${this.getMailerOptions().from}>`, + from: `${APP_NAME} <${this.getMailerOptions().from}>`, to: toAddresses.join(","), subject: `${this.t("requested_to_reschedule_subject_attendee", { eventType: this.calEvent.type, diff --git a/packages/emails/templates/organizer-cancelled-email.ts b/packages/emails/templates/organizer-cancelled-email.ts index ef13237402..c7a3be2cbe 100644 --- a/packages/emails/templates/organizer-cancelled-email.ts +++ b/packages/emails/templates/organizer-cancelled-email.ts @@ -1,3 +1,5 @@ +import { APP_NAME } from "@calcom/lib/constants"; + import { renderEmail } from "../"; import OrganizerScheduledEmail from "./organizer-scheduled-email"; @@ -14,7 +16,7 @@ export default class OrganizerCancelledEmail extends OrganizerScheduledEmail { } return { - from: `Cal.com <${this.getMailerOptions().from}>`, + from: `${APP_NAME} <${this.getMailerOptions().from}>`, to: toAddresses.join(","), subject: `${this.t("event_cancelled_subject", { eventType: this.calEvent.type, diff --git a/packages/emails/templates/organizer-location-change-email.ts b/packages/emails/templates/organizer-location-change-email.ts index 043b85630b..1385d10609 100644 --- a/packages/emails/templates/organizer-location-change-email.ts +++ b/packages/emails/templates/organizer-location-change-email.ts @@ -1,3 +1,5 @@ +import { APP_NAME } from "@calcom/lib/constants"; + import { renderEmail } from "../"; import OrganizerScheduledEmail from "./organizer-scheduled-email"; @@ -18,7 +20,7 @@ export default class OrganizerLocationChangeEmail extends OrganizerScheduledEmai filename: "event.ics", content: this.getiCalEventAsString(), }, - from: `Cal.com <${this.getMailerOptions().from}>`, + from: `${APP_NAME} <${this.getMailerOptions().from}>`, to: toAddresses.join(","), subject: `${this.t("location_changed_event_type_subject", { eventType: this.calEvent.type, diff --git a/packages/emails/templates/organizer-payment-refund-failed-email.ts b/packages/emails/templates/organizer-payment-refund-failed-email.ts index 59142da771..1567501f35 100644 --- a/packages/emails/templates/organizer-payment-refund-failed-email.ts +++ b/packages/emails/templates/organizer-payment-refund-failed-email.ts @@ -1,3 +1,5 @@ +import { APP_NAME } from "@calcom/lib/constants"; + import { renderEmail } from "../"; import OrganizerScheduledEmail from "./organizer-scheduled-email"; @@ -14,7 +16,7 @@ export default class OrganizerPaymentRefundFailedEmail extends OrganizerSchedule } return { - from: `Cal.com <${this.getMailerOptions().from}>`, + from: `${APP_NAME} <${this.getMailerOptions().from}>`, to: toAddresses.join(","), subject: `${this.t("refund_failed_subject", { eventType: this.calEvent.type, diff --git a/packages/emails/templates/organizer-request-email.ts b/packages/emails/templates/organizer-request-email.ts index f8ff998178..11925937e1 100644 --- a/packages/emails/templates/organizer-request-email.ts +++ b/packages/emails/templates/organizer-request-email.ts @@ -1,3 +1,5 @@ +import { APP_NAME } from "@calcom/lib/constants"; + import { renderEmail } from "../"; import OrganizerScheduledEmail from "./organizer-scheduled-email"; @@ -14,7 +16,7 @@ export default class OrganizerRequestEmail extends OrganizerScheduledEmail { } return { - from: `Cal.com <${this.getMailerOptions().from}>`, + from: `${APP_NAME} <${this.getMailerOptions().from}>`, to: toAddresses.join(","), subject: `${this.t("event_awaiting_approval_subject", { eventType: this.calEvent.type, diff --git a/packages/emails/templates/organizer-request-reminder-email.ts b/packages/emails/templates/organizer-request-reminder-email.ts index d87ed752c1..61e7c782b2 100644 --- a/packages/emails/templates/organizer-request-reminder-email.ts +++ b/packages/emails/templates/organizer-request-reminder-email.ts @@ -1,3 +1,5 @@ +import { APP_NAME } from "@calcom/lib/constants"; + import { renderEmail } from "../"; import OrganizerRequestEmail from "./organizer-request-email"; @@ -14,7 +16,7 @@ export default class OrganizerRequestReminderEmail extends OrganizerRequestEmail } return { - from: `Cal.com <${this.getMailerOptions().from}>`, + from: `${APP_NAME} <${this.getMailerOptions().from}>`, to: toAddresses.join(","), subject: `${this.t("event_awaiting_approval_subject", { eventType: this.calEvent.type, diff --git a/packages/emails/templates/organizer-requested-to-reschedule-email.ts b/packages/emails/templates/organizer-requested-to-reschedule-email.ts index 5abdf1ebc9..e3c433f014 100644 --- a/packages/emails/templates/organizer-requested-to-reschedule-email.ts +++ b/packages/emails/templates/organizer-requested-to-reschedule-email.ts @@ -2,6 +2,7 @@ import { createEvent, DateArray, Person } from "ics"; import dayjs from "@calcom/dayjs"; import { getRichDescription } from "@calcom/lib/CalEventParser"; +import { APP_NAME } from "@calcom/lib/constants"; import type { CalendarEvent } from "@calcom/types/Calendar"; import { renderEmail } from ".."; @@ -21,7 +22,7 @@ export default class OrganizerRequestedToRescheduleEmail extends OrganizerSchedu filename: "event.ics", content: this.getiCalEventAsString(), }, - from: `Cal.com <${this.getMailerOptions().from}>`, + from: `${APP_NAME} <${this.getMailerOptions().from}>`, to: toAddresses.join(","), subject: `${this.t("rescheduled_event_type_subject", { eventType: this.calEvent.type, diff --git a/packages/emails/templates/organizer-rescheduled-email.ts b/packages/emails/templates/organizer-rescheduled-email.ts index d48d12e58b..c38a70fc91 100644 --- a/packages/emails/templates/organizer-rescheduled-email.ts +++ b/packages/emails/templates/organizer-rescheduled-email.ts @@ -1,3 +1,5 @@ +import { APP_NAME } from "@calcom/lib/constants"; + import { renderEmail } from "../"; import OrganizerScheduledEmail from "./organizer-scheduled-email"; @@ -18,7 +20,7 @@ export default class OrganizerRescheduledEmail extends OrganizerScheduledEmail { filename: "event.ics", content: this.getiCalEventAsString(), }, - from: `Cal.com <${this.getMailerOptions().from}>`, + from: `${APP_NAME} <${this.getMailerOptions().from}>`, to: toAddresses.join(","), subject: `${this.calEvent.organizer.language.translate("event_type_has_been_rescheduled_on_time_date", { eventType: this.calEvent.type, diff --git a/packages/features/ee/workflows/lib/reminders/templates/emailReminderTemplate.ts b/packages/features/ee/workflows/lib/reminders/templates/emailReminderTemplate.ts index 97371a798f..0e501306ce 100644 --- a/packages/features/ee/workflows/lib/reminders/templates/emailReminderTemplate.ts +++ b/packages/features/ee/workflows/lib/reminders/templates/emailReminderTemplate.ts @@ -1,4 +1,5 @@ import dayjs from "@calcom/dayjs"; +import { APP_NAME } from "@calcom/lib/constants"; const emailReminderTemplate = ( startTime: string, @@ -32,7 +33,7 @@ const emailReminderTemplate = ( const attendeeHtml = `
Attendees:
You & ${attendee}

`; - const endingHtml = `This reminder was triggered by a Workflow in Cal.

_

Scheduling by Cal.com`; + const endingHtml = `This reminder was triggered by a Workflow in Cal.

_

Scheduling by ${APP_NAME}`; const templateBodyHtml = introHtml + eventHtml + dateTimeHtml + attendeeHtml + endingHtml; diff --git a/packages/features/tips/Tips.tsx b/packages/features/tips/Tips.tsx index 2b48487afe..8a7c99fadc 100644 --- a/packages/features/tips/Tips.tsx +++ b/packages/features/tips/Tips.tsx @@ -1,6 +1,7 @@ import { useAutoAnimate } from "@formkit/auto-animate/react"; import { useEffect, useState } from "react"; +import { APP_NAME } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { localStorage } from "@calcom/lib/webstorage"; import { Card } from "@calcom/ui"; @@ -43,7 +44,7 @@ export const tips = [ thumbnailUrl: "https://img.youtube.com/vi/0v_nQtpxC_4/0.jpg", mediaLink: "https://go.cal.com/payments-video", title: "Accept Payments", - description: "Charge for your time with Cal.com's Stripe App", + description: "Charge for your time with " + APP_NAME + "'s Stripe App", href: "https://app.cal.com/apps/stripe", }, { diff --git a/packages/features/users/components/UserV2OptInBanner.tsx b/packages/features/users/components/UserV2OptInBanner.tsx index 238527858f..871afb6cab 100644 --- a/packages/features/users/components/UserV2OptInBanner.tsx +++ b/packages/features/users/components/UserV2OptInBanner.tsx @@ -1,3 +1,5 @@ +import { APP_NAME } from "@calcom/lib/constants"; + function UserV2OptInBanner() { // Only show on client-side if (typeof document === "undefined") return null; @@ -7,7 +9,7 @@ function UserV2OptInBanner() { if (hasV2OptInCookie) return (

- You're using the new version of Cal.com.{" "} + You're using the new version of {APP_NAME}.{" "} Go back @@ -17,7 +19,7 @@ function UserV2OptInBanner() { return (

- Want to try the new version of Cal.com?{" "} + Want to try the new version of {APP_NAME}?{" "} Opt-in to our v2.0 beta diff --git a/packages/lib/CloseComeUtils.ts b/packages/lib/CloseComeUtils.ts index 386f852883..5e06113dbd 100644 --- a/packages/lib/CloseComeUtils.ts +++ b/packages/lib/CloseComeUtils.ts @@ -7,6 +7,7 @@ import CloseCom, { CloseComFieldOptions, CloseComLead, } from "./CloseCom"; +import { APP_NAME } from "./constants"; export async function getCloseComContactIds( persons: { email: string; name: string | null }[], @@ -150,7 +151,7 @@ export async function getCloseComCustomActivityTypeFieldsIds( ) { // Check if Custom Activity Type exists const customActivities = await closeCom.customActivity.type.get(); - const calComCustomActivity = customActivities.data.filter((act) => act.name === "Cal.com Activity"); + const calComCustomActivity = customActivities.data.filter((act) => act.name === `${APP_NAME} Activity`); if (calComCustomActivity.length > 0) { // Cal.com Custom Activity type exist // Get Custom Activity Type fields ids @@ -163,8 +164,8 @@ export async function getCloseComCustomActivityTypeFieldsIds( // Cal.com Custom Activity type doesn't exist // Create Custom Activity Type const { id: activityType } = await closeCom.customActivity.type.create({ - name: "Cal.com Activity", - description: "Bookings in your Cal.com account", + name: APP_NAME + " Activity", + description: "Bookings in your " + APP_NAME + " account", }); // Create Custom Activity Fields const fields = await Promise.all( @@ -190,8 +191,8 @@ export async function getCloseComCustomActivityTypeFieldsIds( export async function getCloseComLeadId( closeCom: CloseCom, leadInfo: CloseComLead = { - companyName: "From Cal.com", - description: "Generic Lead for Contacts created by Cal.com", + companyName: "From " + APP_NAME, + description: "Generic Lead for Contacts created by " + APP_NAME, } ): Promise { const closeComLeadNames = await closeCom.lead.list({ query: { _fields: ["name", "id"] } }); diff --git a/packages/lib/constants.ts b/packages/lib/constants.ts index cc1c2a9253..46a0c54949 100644 --- a/packages/lib/constants.ts +++ b/packages/lib/constants.ts @@ -1,11 +1,12 @@ -/* TODO: Get this from endpoint */ -import pkg from "@calcom/web/package.json"; - const VERCEL_URL = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : ""; const RAILWAY_STATIC_URL = process.env.RAILWAY_STATIC_URL ? `https://${process.env.RAILWAY_STATIC_URL}` : ""; const HEROKU_URL = process.env.HEROKU_APP_NAME ? `https://${process.env.HEROKU_APP_NAME}.herokuapp.com` : ""; export const WEBAPP_URL = - process.env.NEXT_PUBLIC_WEBAPP_URL || VERCEL_URL || RAILWAY_STATIC_URL || HEROKU_URL; + process.env.NEXT_PUBLIC_WEBAPP_URL || + VERCEL_URL || + RAILWAY_STATIC_URL || + HEROKU_URL || + "http://localhost:3000"; /** @deprecated use `WEBAPP_URL` */ export const BASE_URL = WEBAPP_URL; export const WEBSITE_URL = process.env.NEXT_PUBLIC_WEBSITE_URL || "https://cal.com"; diff --git a/packages/ui/v2/core/Meta.tsx b/packages/ui/v2/core/Meta.tsx index 1a7b513f22..2f143b8384 100644 --- a/packages/ui/v2/core/Meta.tsx +++ b/packages/ui/v2/core/Meta.tsx @@ -1,6 +1,8 @@ import Head from "next/head"; import React, { createContext, useContext, useState, useEffect } from "react"; +import { APP_NAME } from "@calcom/lib/constants"; + type MetaType = { title: string; description: string; @@ -54,7 +56,9 @@ export default function Meta({ title, description, backButton, CTA }: MetaType) return ( - {title} | Cal.com + + {title} | {APP_NAME} + ); diff --git a/packages/ui/v2/core/head-seo.tsx b/packages/ui/v2/core/head-seo.tsx index efe1a2e4be..2819017c78 100644 --- a/packages/ui/v2/core/head-seo.tsx +++ b/packages/ui/v2/core/head-seo.tsx @@ -3,6 +3,7 @@ import { NextSeo, NextSeoProps } from "next-seo"; import { constructAppImage, constructGenericImage, constructMeetingImage } from "@calcom/lib/OgImages"; import { getBrowserInfo } from "@calcom/lib/browser/browser.utils"; +import { APP_NAME } from "@calcom/lib/constants"; import { seoConfig, getSeoImage, HeadSeoProps } from "@calcom/lib/next-seo.config"; import { truncateOnWord } from "@calcom/lib/text"; @@ -61,7 +62,7 @@ export const HeadSeo = (props: HeadSeoProps): JSX.Element => { const image = getSeoImage("ogImage") + constructGenericImage({ title, description }); const truncatedDescription = truncateOnWord(description, 158); - const pageTitle = title + " | Cal.com"; + const pageTitle = title + " | " + APP_NAME; let seoObject = buildSeoMeta({ title: pageTitle, image,