der tenant admin hat eine neue, mobil unterstützende UI, login redirect funktioniert, typescript fehler wurden bereinigt. Neue Blog Posts von ChatGPT eingebaut, übersetzt von Gemini 2.5
This commit is contained in:
@@ -4,8 +4,15 @@ import { type SharedData } from '@/types';
|
||||
|
||||
export default function AppLogo() {
|
||||
const { translations } = usePage<SharedData>().props;
|
||||
const areaLabel =
|
||||
(translations?.dashboard?.navigation?.group_label as string | undefined) ?? 'Kundenbereich';
|
||||
const navigationTranslations =
|
||||
translations && typeof translations.dashboard === 'object' && translations.dashboard !== null
|
||||
? (translations.dashboard as Record<string, unknown>).navigation
|
||||
: null;
|
||||
const groupLabel =
|
||||
navigationTranslations && typeof navigationTranslations === 'object' && navigationTranslations !== null
|
||||
? (navigationTranslations as Record<string, unknown>).group_label
|
||||
: null;
|
||||
const areaLabel = typeof groupLabel === 'string' ? groupLabel : 'Kundenbereich';
|
||||
|
||||
return (
|
||||
<div className="flex items-center gap-3">
|
||||
|
||||
@@ -19,7 +19,15 @@ export function DashboardLanguageSwitcher() {
|
||||
const { locale, supportedLocales, translations } = page.props;
|
||||
const locales = supportedLocales && supportedLocales.length > 0 ? supportedLocales : ['de', 'en'];
|
||||
const activeLocale = locales.includes(locale as string) && typeof locale === 'string' ? locale : locales[0];
|
||||
const languageCopy = (translations?.dashboard?.language_switcher as Record<string, string | undefined>) ?? {};
|
||||
const dashboardTranslations =
|
||||
translations && typeof translations.dashboard === 'object' && translations.dashboard !== null
|
||||
? (translations.dashboard as Record<string, unknown>)
|
||||
: null;
|
||||
const languageSwitcherTranslations =
|
||||
dashboardTranslations && typeof dashboardTranslations.language_switcher === 'object'
|
||||
? (dashboardTranslations.language_switcher as Record<string, string | undefined>)
|
||||
: {};
|
||||
const languageCopy = languageSwitcherTranslations ?? {};
|
||||
const label = languageCopy.label ?? 'Sprache';
|
||||
const changeLabel = languageCopy.change ?? 'Sprache wechseln';
|
||||
|
||||
|
||||
@@ -5,8 +5,15 @@ import { Link, usePage } from '@inertiajs/react';
|
||||
export function NavMain({ items = [] }: { items: NavItem[] }) {
|
||||
const page = usePage<SharedData>();
|
||||
const { translations } = page.props;
|
||||
const groupLabel =
|
||||
(translations?.dashboard?.navigation?.group_label as string | undefined) ?? 'Kundenbereich';
|
||||
const navigationTranslations =
|
||||
translations && typeof translations.dashboard === 'object' && translations.dashboard !== null
|
||||
? (translations.dashboard as Record<string, unknown>).navigation
|
||||
: null;
|
||||
const groupLabelValue =
|
||||
navigationTranslations && typeof navigationTranslations === 'object' && navigationTranslations !== null
|
||||
? (navigationTranslations as Record<string, unknown>).group_label
|
||||
: null;
|
||||
const groupLabel = typeof groupLabelValue === 'string' ? groupLabelValue : 'Kundenbereich';
|
||||
|
||||
return (
|
||||
<SidebarGroup className="px-2 py-0">
|
||||
|
||||
Reference in New Issue
Block a user