Improve multilingualism and fix search routes (#5334)
* fixed search routes * made static text multilingual and fixed german translations # Conflicts: # apps/web/components/availability/Schedule.tsx * delete empty file created by fixing merge conflicts * fixing TextField placeholder by passing attendeeName and fixed json variable * Using useLocal to modify static text to make it multilingual, and passing the correct variables for brand and mail * seperated whitelabel and improved translations * added missing translation * added missing translation for webhooks * Updated AdminAppsView with dynamic translations. Added translations for german and english files only. * changed back to one liner * updated german and english translations for impersonation.tsx * updated german and english translations for impersonation.tsx and users.tsx. added missing german translation for timeformat_profile_hint * updated german and english translations for team-billing-view.tsx * updated german and english translations for LicenseRequired.tsx * updated routes for profile and avatar * yarn.lock updated from newer changes * Revert " yarn.lock updated from newer changes" This reverts commit efd9a90bf774371a331861e4fb441ab4f4d0b7fd. * sanitize dangerouslySetInnerHTML to prevent xss attacks * tried to fix window title flicker * changed ssdInit to ssrInit for getServerSideProps. Serverside translation works but current route still set as a window title * flicker with route in window title is caused here. It is not necessary to check if isPublic and session is false because it already gets checked in useRedirectToLoginIfUnauthenticated hook. * fixed window title translation flicker for availability page * fixed window title translation flicker for teams page * fixed window title translation flicker for workflow page * fixed error that div may not be rendered within p element * fixed window title translation flicker for booking page * fixed window title translation flicker by adding getServerSideProps * Only set HeadSeo if an page title exists. If window title is set by the Meta component, shell is causing a flicker because it overwrites the title which is set by Meta. It is a problem especially for settings pages. * fixed window title translation flicker by adding the Meta component to the skeleton * fixed condition * removed condition and added withoutSeo for settings pages * using translations for create team page further fixed flicker for window title * fixed flicker for window title for event-type creation page * fixed flicker for window title for availability creation page * fixed flicker for window title for sso page * updated conferencing en translation * added meta.CTA back it was mistakenly removed * fixed flicker for workflows page * fixed missing variable * Update packages/ui/v2/core/Shell.tsx * Delete index.tsx * Update sso.tsx * Updates subdmoules Co-authored-by: maxi <[email protected]> Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: Omar López <[email protected]>
This commit is contained in:
74 files changed
+568
-141
No files matched your search
+43
-42
@@ -52,151 +52,151 @@ export const KBarRoot = ({ children }: { children: React.ReactNode }) => {
|
||||
|
||||
{
|
||||
id: "workflows",
|
||||
name: "Workflows",
|
||||
section: "Workflows",
|
||||
name: "workflows",
|
||||
section: "workflows",
|
||||
shortcut: ["w", "f"],
|
||||
keywords: "workflows automation",
|
||||
perform: () => router.push("/workflows"),
|
||||
},
|
||||
{
|
||||
id: "event-types",
|
||||
name: "Event Types",
|
||||
section: "Event Types",
|
||||
name: "event_types_page_title",
|
||||
section: "event_types_page_title",
|
||||
shortcut: ["e", "t"],
|
||||
keywords: "event types",
|
||||
perform: () => router.push("/event-types"),
|
||||
},
|
||||
{
|
||||
id: "app-store",
|
||||
name: "App Store",
|
||||
section: "Apps",
|
||||
name: "app_store",
|
||||
section: "apps",
|
||||
shortcut: ["a", "s"],
|
||||
keywords: "app store",
|
||||
perform: () => router.push("/apps"),
|
||||
},
|
||||
{
|
||||
id: "upcoming-bookings",
|
||||
name: "Upcoming Bookings",
|
||||
section: "Bookings",
|
||||
name: "upcoming",
|
||||
section: "bookings",
|
||||
shortcut: ["u", "b"],
|
||||
keywords: "upcoming bookings",
|
||||
perform: () => router.push("/bookings/upcoming"),
|
||||
},
|
||||
{
|
||||
id: "recurring-bookings",
|
||||
name: "Recurring Bookings",
|
||||
section: "Bookings",
|
||||
name: "recurring",
|
||||
section: "bookings",
|
||||
shortcut: ["r", "b"],
|
||||
keywords: "recurring bookings",
|
||||
perform: () => router.push("/bookings/recurring"),
|
||||
},
|
||||
{
|
||||
id: "past-bookings",
|
||||
name: "Past Bookings",
|
||||
section: "Bookings",
|
||||
name: "past",
|
||||
section: "bookings",
|
||||
shortcut: ["p", "b"],
|
||||
keywords: "past bookings",
|
||||
perform: () => router.push("/bookings/past"),
|
||||
},
|
||||
{
|
||||
id: "cancelled-bookings",
|
||||
name: "Cancelled Bookings",
|
||||
section: "Bookings",
|
||||
name: "cancelled",
|
||||
section: "bookings",
|
||||
shortcut: ["c", "b"],
|
||||
keywords: "cancelled bookings",
|
||||
perform: () => router.push("/bookings/cancelled"),
|
||||
},
|
||||
{
|
||||
id: "schedule",
|
||||
name: "Schedule",
|
||||
section: "Availability",
|
||||
name: "availability",
|
||||
section: "availability",
|
||||
shortcut: ["s", "a"],
|
||||
keywords: "schedule availability",
|
||||
perform: () => router.push("/availability"),
|
||||
},
|
||||
{
|
||||
id: "profile",
|
||||
name: "Profile",
|
||||
section: "Profile Settings",
|
||||
name: "profile",
|
||||
section: "profile",
|
||||
shortcut: ["p", "s"],
|
||||
keywords: "setting profile",
|
||||
perform: () => router.push("/settings/profile"),
|
||||
perform: () => router.push("/settings/my-account/profile"),
|
||||
},
|
||||
{
|
||||
id: "avatar",
|
||||
name: "Change Avatar",
|
||||
section: "Profile Settings",
|
||||
name: "change_avatar",
|
||||
section: "profile",
|
||||
shortcut: ["c", "a"],
|
||||
keywords: "remove change modify avatar",
|
||||
perform: () => router.push("/settings/profile"),
|
||||
perform: () => router.push("/settings/my-account/profile"),
|
||||
},
|
||||
{
|
||||
id: "timezone",
|
||||
name: "Change Timezone",
|
||||
section: "Profile Settings",
|
||||
name: "timezone",
|
||||
section: "profile",
|
||||
shortcut: ["c", "t"],
|
||||
keywords: "change modify timezone",
|
||||
perform: () => router.push("/settings/my-account/general"),
|
||||
},
|
||||
{
|
||||
id: "brand-color",
|
||||
name: "Change Brand Color",
|
||||
section: "Profile Settings",
|
||||
name: "brand_color",
|
||||
section: "profile",
|
||||
shortcut: ["b", "c"],
|
||||
keywords: "change modify brand color",
|
||||
perform: () => router.push("/settings/my-account/appearance"),
|
||||
},
|
||||
{
|
||||
id: "teams",
|
||||
name: "Teams",
|
||||
name: "teams",
|
||||
shortcut: ["t", "s"],
|
||||
keywords: "add manage modify team",
|
||||
perform: () => router.push("/settings/teams"),
|
||||
},
|
||||
{
|
||||
id: "password",
|
||||
name: "Change Password",
|
||||
section: "Security Settings",
|
||||
name: "change_password",
|
||||
section: "security",
|
||||
shortcut: ["c", "p"],
|
||||
keywords: "change modify password",
|
||||
perform: () => router.push("/settings/security"),
|
||||
perform: () => router.push("/settings/security/password"),
|
||||
},
|
||||
{
|
||||
id: "two-factor",
|
||||
name: "Two Factor Authentication",
|
||||
section: "Security Settings",
|
||||
name: "two_factor_auth",
|
||||
section: "security",
|
||||
shortcut: ["t", "f", "a"],
|
||||
keywords: "two factor authentication",
|
||||
perform: () => router.push("/settings/security/two-factor-auth"),
|
||||
},
|
||||
{
|
||||
id: "impersonation",
|
||||
name: "User Impersonation",
|
||||
section: "Security Settings",
|
||||
name: "user_impersonation_heading",
|
||||
section: "security",
|
||||
shortcut: ["u", "i"],
|
||||
keywords: "user impersonation",
|
||||
perform: () => router.push("/settings/security/impersonation"),
|
||||
},
|
||||
{
|
||||
id: "webhooks",
|
||||
name: "Webhook",
|
||||
section: "Developer Settings",
|
||||
name: "Webhooks",
|
||||
section: "developer",
|
||||
shortcut: ["w", "h"],
|
||||
keywords: "webhook automation",
|
||||
perform: () => router.push("/settings/developer/webhooks"),
|
||||
},
|
||||
{
|
||||
id: "api-keys",
|
||||
name: "API Keys",
|
||||
section: "Developer Settings",
|
||||
name: "api_keys",
|
||||
section: "developer",
|
||||
shortcut: ["a", "p", "i"],
|
||||
keywords: "api keys",
|
||||
perform: () => router.push("/settings/developer/api-keys"),
|
||||
},
|
||||
{
|
||||
id: "billing",
|
||||
name: "View and Manage Billing",
|
||||
section: "Billing",
|
||||
name: "manage_billing",
|
||||
section: "billing",
|
||||
shortcut: ["m", "b"],
|
||||
keywords: "billing view manage",
|
||||
perform: () => router.push("/settings/billing"),
|
||||
@@ -272,13 +272,14 @@ const DisplayShortcuts = (item: shortcutArrayType) => {
|
||||
|
||||
function RenderResults() {
|
||||
const { results } = useMatches();
|
||||
const { t } = useLocale();
|
||||
|
||||
return (
|
||||
<KBarResults
|
||||
items={results}
|
||||
onRender={({ item, active }) =>
|
||||
typeof item === "string" ? (
|
||||
<div className="bg-white p-4 text-xs uppercase text-gray-500">{item}</div>
|
||||
<div className="bg-white p-4 text-xs uppercase text-gray-500">{t(item)}</div>
|
||||
) : (
|
||||
<div
|
||||
// For seeing keyboard up & down navigation in action, we need visual feedback based on "active" prop
|
||||
@@ -287,7 +288,7 @@ function RenderResults() {
|
||||
borderLeft: active ? "2px solid black" : "2px solid transparent",
|
||||
}}
|
||||
className="flex items-center justify-between px-4 py-2.5 text-sm hover:cursor-pointer">
|
||||
<span>{item.name}</span>
|
||||
<span>{t(item.name)}</span>
|
||||
<DisplayShortcuts shortcuts={item.shortcut} />
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -31,9 +31,9 @@ export default function EmptyScreen({
|
||||
</div>
|
||||
<div className="flex max-w-[420px] flex-col items-center">
|
||||
<h2 className="text-semibold font-cal mt-6 text-xl dark:text-gray-300">{headline}</h2>
|
||||
<p className="mt-3 mb-8 text-center text-sm font-normal leading-6 text-gray-700 dark:text-gray-300">
|
||||
<div className="mt-3 mb-8 text-center text-sm font-normal leading-6 text-gray-700 dark:text-gray-300">
|
||||
{description}
|
||||
</p>
|
||||
</div>
|
||||
{buttonOnClick && buttonText && <Button onClick={(e) => buttonOnClick(e)}>{buttonText}</Button>}
|
||||
{buttonRaw}
|
||||
</div>
|
||||
|
||||
@@ -203,8 +203,6 @@ export default function Shell(props: LayoutProps) {
|
||||
useRedirectToLoginIfUnauthenticated(props.isPublic);
|
||||
useRedirectToOnboardingIfNeeded();
|
||||
useTheme("light");
|
||||
const { session } = useRedirectToLoginIfUnauthenticated(props.isPublic);
|
||||
if (!session && !props.isPublic) return null;
|
||||
|
||||
return (
|
||||
<KBarRoot>
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
import Meta from "../Meta";
|
||||
import { ShellSubHeading } from "../Shell";
|
||||
import { SkeletonText } from "../skeleton";
|
||||
|
||||
function SkeletonLoader({ className }: { className?: string }) {
|
||||
function SkeletonLoader({
|
||||
className,
|
||||
title,
|
||||
description,
|
||||
}: {
|
||||
className?: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<ShellSubHeading title={<div className="h-6 w-32 bg-gray-100" />} {...{ className }} />
|
||||
{title && description && <Meta title={title} description={description} />}
|
||||
|
||||
<ul className="-mx-4 animate-pulse divide-y divide-neutral-200 rounded-md border border-gray-200 bg-white sm:mx-0 sm:overflow-hidden">
|
||||
<SkeletonItem />
|
||||
<SkeletonItem />
|
||||
|
||||
@@ -122,7 +122,7 @@ const SettingsSidebarContainer = ({ className = "" }) => {
|
||||
<>
|
||||
<div className="desktop-only pt-4" />
|
||||
<VerticalTabItem
|
||||
name="Back"
|
||||
name={t("back")}
|
||||
href="/."
|
||||
icon={Icon.FiArrowLeft}
|
||||
textClassNames="text-md font-medium leading-none text-black"
|
||||
@@ -327,6 +327,7 @@ export default function SettingsLayout({
|
||||
|
||||
return (
|
||||
<Shell
|
||||
withoutSeo={true}
|
||||
flexChildrenContainer
|
||||
{...rest}
|
||||
SidebarContainer={<SettingsSidebarContainer className="hidden lg:flex" />}
|
||||
|
||||
Reference in new issue
Block a user