Skip to content

Commit

Permalink
Upgrade astro
Browse files Browse the repository at this point in the history
  • Loading branch information
mandar1jn committed Sep 1, 2023
1 parent 1633cdc commit 29c1828
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@astrojs/sitemap": "^3.0.0",
"@astrojs/tailwind": "^5.0.0",
"aes-js": "^3.1.2",
"astro": "^3.0.1",
"astro": "^3.0.6",
"codemirror": "^6.0.1",
"date-fns": "^2.29.3",
"gl-matrix": "^3.4.3",
Expand Down
5 changes: 3 additions & 2 deletions src/pages/skylanders/decrypt.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import Layout from "@layouts/Layout.astro";
<label for="file">File</label>
<input id="file" type="file">
<input type="submit" value="Decrypt">
<a id="file-download" style="display: none;" data-astro-reload />
</form>
</Section>
<Section>
Expand Down Expand Up @@ -125,10 +124,12 @@ import Layout from "@layouts/Layout.astro";
fileName += `${(k == 0)? "" : "."}${fileParts[k]}`;
}

let a = document.getElementById("file-download") as HTMLAnchorElement;
const a = document.createElement("a");
a.style.display = "none";
a.href = url;
a.download = fileName;
a.click();
a.remove();

setTimeout(() => window.URL.revokeObjectURL(url), 1000);

Expand Down
5 changes: 3 additions & 2 deletions src/pages/skylanders/generator.astro
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ import Section from "../../components/Section.astro";
</div>

<input type="submit" value="Generate" />
<a id="file-download" style="display: none;" data-astro-reload />
</form>
</Section>

Expand Down Expand Up @@ -460,10 +459,12 @@ import Section from "../../components/Section.astro";

const url = window.URL.createObjectURL(blob);

let a = document.getElementById("file-download") as HTMLAnchorElement;
const a = document.createElement("a");
a.style.display = "none";
a.href = url;
a.download = `${selector.options[selector.selectedIndex].text}.bin`;
a.click();
a.remove();

setTimeout(() => window.URL.revokeObjectURL(url), 1000);
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1039,10 +1039,10 @@ array-iterate@^2.0.0:
resolved "https://registry.yarnpkg.com/array-iterate/-/array-iterate-2.0.1.tgz#6efd43f8295b3fee06251d3d62ead4bd9805dd24"
integrity sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==

astro@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/astro/-/astro-3.0.1.tgz#65cb4e16b6805222d537d6420338cbf60106c7fa"
integrity sha512-+OSvrPRSr4PKJZ80W2fgb5KGliVKc54vXlbb/dZt2Qe3b5la4D2mvYLrKjY8hk9cRBZH9Wp5uIHecMrI+uGyYQ==
astro@^3.0.6:
version "3.0.6"
resolved "https://registry.yarnpkg.com/astro/-/astro-3.0.6.tgz#3ae15bdf2fd3285b0189a5ab10bd5ed33ecc0e00"
integrity sha512-I4W71g/IzRp1dYHKbQGKp44TSlR+vO3z1c2TscMMJPCyQ3b15o0DVLWibd4zdDDeAQ1JqM8jvQy+nOYMIlacpg==
dependencies:
"@astrojs/compiler" "^2.0.1"
"@astrojs/internal-helpers" "0.2.0"
Expand Down

0 comments on commit 29c1828

Please sign in to comment.