feat: Add AONPRD link and hide notes for weapons in item modal
All checks were successful
Deploy Dimension47 / deploy (push) Successful in 35s
All checks were successful
Deploy Dimension47 / deploy (push) Successful in 35s
- Added external link to Archives of Nethys for all equipment items - Notes section now only displays for non-weapon items - Uses equipment.url field from database, prepends https://2e.aonprd.com if needed Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { X, Swords, Shield, Package, Minus, Plus, Trash2, Pencil } from 'lucide-react';
|
||||
import { X, Swords, Shield, Package, Minus, Plus, Trash2, Pencil, ExternalLink } from 'lucide-react';
|
||||
import { Button, Input } from '@/shared/components/ui';
|
||||
import { api } from '@/shared/lib/api';
|
||||
import type { CharacterItem, Equipment } from '@/shared/types';
|
||||
@@ -369,13 +369,26 @@ export function ItemDetailModal({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Notes */}
|
||||
{item.notes && (
|
||||
{/* Notes - only for non-weapons */}
|
||||
{item.notes && !effectiveDamage && (
|
||||
<div className="p-3 rounded-lg bg-bg-secondary">
|
||||
<p className="text-xs text-text-secondary mb-1">Notizen</p>
|
||||
<p className="text-sm text-text-primary">{item.notes}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* AONPRD Link */}
|
||||
{equipment?.url && (
|
||||
<a
|
||||
href={equipment.url.startsWith('http') ? equipment.url : `https://2e.aonprd.com${equipment.url}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="flex items-center justify-center gap-2 p-3 rounded-lg bg-bg-secondary hover:bg-bg-tertiary text-primary-400 hover:text-primary-300 transition-colors"
|
||||
>
|
||||
<ExternalLink className="h-4 w-4" />
|
||||
<span className="text-sm font-medium">Auf Archives of Nethys ansehen</span>
|
||||
</a>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user