Feature/whitelabel part 2 (#5821)

* applied whitelabel to additional parts of the app

* format .md files

* updated metadata of all apps

* applied whitelabel to PoweredByCal.tsx

* fixed `team_upgrade_banner_action` with better german

* fixed import of APP_NAME in email templates

* revert "applied whitelabel" in CalEventParser.test.ts

* Revert "updated metadata of all apps"

This reverts commit 9c1621788d.

* revert app-store whitelabel changes

* Revert "applied whitelabel to PoweredByCal.tsx"

This reverts commit f2b2d79aa5.

* Update website

* Sync

* Update constants.ts

* Prevent unit test error

Co-authored-by: René Müller <rene.mueller@clicksports.de>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: zomars <zomars@me.com>
This commit is contained in:
René Müller 2023-01-04 23:14:46 +01:00 committed by GitHub
parent bed798d440
commit 27d9fad292
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 59 additions and 32 deletions

View File

@ -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}
</title>
</Head>
<div className="flex min-h-screen flex-col items-center justify-center px-6">

View File

@ -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 (
<>
<Head>
<title>Cal.com Video</title>
<meta name="title" content="Cal.com Video" />
<title>{APP_NAME} Video</title>
<meta name="title" content={APP_NAME + " Video"} />
<meta name="description" content={t("quick_video_meeting")} />
<meta property="og:image" content={SEO_IMG_OGIMG_VIDEO} />
<meta property="og:type" content="website" />
<meta property="og:url" content={`${WEBSITE_URL}/video`} />
<meta property="og:title" content="Cal.com Video" />
<meta property="og:title" content={APP_NAME + " Video"} />
<meta property="og:description" content={t("quick_video_meeting")} />
<meta property="twitter:image" content={SEO_IMG_OGIMG_VIDEO} />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content={`${WEBSITE_URL}/video`} />
<meta property="twitter:title" content="Cal.com Video" />
<meta property="twitter:title" content={APP_NAME + " Video"} />
<meta property="twitter:description" content={t("quick_video_meeting")} />
</Head>
<div style={{ zIndex: 2, position: "relative" }}>

View File

@ -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,",

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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 = `<div style="font-weight: bold;">Attendees:</div>You & ${attendee}<br><br>`;
const endingHtml = `This reminder was triggered by a Workflow in Cal.<br><br>_<br><br>Scheduling by Cal.com</body>`;
const endingHtml = `This reminder was triggered by a Workflow in Cal.<br><br>_<br><br>Scheduling by ${APP_NAME}</body>`;
const templateBodyHtml = introHtml + eventHtml + dateTimeHtml + attendeeHtml + endingHtml;

View File

@ -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",
},
{

View File

@ -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 (
<p className="text-xs text-gray-400">
You&apos;re using the new version of Cal.com.{" "}
You&apos;re using the new version of {APP_NAME}.{" "}
<a href="/api/v2-opt-in" className="text-blue-400 underline">
Go back
</a>
@ -17,7 +19,7 @@ function UserV2OptInBanner() {
return (
<p className="text-xs text-gray-400">
Want to try the new version of Cal.com?{" "}
Want to try the new version of {APP_NAME}?{" "}
<a href="/api/v2-opt-in" className="text-blue-400 underline">
Opt-in to our v2.0 beta
</a>

View File

@ -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<string> {
const closeComLeadNames = await closeCom.lead.list({ query: { _fields: ["name", "id"] } });

View File

@ -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";

View File

@ -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 (
<Head>
<title>{title} | Cal.com</title>
<title>
{title} | {APP_NAME}
</title>
<meta name="description" content={description} />
</Head>
);

View File

@ -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,