feat(governance): Integrate ReportButton across UI
- Add ReportButton to CityRoomView header - Add ReportButton to AgentCabinet header - Add GOVERNANCE link to main Navigation - Import Shield icon from lucide-react
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import { Home, Settings, Zap, Network, Activity, Users, MessageSquare, Globe, Plus } from 'lucide-react';
|
||||
import { Home, Settings, Zap, Network, Activity, Users, MessageSquare, Globe, Plus, Shield } from 'lucide-react';
|
||||
|
||||
export function Navigation() {
|
||||
const location = useLocation();
|
||||
@@ -8,6 +8,7 @@ export function Navigation() {
|
||||
{ path: '/', label: 'Головна', icon: Home },
|
||||
{ path: '/console', label: 'Console', icon: Settings },
|
||||
{ path: '/nodes', label: 'НОДИ', icon: Network },
|
||||
{ path: '/governance', label: 'GOVERNANCE', icon: Shield },
|
||||
{ path: '/space', label: 'КОСМОС', icon: Zap },
|
||||
{ path: '/network', label: 'МЕРЕЖА', icon: Globe },
|
||||
{ path: '/connect-node', label: 'ПІДКЛЮЧИТИ', icon: Plus },
|
||||
|
||||
@@ -6,6 +6,7 @@ import { VisibilityCard } from './components/VisibilityCard';
|
||||
import { AgentChatWidget } from './components/AgentChatWidget';
|
||||
import { MicroDaoWizard } from './components/MicroDaoWizard';
|
||||
import { GovernanceLevelBadge } from '../governance/components/GovernanceLevelBadge';
|
||||
import { ReportButton } from '../governance/components/ReportButton';
|
||||
import { governanceApi } from '../../api/governance';
|
||||
import { GOV_LEVEL_LABELS, POWER_LABELS } from '../../types/governance';
|
||||
import type { AgentGovLevel, GovernancePower } from '../../types/governance';
|
||||
@@ -104,7 +105,14 @@ export function AgentCabinet() {
|
||||
</div>
|
||||
|
||||
<div className="flex gap-2">
|
||||
<button
|
||||
<ReportButton
|
||||
targetScopeType="agent"
|
||||
targetScopeId={profile.agent_id}
|
||||
actorDaisId="dais-demo-user"
|
||||
variant="icon"
|
||||
className="border border-gray-300 hover:border-red-300"
|
||||
/>
|
||||
<button
|
||||
onClick={refetch}
|
||||
className="px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-50 text-gray-700"
|
||||
>
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
} from '../../../api/cityRooms';
|
||||
import { WebSocketClient } from '../../../lib/ws';
|
||||
import { RoomBrandHeader } from '../../microdao/components/RoomBrandHeader';
|
||||
import { ReportButton } from '../../governance/components/ReportButton';
|
||||
|
||||
export function CityRoomView() {
|
||||
const { roomId } = useParams<{ roomId: string }>();
|
||||
@@ -134,12 +135,21 @@ export function CityRoomView() {
|
||||
microdaoName={room.microdao_name}
|
||||
membersCount={room.members_online}
|
||||
>
|
||||
<button
|
||||
onClick={() => navigate('/city/rooms')}
|
||||
className="text-white/80 hover:text-white flex items-center gap-2 bg-black/20 px-3 py-1.5 rounded-lg backdrop-blur-sm hover:bg-black/30 transition-all"
|
||||
>
|
||||
← Назад
|
||||
</button>
|
||||
<div className="flex items-center gap-2">
|
||||
<button
|
||||
onClick={() => navigate('/city/rooms')}
|
||||
className="text-white/80 hover:text-white flex items-center gap-2 bg-black/20 px-3 py-1.5 rounded-lg backdrop-blur-sm hover:bg-black/30 transition-all"
|
||||
>
|
||||
← Назад
|
||||
</button>
|
||||
<ReportButton
|
||||
targetScopeType="room"
|
||||
targetScopeId={roomId || ''}
|
||||
actorDaisId="dais-demo-user"
|
||||
variant="icon"
|
||||
className="bg-black/20 hover:bg-red-500/30 backdrop-blur-sm"
|
||||
/>
|
||||
</div>
|
||||
</RoomBrandHeader>
|
||||
|
||||
{/* Messages */}
|
||||
|
||||
Reference in New Issue
Block a user