Add reload button

This commit is contained in:
arne 2024-07-24 22:51:45 +02:00
commit 080150d2bc
2 changed files with 12 additions and 6 deletions

View file

@ -213,10 +213,15 @@ $compile(
oninput: $inputNum(height),
}),
select("Unit", { oninput: $input(unit) }, ["mm", "px"]),
["h2", {}, "Export"],
["div", {}, ["a", {
class: "button",
href: svg.map(svg => `data:text/svg,${encodeURIComponent(svg)}`),
download: sync({ src: { xSeeds, ySeeds } }).map(({ xSeeds, ySeeds }) => `hitomezashi-pattern-${Date.now()}-${xSeeds.join('')}-${ySeeds.join('')}.svg`)
}, "Download SVG"]]]]
["h2", {}, "Actions"],
["div", {},
["a", {
class: "button",
href: svg.map(svg => `data:text/svg,${encodeURIComponent(svg)}`),
download: sync({ src: { xSeeds, ySeeds } }).map(({ xSeeds, ySeeds }) => `hitomezashi-pattern-${Date.now()}-${xSeeds.join('')}-${ySeeds.join('')}.svg`)
}, "Download SVG"],
["a", {
class: "button",
href: "./",
}, "Reload"]]]]
).mount(document.body)