Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
+9
-3
@@ -1,10 +1,11 @@
|
||||
import { loadRequiredWebConfig } from "@toolctrl/config";
|
||||
import { getAuthUserWithoutPasswordById as getUser, getTenantById as getTenant, getTenantByIdOrSlug } from "@toolctrl/db/auth-boundary.server";
|
||||
import { loadRequiredWebConfig } from "@hivegrid/config";
|
||||
import { getAuthUserWithoutPasswordById as getUser, getTenantById as getTenant, getTenantByIdOrSlug } from "@hivegrid/db/auth-boundary.server";
|
||||
import { Params } from "react-router";
|
||||
import { AnalyticsInfoDto } from "~/application/dtos/marketing/AnalyticsInfoDto";
|
||||
import { ImpersonatingSessionDto } from "~/application/dtos/session/ImpersonatingSessionDto";
|
||||
import { CookieCategory } from "~/application/cookies/CookieCategory";
|
||||
import { remixI18Next, i18nCookie } from "~/locale/i18next.server";
|
||||
import { resolveAnrede } from "~/locale/anrede.server";
|
||||
import { getCurrentEnabledFlagNames } from "~/utils/services/.server/featureFlagsRequest.server";
|
||||
import { createMetrics } from "~/modules/metrics/services/.server/MetricTracker";
|
||||
import { getAnalyticsSession, generateAnalyticsUserId, commitAnalyticsSession, destroyAnalyticsSession } from "~/utils/analyticsCookie.server";
|
||||
@@ -71,12 +72,18 @@ export async function loadRootData({ request, params }: { request: Request; para
|
||||
}
|
||||
|
||||
const locale = await remixI18Next.getLocale(request);
|
||||
// Formality axis (du/Sie). Default "du" → `effectiveLng(locale, "du") === locale`,
|
||||
// so the language handed to `useChangeLanguage` in root.tsx is unchanged and
|
||||
// rendering stays byte-identical. The tenant's persisted default applies when
|
||||
// no explicit cookie/param is present.
|
||||
const anrede = await resolveAnrede(request, currentTenant);
|
||||
const webConfig = loadRequiredWebConfig();
|
||||
const data: AppRootData = {
|
||||
metatags: [{ title: webConfig.appName }],
|
||||
user,
|
||||
currentTenant,
|
||||
locale,
|
||||
anrede,
|
||||
theme: userInfo.theme || appConfiguration.app.theme,
|
||||
serverUrl: getBaseURL(request),
|
||||
publicBaseUrl: getAbsoluteUrl(request, "/"),
|
||||
@@ -86,7 +93,6 @@ export async function loadRootData({ request, params }: { request: Request; para
|
||||
userSession: userInfo,
|
||||
authenticated: userInfo.userId?.length > 0,
|
||||
debug: webConfig.nodeEnv === "development",
|
||||
isStripeTest: webConfig.stripe.secretKey?.startsWith("sk_test_") ?? true,
|
||||
chatWebsiteId: webConfig.crisp.chatWebsiteId,
|
||||
appConfiguration,
|
||||
csrf,
|
||||
|
||||
Reference in new issue
Block a user