feat(web): unify attachment open behavior in context menus
Some checks failed
CI / test (push) Failing after 2m19s
Some checks failed
CI / test (push) Failing after 2m19s
This commit is contained in:
@@ -987,9 +987,16 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) {
|
||||
style={{ left: attachmentCtx.x, top: attachmentCtx.y }}
|
||||
onClick={(event) => event.stopPropagation()}
|
||||
>
|
||||
<a className="block rounded px-2 py-1.5 text-sm hover:bg-slate-800" href={attachmentCtx.url} rel="noreferrer" target="_blank">
|
||||
<button
|
||||
className="block w-full rounded px-2 py-1.5 text-left text-sm hover:bg-slate-800"
|
||||
onClick={() => {
|
||||
window.open(attachmentCtx.url, "_blank", "noopener,noreferrer");
|
||||
setAttachmentCtx(null);
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
Open
|
||||
</a>
|
||||
</button>
|
||||
<button
|
||||
className="block w-full rounded px-2 py-1.5 text-left text-sm hover:bg-slate-800"
|
||||
onClick={async () => {
|
||||
|
||||
Reference in New Issue
Block a user