From dbf2789368518953af2d76868ec0a3568dbd3aaa Mon Sep 17 00:00:00 2001 From: Yann Stepienik Date: Tue, 18 Feb 2025 20:41:00 +0000 Subject: [PATCH] [release] v0.18.0-unstable93 --- client/src/menu-items/dashboard.jsx | 11 +++++++---- client/src/routes/MainRoutes.jsx | 1 + package.json | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/client/src/menu-items/dashboard.jsx b/client/src/menu-items/dashboard.jsx index 22d018d..9a2c085 100644 --- a/client/src/menu-items/dashboard.jsx +++ b/client/src/menu-items/dashboard.jsx @@ -1,5 +1,6 @@ // assets import { HomeOutlined, AppstoreOutlined, DashboardOutlined, AppstoreAddOutlined, CheckOutlined } from '@ant-design/icons'; +import { isDomain } from '../utils/indexs'; // icons const icons = { @@ -8,11 +9,13 @@ const icons = { // ==============================|| MENU ITEMS - DASHBOARD ||============================== // +const isLocal = !isDomain(window.location.hostname) || window.location.hostname.endsWith('.local'); + const dashboard = { id: 'group-dashboard', title: 'menu-items.navigation', type: 'group', - children: [ + children: ([ { id: 'home', title: 'menu-items.navigation.home', @@ -38,15 +41,15 @@ const dashboard = { icon: AppstoreAddOutlined, breadcrumbs: false }, - { + isLocal ? { id: 'trust', title: 'menu-items.navigation.trustTitle', type: 'item', url: '/cosmos-ui/trust', icon: CheckOutlined, breadcrumbs: false - }, - ] + } : [], + ]).flat(), }; export default dashboard; diff --git a/client/src/routes/MainRoutes.jsx b/client/src/routes/MainRoutes.jsx index 4af2dc0..f9fb3c1 100644 --- a/client/src/routes/MainRoutes.jsx +++ b/client/src/routes/MainRoutes.jsx @@ -21,6 +21,7 @@ import TrustPage from '../pages/config/trust'; import AllBackupsIndex from '../pages/backups'; import SingleBackupIndex from '../pages/backups/single-backup-index'; import SingleRepoIndex from '../pages/backups/single-repo-index'; +import { isDomain } from '../utils/indexs'; // ==============================|| MAIN ROUTING ||============================== // diff --git a/package.json b/package.json index e5bee2a..28abe34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cosmos-server", - "version": "0.18.0-unstable92", + "version": "0.18.0-unstable93", "description": "", "main": "test-server.js", "bugs": {