feat: shift+click to add on right

This commit is contained in:
Tomáš Mládek 2023-03-07 16:36:42 +01:00
parent 51d7c7fb43
commit afcd16237b

View file

@ -29,14 +29,13 @@
const index = context ? context.index : readable(0);
const addresses = context ? context.addresses : readable([]);
function onClick() {
function onClick(ev: MouseEvent) {
if ($location.pathname.startsWith("/browse")) {
let newAddresses = $addresses.concat();
const routerTo =
"/browse/" +
newAddresses
.slice(0, $index + 1)
(ev.shiftKey ? newAddresses : newAddresses.slice(0, $index + 1))
.concat([targetHref])
.join(",");