added ping.gg app (#3728)
* added ping.gg app, not sure why its not showing * nit * Fixes * fixed email Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
1 parent
1a3aaa134e
commit
1332b76441
23 files changed
+192
-12
No files matched your search
@@ -52,6 +52,9 @@ export const locationKeyToString = (location: LocationObject, t: TFunction) => {
|
||||
case LocationType.InPerson:
|
||||
return location.address || "In Person"; // If disabled address won't exist on the object
|
||||
case LocationType.Link:
|
||||
case LocationType.Ping:
|
||||
case LocationType.Riverside:
|
||||
case LocationType.Whereby:
|
||||
return location.link || "Link"; // If disabled link won't exist on the object
|
||||
case LocationType.Phone:
|
||||
return t("your_number");
|
||||
|
||||
@@ -334,6 +334,9 @@ const BookingPage = ({
|
||||
case LocationType.Whereby: {
|
||||
return locationInfo(locationType)?.link || "";
|
||||
}
|
||||
case LocationType.Ping: {
|
||||
return locationInfo(locationType)?.link || "";
|
||||
}
|
||||
// Catches all other location types, such as Google Meet, Zoom etc.
|
||||
default:
|
||||
return selectedLocation || "";
|
||||
|
||||
@@ -85,6 +85,11 @@ export const EditLocationDialog = (props: ISetLocationDialog) => {
|
||||
.string()
|
||||
.regex(/^http(s)?:\/\/(www\.)?around.co\/[a-zA-Z0-9]*/)
|
||||
.optional()
|
||||
: selection?.value === LocationType.Ping
|
||||
? z
|
||||
.string()
|
||||
.regex(/^http(s)?:\/\/(www\.)?ping.gg\/call\/[a-zA-Z0-9]*/)
|
||||
.optional()
|
||||
: selection?.value === LocationType.Riverside
|
||||
? z
|
||||
.string()
|
||||
@@ -324,6 +329,54 @@ export const EditLocationDialog = (props: ISetLocationDialog) => {
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
) : selectedLocation === LocationType.Ping ? (
|
||||
<>
|
||||
<div>
|
||||
<label htmlFor="address" className="block text-sm font-medium text-gray-700">
|
||||
{t("set_ping_link")}
|
||||
</label>
|
||||
<div className="mt-1">
|
||||
<input
|
||||
type="text"
|
||||
{...locationFormMethods.register("locationLink")}
|
||||
id="pinglink"
|
||||
placeholder="https://www.ping.gg/call/theo"
|
||||
required
|
||||
className="block w-full rounded-sm border-gray-300 text-sm"
|
||||
defaultValue={
|
||||
defaultValues
|
||||
? defaultValues.find(
|
||||
(location: { type: LocationType }) => location.type === LocationType.Ping
|
||||
)?.address
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
{!booking && (
|
||||
<div className="mt-3">
|
||||
<Controller
|
||||
name="displayLocationPublicly"
|
||||
control={locationFormMethods.control}
|
||||
render={() => (
|
||||
<CheckboxField
|
||||
defaultChecked={
|
||||
defaultValues
|
||||
? defaultValues.find((location) => location.type === LocationType.Ping)
|
||||
?.displayLocationPublicly
|
||||
: undefined
|
||||
}
|
||||
description={t("display_location_label")}
|
||||
onChange={(e) =>
|
||||
locationFormMethods.setValue("displayLocationPublicly", e.target.checked)
|
||||
}
|
||||
informationIconText={t("display_location_info_badge")}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
) : selectedLocation === LocationType.Riverside ? (
|
||||
<>
|
||||
<div>
|
||||
@@ -416,7 +469,8 @@ export const EditLocationDialog = (props: ISetLocationDialog) => {
|
||||
newLocation === LocationType.Link ||
|
||||
newLocation === LocationType.Whereby ||
|
||||
newLocation === LocationType.Around ||
|
||||
newLocation === LocationType.Riverside
|
||||
newLocation === LocationType.Riverside ||
|
||||
newLocation === LocationType.Ping
|
||||
) {
|
||||
details = { link: values.locationLink, displayLocationPublicly };
|
||||
}
|
||||
|
||||
@@ -474,7 +474,8 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {
|
||||
newLocationType === LocationType.UserPhone ||
|
||||
newLocationType === LocationType.Whereby ||
|
||||
newLocationType === LocationType.Around ||
|
||||
newLocationType === LocationType.Riverside
|
||||
newLocationType === LocationType.Riverside ||
|
||||
newLocationType === LocationType.Ping
|
||||
) {
|
||||
openLocationModal(newLocationType);
|
||||
} else {
|
||||
@@ -485,6 +486,8 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* TODO: all of this should be generated from the App Store */}
|
||||
{formMethods.getValues("locations").length > 0 && (
|
||||
<ul>
|
||||
{formMethods.getValues("locations").map((location) => (
|
||||
@@ -522,19 +525,25 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {
|
||||
)}
|
||||
{location.type === LocationType.Whereby && (
|
||||
<div className="flex flex-grow items-center">
|
||||
<img src="/api/app-store/whereby/icon.svg" className="h-6 w-6" alt="whereby logo" />
|
||||
<img src="/api/app-store/whereby/icon.svg" className="h-6 w-6" alt="Whereby logo" />
|
||||
<span className="text-sm ltr:ml-2 rtl:mr-2">{location.link}</span>
|
||||
</div>
|
||||
)}
|
||||
{location.type === LocationType.Around && (
|
||||
<div className="flex flex-grow items-center">
|
||||
<img src="/api/app-store/around/icon.svg" className="h-6 w-6" alt="whereby logo" />
|
||||
<img src="/api/app-store/around/icon.svg" className="h-6 w-6" alt="Around logo" />
|
||||
<span className="text-sm ltr:ml-2 rtl:mr-2">{location.link}</span>
|
||||
</div>
|
||||
)}
|
||||
{location.type === LocationType.Riverside && (
|
||||
<div className="flex flex-grow items-center">
|
||||
<img src="/api/app-store/riverside/icon.svg" className="h-6 w-6" alt="whereby logo" />
|
||||
<img src="/api/app-store/riverside/icon.svg" className="h-6 w-6" alt="Riverside logo" />
|
||||
<span className="text-sm ltr:ml-2 rtl:mr-2">{location.link}</span>
|
||||
</div>
|
||||
)}
|
||||
{location.type === LocationType.Ping && (
|
||||
<div className="flex flex-grow items-center">
|
||||
<img src="/api/app-store/ping/icon.svg" className="h-6 w-6" alt="Ping logo" />
|
||||
<span className="text-sm ltr:ml-2 rtl:mr-2">{location.link}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -1026,5 +1026,6 @@
|
||||
"variable_format": "Variable format",
|
||||
"custom_input_as_variable_info": "Ignore all special characters of the additonal input label (use only letters and numbers), use uppercase for all letters and replace whitespaces with underscores.",
|
||||
"using_additional_inputs_as_variables": "How to use additional inputs as variables?",
|
||||
"missing_connected_calendar": "No calendar connected"
|
||||
"missing_connected_calendar": "No calendar connected",
|
||||
"set_ping_link": "Set Ping link"
|
||||
}
|
||||
Reference in new issue
Block a user