Handle modifiers when clicking on account links

pull/543/head
Lim Chee Aun 2024-05-25 13:52:25 +08:00
rodzic 2c1a6c8cb5
commit c11bbbb2b3
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -57,9 +57,15 @@ function NameText({
}
onClick={(e) => {
if (external) return;
if (e.shiftKey) return; // Save link? 🤷
e.preventDefault();
e.stopPropagation();
if (onClick) return onClick(e);
if (e.metaKey || e.ctrlKey || e.shiftKey || e.which === 2) {
const internalURL = `#/${instance}/a/${id}`;
window.open(internalURL, '_blank');
return;
}
states.showAccount = {
account,
instance,