feat(ui): clean settings duplicates, move agents to start page, remove from topbar dropdown
This commit is contained in:
@@ -178,14 +178,6 @@ export function TopBar() {
|
|||||||
<Zap className="w-4 h-4" aria-hidden="true" strokeWidth={2} />
|
<Zap className="w-4 h-4" aria-hidden="true" strokeWidth={2} />
|
||||||
{t('nav.automation', 'Automation')}
|
{t('nav.automation', 'Automation')}
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
onClick={() => { setUserMenuOpen(false); navigate('/agents'); }}
|
|
||||||
className="w-full text-left px-3 py-2 text-sm hover:bg-secondary-50 min-h-touch focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 flex items-center gap-2"
|
|
||||||
role="menuitem"
|
|
||||||
>
|
|
||||||
<Bot className="w-4 h-4" aria-hidden="true" strokeWidth={2} />
|
|
||||||
{t('nav.agents', 'Agenten')}
|
|
||||||
</button>
|
|
||||||
{canAccess('audit:read') && (
|
{canAccess('audit:read') && (
|
||||||
<button
|
<button
|
||||||
onClick={() => { setUserMenuOpen(false); navigate('/audit-log'); }}
|
onClick={() => { setUserMenuOpen(false); navigate('/audit-log'); }}
|
||||||
|
|||||||
@@ -44,8 +44,11 @@ export function SettingsPage() {
|
|||||||
];
|
];
|
||||||
|
|
||||||
const existingPaths = new Set(hardcodedNavItems.map(item => item.to));
|
const existingPaths = new Set(hardcodedNavItems.map(item => item.to));
|
||||||
|
// Filter out plugin nav items that are duplicates of hardcoded ones
|
||||||
|
const duplicateLabels = new Set(['Roles', 'Users', 'Groups', 'AI Settings', 'Automation', 'Proactive AI']);
|
||||||
const pluginNavItems = pluginSettingsPages
|
const pluginNavItems = pluginSettingsPages
|
||||||
.filter(p => !existingPaths.has(`/settings/${p.path}`))
|
.filter(p => !existingPaths.has(`/settings/${p.path}`))
|
||||||
|
.filter(p => !duplicateLabels.has(p.label))
|
||||||
.map(p => ({
|
.map(p => ({
|
||||||
to: `/settings/${p.path}`,
|
to: `/settings/${p.path}`,
|
||||||
label: t(p.label_key, p.label),
|
label: t(p.label_key, p.label),
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { useNavigate } from 'react-router-dom';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useAuthStore } from '@/store/authStore';
|
import { useAuthStore } from '@/store/authStore';
|
||||||
import { useUIStore } from '@/store/uiStore';
|
import { useUIStore } from '@/store/uiStore';
|
||||||
import { Settings, HelpCircle, LayoutGrid, ArrowRight, Plus } from 'lucide-react';
|
import { Settings, HelpCircle, LayoutGrid, ArrowRight, Plus, Bot } from 'lucide-react';
|
||||||
|
|
||||||
// Workspace tile definition
|
// Workspace tile definition
|
||||||
interface WorkspaceTile {
|
interface WorkspaceTile {
|
||||||
@@ -40,6 +40,7 @@ export function StartPage() {
|
|||||||
const menuItems = [
|
const menuItems = [
|
||||||
{ id: 'workspaces', label: 'Workspaces', icon: <LayoutGrid className="w-4 h-4" />, active: true },
|
{ id: 'workspaces', label: 'Workspaces', icon: <LayoutGrid className="w-4 h-4" />, active: true },
|
||||||
{ id: 'settings', label: 'Einstellungen', icon: <Settings className="w-4 h-4" />, onClick: () => navigate('/settings') },
|
{ id: 'settings', label: 'Einstellungen', icon: <Settings className="w-4 h-4" />, onClick: () => navigate('/settings') },
|
||||||
|
{ id: 'agents', label: 'Agenten', icon: <Bot className="w-4 h-4" />, onClick: () => navigate('/agents') },
|
||||||
{ id: 'help', label: 'Hilfe', icon: <HelpCircle className="w-4 h-4" />, onClick: () => navigate('/help/welcome') },
|
{ id: 'help', label: 'Hilfe', icon: <HelpCircle className="w-4 h-4" />, onClick: () => navigate('/help/welcome') },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user