expand user permissions
This commit is contained in:
@@ -14,9 +14,10 @@ interface Props {
|
||||
onAiTag?: () => Promise<void>
|
||||
showTags?: boolean
|
||||
onShowTagsChange?: (v: boolean) => void
|
||||
readOnly?: boolean
|
||||
}
|
||||
|
||||
export default function ImageLightbox({ url, name, onClose, onPrev, onNext, itemKey, onTagsChanged, onAiTag, showTags: showTagsProp, onShowTagsChange }: Props) {
|
||||
export default function ImageLightbox({ url, name, onClose, onPrev, onNext, itemKey, onTagsChanged, onAiTag, showTags: showTagsProp, onShowTagsChange, readOnly }: Props) {
|
||||
const overlayRef = useRef<HTMLDivElement>(null)
|
||||
const [showTagsLocal, setShowTagsLocal] = useState(false)
|
||||
const showTags = showTagsProp ?? showTagsLocal
|
||||
@@ -354,7 +355,8 @@ export default function ImageLightbox({ url, name, onClose, onPrev, onNext, item
|
||||
onHide={() => setShowTags(false)}
|
||||
onClose={onClose}
|
||||
onTagsChanged={onTagsChanged}
|
||||
onAiTag={onAiTag}
|
||||
onAiTag={readOnly ? undefined : onAiTag}
|
||||
readOnly={readOnly}
|
||||
>
|
||||
{/* Description section */}
|
||||
<div className="flex flex-col gap-1 pt-4" style={{ borderTop: '1px solid var(--border)' }}>
|
||||
|
||||
Reference in New Issue
Block a user