From 06a6160a465dc6b4a278ac5d653b6aee087eab84 Mon Sep 17 00:00:00 2001 From: DCCONSTRUCTIONS Date: Tue, 12 May 2026 15:29:49 +0300 Subject: [PATCH] =?UTF-8?q?UI=20-=20=D0=9C=D0=95=D0=96=D0=9F=D0=A0=D0=9E?= =?UTF-8?q?=D0=95=D0=9A=D0=A2=D0=9D=D0=90=D0=AF=20=D0=9A=D0=9E=D0=9C=D0=9C?= =?UTF-8?q?=D0=A3=D0=9D=D0=98=D0=9A=D0=90=D0=A6=D0=98=D0=AF:=20=D0=B2?= =?UTF-8?q?=D0=B8=D1=82=D1=80=D0=B8=D0=BD=D0=B0=20=D1=81=D0=B5=D1=80=D0=B2?= =?UTF-8?q?=D0=B8=D1=81=D0=BE=D0=B2=20=D0=B8=20=D1=82=D0=B0=D0=B1=D0=BB?= =?UTF-8?q?=D0=B8=D1=86=D1=8B=20Launcher?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/dev-server.mjs | 2 +- src/app/LauncherApp.tsx | 10 +-- src/styles/globals.css | 33 ++++++-- src/widgets/admin-overlay/AdminOverlay.tsx | 8 +- src/widgets/top-bar/TopBar.tsx | 97 ++++++++++++---------- 5 files changed, 86 insertions(+), 64 deletions(-) diff --git a/server/dev-server.mjs b/server/dev-server.mjs index d0df8ab..3f60004 100644 --- a/server/dev-server.mjs +++ b/server/dev-server.mjs @@ -1921,7 +1921,7 @@ function getAppsForUser(userGroups) { hasAccess, accessReason: hasAccess ? "Доступ подтверждён" : "Нет доступа", }; - }).filter((app) => app.hasAccess); + }); } function getAppCatalog() { diff --git a/src/app/LauncherApp.tsx b/src/app/LauncherApp.tsx index 6b90740..e67b967 100644 --- a/src/app/LauncherApp.tsx +++ b/src/app/LauncherApp.tsx @@ -171,16 +171,16 @@ export function LauncherApp() { effectiveAccess: { ...service.effectiveAccess, allowed: false, - visible: false, + visible: true, openEnabled: false, reason: "Нет доступа", }, }; } - const appVisible = app.hasAccess && app.status !== "hidden" && app.status !== "disabled"; - const allowed = appVisible && service.effectiveAccess.allowed; - const openEnabled = appVisible && app.status === "active" && service.effectiveAccess.openEnabled; + const appVisible = app.status !== "hidden" && app.status !== "disabled"; + const allowed = app.hasAccess && appVisible && service.effectiveAccess.allowed; + const openEnabled = allowed && app.status === "active" && service.effectiveAccess.openEnabled; return { ...service, @@ -191,7 +191,7 @@ export function LauncherApp() { effectiveAccess: { ...service.effectiveAccess, allowed, - visible: appVisible && service.effectiveAccess.visible, + visible: appVisible, openEnabled, reason: !app.hasAccess ? app.accessReason || "Нет доступа" : service.effectiveAccess.reason, }, diff --git a/src/styles/globals.css b/src/styles/globals.css index b223763..f61f44c 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -2259,15 +2259,20 @@ code { background: var(--access-matrix-table-bg) !important; } -.table-shell--users { +.table-shell--users, +.table-shell--sticky-user-column { position: relative; --admin-users-table-bg: rgb(20, 20, 22); - margin-top: 1rem; padding: 0 0 1rem; background: var(--admin-users-table-bg) !important; } -.table-shell--users .table-toolbar { +.table-shell--users { + margin-top: 1rem; +} + +.table-shell--users .table-toolbar, +.table-shell--sticky-user-column .table-toolbar { position: sticky; left: 0; z-index: 6; @@ -2278,7 +2283,8 @@ code { background: var(--admin-users-table-bg); } -.table-shell--users .admin-data-table { +.table-shell--users .admin-data-table, +.table-shell--sticky-user-column .admin-data-table { margin: 0; } @@ -2288,12 +2294,16 @@ code { } .admin-data-table--users th, -.admin-data-table--users td { +.admin-data-table--users td, +.admin-data-table--sticky-user-column th, +.admin-data-table--sticky-user-column td { white-space: nowrap; } .admin-data-table--users th:nth-child(1), -.admin-data-table--users td:nth-child(1) { +.admin-data-table--users td:nth-child(1), +.admin-data-table--sticky-user-column th:nth-child(1), +.admin-data-table--sticky-user-column td:nth-child(1) { position: sticky; left: 0; z-index: 3; @@ -2302,7 +2312,8 @@ code { background: var(--admin-users-table-bg); } -.admin-data-table--users th:nth-child(1) { +.admin-data-table--users th:nth-child(1), +.admin-data-table--sticky-user-column th:nth-child(1) { z-index: 4; } @@ -2345,6 +2356,12 @@ code { table-layout: fixed; } +.admin-data-table--platform-users th:nth-child(1), +.admin-data-table--platform-users td:nth-child(1) { + width: 18rem; + min-width: 18rem; +} + .admin-data-table--platform-users th, .admin-data-table--platform-users td { white-space: nowrap; @@ -3682,7 +3699,7 @@ code { } .access-cell-menu { - min-width: 10.75rem; + min-width: 20rem; } .access-cell-menu .nodedc-ui-option[data-tone="green"][data-selected="true"] { diff --git a/src/widgets/admin-overlay/AdminOverlay.tsx b/src/widgets/admin-overlay/AdminOverlay.tsx index 38b4199..a89e118 100644 --- a/src/widgets/admin-overlay/AdminOverlay.tsx +++ b/src/widgets/admin-overlay/AdminOverlay.tsx @@ -1040,7 +1040,7 @@ function PlatformUsersSection({ return ( <> - +

Пользователи платформы

@@ -1049,7 +1049,7 @@ function PlatformUsersSection({

- +
@@ -1346,7 +1346,7 @@ const accessAssignmentOptions: Array> ]; const publicOperationalCoreAccessOptions: Array> = [ - { value: "unset", label: "—", description: "Не назначен" }, + { value: "unset", label: "—", description: "Не назначен", hidden: true }, { value: "viewer", label: "Workspace Guest", description: "Доступ к приглашённому workspace", tone: "green" }, { value: "member", label: "Workspace Member", description: "Доступ к приглашённому workspace", tone: "green" }, { value: "admin", label: "Service Admin", description: "Self-service", tone: "green" }, @@ -3196,7 +3196,7 @@ function MainStatusControl({ value={value} options={mainStatusOptions} label="MAIN статус" - minMenuWidth={172} + minMenuWidth={320} menuClassName="access-cell-menu" onChange={onChange} trigger={({ open, toggle, setTriggerRef, selectedOption }) => ( diff --git a/src/widgets/top-bar/TopBar.tsx b/src/widgets/top-bar/TopBar.tsx index cb6e38d..54876f7 100644 --- a/src/widgets/top-bar/TopBar.tsx +++ b/src/widgets/top-bar/TopBar.tsx @@ -53,6 +53,7 @@ export function TopBar({ description: client.legalName ?? undefined, })); const canOpenPlatform = me.launcherRole === "root_admin"; + const showLauncherNavigation = me.permissions.canOpenAdmin || canOpenPlatform; return (
@@ -65,55 +66,59 @@ export function TopBar({
- onClientChange(clientId)} - trigger={({ open, toggle, setTriggerRef }) => ( - - )} - /> + {showLauncherNavigation ? ( + <> + onClientChange(clientId)} + trigger={({ open, toggle, setTriggerRef }) => ( + + )} + /> - + + ) : null}
Пользователь