feat: shift+click to add on right

feat/type-attributes
Tomáš Mládek 2023-03-07 16:36:42 +01:00
parent 51d7c7fb43
commit afcd16237b
1 changed files with 2 additions and 3 deletions

View File

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