feat(management-navigation-single-company-ux): 收敛管理导航与单公司配置体验
这个提交包含在:
@@ -1,5 +1,6 @@
|
||||
import { useEffect } from "react";
|
||||
import { Navigate, Outlet, useLocation } from "react-router-dom";
|
||||
import { useAuth } from "../auth/AuthContext";
|
||||
import { AppPwaUpdateNotice } from "../components/common/AppPwaUpdateNotice";
|
||||
import { ErrorBoundary } from "../components/common/ErrorBoundary";
|
||||
import { MobileBottomNav } from "../components/mobile/MobileBottomNav";
|
||||
@@ -10,6 +11,7 @@ import { writeRecentVisit } from "../lib/recentVisits";
|
||||
import { resolveMobileEquivalentPath, shouldPreferMobileWorkplace } from "../lib/runtimeContext";
|
||||
|
||||
export function AppShellLayout() {
|
||||
const { permissions } = useAuth();
|
||||
const location = useLocation();
|
||||
const isMobileRoute = location.pathname.startsWith("/mobile");
|
||||
const mobileSearchParams = new URLSearchParams(location.search);
|
||||
@@ -52,8 +54,8 @@ export function AppShellLayout() {
|
||||
if (!pathname || pathname === "/login" || pathname.startsWith("/mobile/")) {
|
||||
return;
|
||||
}
|
||||
writeRecentVisit(pathname, resolvePageMeta(pathname).title);
|
||||
}, [location.pathname]);
|
||||
writeRecentVisit(pathname, resolvePageMeta(pathname, permissions).title, permissions);
|
||||
}, [location.pathname, permissions]);
|
||||
|
||||
if (mobileEquivalentPath && mobileEquivalentPath !== `${location.pathname}${location.search}`) {
|
||||
return <Navigate to={mobileEquivalentPath} replace />;
|
||||
|
||||
在新工单中引用
屏蔽一个用户