Skip to content

Commit 2f05c04

Browse files
authored
Merge pull request #92 from mastercomfig/develop
sync up main
2 parents 18c1600 + 9c6baf1 commit 2f05c04

54 files changed

Lines changed: 857 additions & 523 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/bump.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
bump:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v5
18+
- uses: actions/checkout@v6
1919
with:
2020
token: ${{ secrets.REPO_TOKEN }}
2121
fetch-depth: 0

.github/workflows/repo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
merge:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v5
11+
- uses: actions/checkout@v6
1212
- name: Merge main -> develop
1313
uses: everlytic/branch-merge@master
1414
with:

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"@vite-pwa/astro": "^1.1.0",
5252
"@zip.js/zip.js": "^2.7.69",
5353
"aos": "^2.3.4",
54-
"astro": "^5.14.1",
54+
"astro": "^5.14.3",
5555
"astro-remote": "^0.3.4",
5656
"autoprefixer": "^10.4.21",
5757
"bootstrap": "^5.3.7",
@@ -106,6 +106,7 @@
106106
"typescript": "^5.8.3",
107107
"typeson": "^9.0.4",
108108
"typeson-registry": "^11.1.1",
109+
"ua-parser-js": "^2.0.6",
109110
"vanilla-lazyload": "^19.1.3",
110111
"vdf-parser": "^1.2.1",
111112
"vite": "^7.0.7",

pnpm-lock.yaml

Lines changed: 291 additions & 458 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/_headers

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
! Access-Control-Allow-Origin
33
Permissions-Policy: document-domain=()
44
Document-Policy: js-profiling
5-
Content-Security-Policy: upgrade-insecure-requests; default-src 'none'; script-src {{SRC_NONCE}} {{SCRIPT_SRC_HASHES}} 'self' 'unsafe-inline' blob: https://s-usc1b-nss-2136.firebaseio.com https://comfig-giftcards-default-rtdb.firebaseio.com https://static.cloudflareinsights.com https://ajax.cloudflare.com https://challenges.cloudflare.com; frame-src https://www.youtube-nocookie.com https://challenges.cloudflare.com https://s-usc1b-nss-2136.firebaseio.com; img-src data: https:; connect-src https: wss:; media-src blob: https:; style-src 'self' 'unsafe-inline'; style-src-elem {{SRC_NONCE}} {{STYLE_SRC_ELEM_HASHES}} 'self' 'unsafe-inline'; style-src-attr 'unsafe-inline'; manifest-src 'self'; font-src 'self'; worker-src blob: data: 'self'; form-action 'self'; frame-ancestors 'self' http: https: file:; base-uri 'none'; sandbox allow-downloads allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts;
5+
Content-Security-Policy: upgrade-insecure-requests; default-src 'none'; script-src {{SRC_NONCE}} {{SCRIPT_SRC_HASHES}} 'self' 'unsafe-inline' blob: https://s-usc1b-nss-2136.firebaseio.com https://comfig-giftcards-default-rtdb.firebaseio.com https://static.cloudflareinsights.com https://ajax.cloudflare.com https://challenges.cloudflare.com; frame-src https://www.youtube-nocookie.com https://challenges.cloudflare.com https://s-usc1b-nss-2136.firebaseio.com; img-src data: https: blob:; connect-src https: wss:; media-src blob: https:; style-src 'self' 'unsafe-inline'; style-src-elem {{SRC_NONCE}} {{STYLE_SRC_ELEM_HASHES}} 'self' 'unsafe-inline'; style-src-attr 'unsafe-inline'; manifest-src 'self'; font-src 'self'; worker-src blob: data: 'self'; form-action 'self'; frame-ancestors 'self' http: https: file:; base-uri 'none'; sandbox allow-downloads allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts;
66
Cross-Origin-Resource-Policy: same-origin
77
Cross-Origin-Opener-Policy: same-origin
88

1.07 MB
Loading
852 KB
Loading
984 KB
Loading
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
3+
---
4+
5+
<tcdownload-loader></tcdownload-loader>
6+
7+
<script>
8+
import { UAParser } from "ua-parser-js";
9+
import { DeviceType } from 'ua-parser-js/enums';
10+
11+
class TC2DownloadLoader extends HTMLElement {
12+
async connectedCallback() {
13+
await new Promise(resolve => setTimeout(resolve, 0)).then(() => {
14+
if (document.readyState === "loading") {
15+
window.addEventListener("DOMContentLoaded", this.refreshDownloadButton.bind(this));
16+
} else {
17+
this.refreshDownloadButton();
18+
}
19+
});
20+
}
21+
22+
refreshDownloadButton() {
23+
const parser = new UAParser();
24+
const device = parser.getDevice();
25+
const os = parser.getOS().name;
26+
let downloadLink;
27+
if (device.type && !device.is(DeviceType.DESKTOP)) {
28+
downloadLink = "https://github.com/mastercomfig/tc2-launcher/releases/latest";
29+
} else if (os === "Windows") {
30+
downloadLink = "https://github.com/mastercomfig/tc2-launcher/releases/latest/download/TC2Launcher.exe";
31+
} else {
32+
downloadLink = "https://github.com/mastercomfig/tc2-launcher/releases/latest";
33+
}
34+
const downloadBtn = document.getElementById("tc2-download-btn");
35+
if (downloadBtn) {
36+
downloadBtn.href = downloadLink;
37+
}
38+
}
39+
}
40+
41+
if (!customElements.get("tcdownload-loader")) {
42+
customElements.define("tcdownload-loader", TC2DownloadLoader);
43+
}
44+
</script>

0 commit comments

Comments
 (0)