Key modifiers to open tx in new tab from visualization

This commit is contained in:
Mononaut
2023-04-02 07:40:05 +09:00
parent 0235d3cfae
commit 3fa47b411c
3 changed files with 20 additions and 10 deletions

View File

@@ -612,9 +612,13 @@ export class BlockComponent implements OnInit, OnDestroy {
});
}
onTxClick(event: TransactionStripped): void {
const url = new RelativeUrlPipe(this.stateService).transform(`/tx/${event.txid}`);
this.router.navigate([url]);
onTxClick(event: { tx: TransactionStripped, keyModifier: boolean }): void {
const url = new RelativeUrlPipe(this.stateService).transform(`/tx/${event.tx.txid}`);
if (!event.keyModifier) {
this.router.navigate([url]);
} else {
window.open(url, '_blank');
}
}
onTxHover(txid: string): void {