UI - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: унификация верхней шапки NodeDC

This commit is contained in:
DCCONSTRUCTIONS
2026-05-05 15:00:53 +03:00
parent 4400b7f438
commit a111574039
4 changed files with 80 additions and 21 deletions
@@ -13,7 +13,7 @@ function WorkspaceLayout() {
return (
<>
<ProjectsAppPowerKProvider />
<div className="relative flex h-full w-full flex-col overflow-hidden rounded-lg border border-subtle">
<div className="nodedc-project-shell-frame relative flex h-full w-full flex-col overflow-hidden rounded-lg">
<div id="full-screen-portal" className="absolute inset-0 w-full" />
<div className="relative flex size-full overflow-hidden">
<main className="relative flex h-full w-full min-w-0 flex-col overflow-hidden bg-surface-1">
@@ -8,9 +8,11 @@
import { useTranslation } from "@plane/i18n";
import { Shapes } from "lucide-react";
import { useEffect, useState } from "react";
import { cn } from "@plane/utils";
// components
import { TopNavPowerK } from "@/components/navigation";
import { buildNodeDCBrandConfigUrl, buildNodeDCLauncherUrl } from "@/helpers/nodedc-auth";
import { UserMenuRoot } from "@/components/workspace/sidebar/user-menu-root";
import { WorkspaceMenuRoot } from "@/components/workspace/sidebar/workspace-menu-root";
import { useHome } from "@/hooks/store/use-home";
@@ -30,17 +32,35 @@ export const ExpandedProjectShellToolbarLayout = ({
}: TProjectShellToolbarLayoutProps) => {
const { t } = useTranslation();
const { toggleWidgetSettings } = useHome();
const [logoLinkUrl, setLogoLinkUrl] = useState(buildNodeDCLauncherUrl);
useEffect(() => {
let isMounted = true;
fetch(buildNodeDCBrandConfigUrl(), { cache: "no-store" })
.then((response) => (response.ok ? response.json() : null))
.then((payload: { logoLinkUrl?: string } | null) => {
if (isMounted && payload?.logoLinkUrl) {
setLogoLinkUrl(payload.logoLinkUrl);
}
})
.catch((error: unknown) => {
console.warn(error instanceof Error ? error.message : "Не удалось загрузить brand config NODE.DC");
});
return () => {
isMounted = false;
};
}, []);
return (
<div
className={cn("nodedc-expanded-toolbar-shell w-full flex-shrink-0 px-5 pt-4 pb-3", {
"nodedc-home-top-toolbar": isWorkspaceHome,
})}
>
<div className={cn("nodedc-expanded-toolbar-shell", { "nodedc-home-top-toolbar": isWorkspaceHome })}>
<div className="nodedc-expanded-toolbar">
<div className="nodedc-expanded-toolbar-top">
<div className="nodedc-expanded-toolbar-left">
<img src="/nodedc-logo.svg" alt="NODE DC" className="nodedc-expanded-brand-logo" />
<a href={logoLinkUrl} className="nodedc-expanded-brand-link" aria-label="NODE.DC">
<img src="/nodedc-logo.svg" alt="NODE DC" className="nodedc-expanded-brand-logo" />
</a>
</div>
<div className="nodedc-expanded-toolbar-center">