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:
@@ -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